王晓慧 1 day ago
parent f4d189d5e8
commit 00aa276a45

@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead

@ -0,0 +1,18 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-unused-vars':'off'
}
}

@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
/package-lock.json
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

@ -0,0 +1,36 @@
# jianzhi-manage-web
#### Description
jianzhi-manage-web 兼职管理后台
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

@ -0,0 +1,63 @@
1. 校园兼职平台服务端 jianzhi-portal https://github.com/zzhougy/jianzhi-server.git
2. 校园兼职平台门户 jianzhi-portal https://github.com/zzhougy/jianzhi-portal.git
3. 校园兼职平台聊天界面 jianzhi-webim https://github.com/zzhougy/jianzhi-webim.git
4. 校园兼职平台后台管理 jianzhi-webim https://github.com/zzhougy/jianzhi-manage-web.git
#### 项目介绍
本系统用户分为三类:后台管理员(超级管理员,普通管理员),求职者(学生),
招聘人员(负责人、普通招聘人员)。本系统主要分为前台和后台,前台面向的是所有用
户,后台面向的是系统管理员,可以对网站信息及用户数据进行管理。
前台实现的模块功能需求:
1) 用户进行账号的登录、注册
2) 用户按关键词、条件搜索岗位和企业,浏览岗位和企业的详细信息
3) 求职者可以对自己个人基本信息进行查看和编辑,进行简历投递,查看简历投递记录和进度
4) 招聘单位对个人账号信息查看和编辑,发布和编辑岗位信息,查看收到的简历。企业负责人对企业信息的编辑及审核信息提交
5) 即时通讯,求职者与招聘人员进行私聊
6) 用户可以对求职者或招聘单位进行评价、投诉
后台实现的模块功能需求:
1) 管理员查看、编辑求职者和招聘单位人员基本信息,对招聘单位提交的企业信息进行审核
2) 管理员可以查看、编辑招聘单位发布的兼职信息
3) 管理员对违规的账号或招聘单位进行封禁处理
4) 超级管理员能够管理平台所有用户的角色及角色所拥有的权限
#### 界面截图
![](./image/1.png)
![](./image/2.png)
![](./image/3.png)
![](./image/4.png)
![](./image/5.png)
![](./image/6.png)
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Run your tests
```
npm run test
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

@ -0,0 +1,8 @@
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
API_HOST:"/api/"
})

@ -0,0 +1,79 @@
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/api': {
target: 'http://localhost:8080',//设置调用的接口域名和端口号默认端口号80
changeOrigin: true,
pathRewrite: {'^/api': '' }
//这里理解成用‘/api代替target里面的地址
//后面组件中我们掉接口时直接用api代替
//比如我要调用'http://40.00.100.100:3002/user/add',
//直接写‘/api/user/add即可
}
},
// Various Dev Server settings
host: '0, 0, 0, 0', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}

@ -0,0 +1,4 @@
'use strict'
module.exports = {
NODE_ENV: '"production"'
}

@ -0,0 +1,7 @@
'use strict'
const merge = require('webpack-merge')
const devEnv = require('./dev.env')
module.exports = merge(devEnv, {
NODE_ENV: '"testing"'
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

@ -0,0 +1,42 @@
{
"name": "jianzhi",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.0",
"cache-loader": "^4.1.0",
"core-js": "^3.6.5",
"echarts": "^4.9.0",
"element-ui": "^2.4.5",
"node-sass": "^7.0.0",
"nprogress": "^0.2.0",
"register-service-worker": "^1.7.1",
"sass-loader": "^10.1.1",
"serve": "^14.2.3",
"vue": "^2.6.12",
"vue-axios": "^3.1.3",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.5.0",
"@vue/cli-plugin-eslint": "^4.5.0",
"@vue/cli-plugin-pwa": "^4.5.0",
"@vue/cli-service": "^4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"less": "^2.7.3",
"less-loader": "^4.0.6",
"style-resources-loader": "^1.3.2",
"vue-cli-plugin-element": "^1.0.1",
"vue-cli-plugin-style-resources-loader": "^0.1.4",
"vue-template-compiler": "^2.6.11",
"webpack": "^4.0.0"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.00251 14.9297L0 1.07422H6.14651L8.00251 4.27503L9.84583 1.07422H16L8.00251 14.9297Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 215 B

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="icon" type="image/x-icon" href="./favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

@ -0,0 +1,2 @@
User-agent: *
Disallow:

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

@ -0,0 +1,33 @@
<template>
<router-view id="app" />
</template>
<script>
export default {
name: 'app',
created () {
// --------start vuestore--------------------------------------------
// sessionStorage
if (sessionStorage.getItem('store')) {
this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem('store'))))
sessionStorage.removeItem('store');
}
// storesessionStorage
window.addEventListener('beforeunload', () => {
sessionStorage.setItem('store', JSON.stringify(this.$store.state))
})
// --------end vuestore--------------------------------------------
}
}
</script>
<style lang="less">
#app {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
//table
.el-table th.gutter{
display: table-cell!important;
}
</style>

@ -0,0 +1,180 @@
<template>
<figure class="charts-line" id="myChart">
折线图
</figure>
</template>
<script>
export default {
name: "ChartsLine",
components: {},
methods: {
drawLine() {
// domecharts
let myChart = this.$echarts.init(
document.getElementById("myChart"),
"light"
);
//
myChart.setOption({
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
label: {
backgroundColor: "rgba(66, 139, 202, 0.7)"
}
}
},
legend: {
textStyle: {
color: "#999",
fontSize: 14,
},
data: [{
name: "报价单个数",
icon: 'circle'
}, {
name: "订单数",
icon: 'circle'
}]
},
grid: {
left: "4%",
right: "4%",
bottom: "0%",
containLabel: true
},
xAxis: [{
type: "category",
boundaryGap: false,
axisLine: {
show: false
}, //线
axisTick: {
show: false
}, //
splitLine: {
show: true,
lineStyle: {
color: ["#eee"],
width: 1,
type: "dashed"
}
},
data: [
"2020年1月",
"2020年2月",
"2020年3月",
"2020年4月",
"2020年5月",
"2020年6月",
"2020年7月"
]
}],
yAxis: [{
type: "value",
axisLine: {
show: false
}, //线
axisLabel: {
show: false
},
axisTick: {
show: false
}, //
splitLine: {
show: true,
lineStyle: {
color: ["#eee"],
width: 1,
type: "dashed"
}
},
}],
series: [{
name: "报价单个数",
type: "line",
// stack: "",
itemStyle: {
color: "#FD9E8A"
},
label: {
normal: {
show: true,
position: "top"
}
},
smooth: true,
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: "#FD9E8A" // 0%
},
{
offset: 1,
color: "#ffe" // 100%
}
]
}
},
data: [820, 932, 901, 320, 852, 1250, 901, 1234, 350]
}, {
name: "订单数",
type: "line",
// stack: "",
itemStyle: {
color: "#00C8EE"
},
smooth: true,
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: "#00C8EE" // 0%
},
{
offset: 1,
color: "#ffe" // 100%
}
]
}
},
data: [220, 532, 0, 134, 720, 932, 101, 34, 834]
}]
});
}
},
mounted() {
this.drawLine();
let myChart = this.$echarts.init(
document.getElementById("myChart"),
"light"
);
window.onresize = () => {
myChart.resize();
}; //resizeSelftrue,
if (this.resizeSelf) {
myChart.resize();
}
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.charts-line {
height: 350px;
}
</style>

@ -0,0 +1,650 @@
<template>
<section class="customer-list">
<!-- start form search -->
<el-form :inline="true" :model="searchForm" label-width="110px" size="small" class="search-form" label-suffix="">
<el-form-item label="客户名称">
<el-input placeholder="请输入客户名称" style="width:150px;" v-model="searchForm.customerName"></el-input>
</el-form-item>
<el-form-item label="联系人">
<el-input placeholder="请输入联系人" style="width:150px;" v-model="searchForm.contacts"></el-input>
</el-form-item>
<el-form-item label="联系电话">
<el-input placeholder="请输入手机号码" style="width:150px;" v-model="searchForm.contactNumber"></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select placeholder="请选择" style="width:150px;" v-model="searchForm.status">
<el-option label="全部" value="0"></el-option>
<el-option label="启用" value="1"></el-option>
<el-option label="停用" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="clickFormSearch"></el-button>
</el-form-item>
</el-form>
<!-- end form search -->
<!-- start btn group -->
<el-row class="table-control">
<el-col :span="18">
<el-button icon="el-icon-plus" size="small" type="primary" plain @click="clickAdd"></el-button>
<el-button icon="el-icon-price-tag" size="small" type="primary" plain @click="clickToPriceStrategy"></el-button>
</el-col>
<el-col :span="6" class="text-right">
<!-- 备用区域 -->
</el-col>
</el-row>
<!-- end btn group -->
<article class="table-data">
<!-- start table -->
<el-table :data="data" border style="width: 100%" highlight-current-row @current-change="handleCurrentChange"
@row-dblclick="rowDblclick" v-loading="loading" element-loading-text="玩命加载中" element-loading-background="rgba(0, 0, 0, 0.5)">
<el-table-column prop="code" label="客户编码" width="150"></el-table-column>
<el-table-column prop="customerName" label="客户名称" min-width="280"></el-table-column>
<el-table-column prop="status" label="状态" width="70" align="center">
<template slot-scope="scope">
<el-tag effect="dark" :type="scope.row.status === 1 ? 'warning' : 'success'" size="mini">{{scope.row.status | changeToText}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="customerType" label="客户类型" width="80" align="center">
<template slot-scope="scope">
{{scope.row.customerType | changeToText2}}
</template>
</el-table-column>
<el-table-column prop="contacts" label="联系人" width="100"></el-table-column>
<el-table-column prop="contactNumber" label="联系电话" width="130"></el-table-column>
<el-table-column prop="email" label="邮箱" width="180"></el-table-column>
<el-table-column prop="createdBy" label="创建人" width="130"></el-table-column>
<el-table-column prop="creationDate" label="创建时间" width="180"></el-table-column>
<el-table-column prop="historyOrder" label="历史订单" width="100" align="center">
<template>
<el-button @click="clickShowOrderHistory" size="mini" type="text">查看历史订单</el-button>
</template>
</el-table-column>
<el-table-column label="操作" width="140">
<template slot-scope="scope">
<el-button type="danger" @click="clickDelete(scope.row)" size="mini" plain icon="el-icon-delete" circle
title="删除"></el-button>
<el-button size="mini" @click="clickEdit(scope.row)" circle icon="el-icon-edit" title="编辑"></el-button>
</template>
</el-table-column>
</el-table>
<!-- end table -->
<!-- start pagination -->
<el-pagination :current-page="1" :page-sizes="[10, 20, 30, 40, 50]" :page-size="60" layout="total, sizes, prev, pager, next, jumper"
:total="80" class="table-pagination">
</el-pagination>
<!-- end pagination -->
</article>
<!-- start 新增模态窗 -->
<el-dialog title="新增客户" :visible.sync="modalAdd" width="1100px" :append-to-body="true" :close-on-click-modal="false">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" label-suffix="">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="客户编码" prop="code">
{{ruleForm.code}}<span style="opacity:.5;margin-left:16px;">自动生成</span>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="创建人" prop="createdBy">
{{ruleForm.createdBy}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户名称" prop="name">
<el-input v-model="ruleForm.name" placeholder="请输入客户名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户类型" prop="customerType">
<el-select v-model="ruleForm.customerType" placeholder="请选择客户类型" style="width:100%;display:block;">
<el-option label="个人" value="0"></el-option>
<el-option label="企业" value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系人" prop="contacts">
<el-input v-model="ruleForm.contacts" placeholder="请输入联系人姓名">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系人电话" prop="contactNumber">
<el-input v-model="ruleForm.contactNumber" placeholder="请输入联系人电话"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="邮箱" prop="email">
<el-input v-model="ruleForm.email" placeholder="请输入联系人电话"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="支付类型" prop="category">
<el-select v-model="ruleForm.category" placeholder="请选择" style="width:100%;display:block;">
<el-option label="现金用户" value="0"></el-option>
<el-option label="月结客户" value="1"></el-option>
<el-option label="充值用户" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户行" prop="bankOfDeposit">
<el-input v-model="ruleForm.bankOfDeposit" placeholder="请输入开户行"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="账号" prop="account">
<el-input v-model="ruleForm.account" placeholder="请输入开户行账号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="省份/城市" prop="account">
<el-cascader v-model="ruleForm.addressCity" :options="ruleForm.addressCityOptions"></el-cascader>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="详细地址" prop="address">
<el-input v-model="ruleForm.address" placeholder="请输入地址"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="状态" prop="status">
<el-radio-group v-model="ruleForm.status">
<el-radio label="0">启用</el-radio>
<el-radio label="1">停用</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="modalAdd = false"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')"> </el-button>
</span>
</el-dialog>
<!-- end 新增模态窗 -->
<!-- start 价格策略模态窗 -->
<el-dialog title="价格策略" :visible.sync="modalPriceStrategy" width="65%" :append-to-body="true" :close-on-click-modal="false">
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="新增价格策略" name="xzcl">
<el-form :model="priceStrategyForm" :rules="priceStrategyRules" ref="priceStrategyForm" label-width="130px"
label-suffix="">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="客户名称">
{{priceStrategyForm.customerName}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="价格策略名称" prop="priceStrategyName">
<el-input v-model="priceStrategyForm.priceStrategyName" placeholder="请输入价格策略名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品名称" prop="productName">
<el-select v-model="priceStrategyForm.productName" placeholder="请选择产品" style="width:100%;display:block;">
<el-option label="不锈钢" value="0"></el-option>
<el-option label="铸铁" value="1"></el-option>
<el-option label="铁皮" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="主单位单价" prop="standardPricePrimary">
<el-input v-model="priceStrategyForm.standardPricePrimary" placeholder="0.00"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="次单位单价" prop="standardPriceSecondary">
<el-input v-model="priceStrategyForm.standardPriceSecondary" placeholder="0.00"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="次主单位比" prop="primarySecondaryProportion">
<el-input v-model="priceStrategyForm.primarySecondaryProportion" placeholder="1方=x公斤"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开始时间" prop="startTime">
<el-date-picker v-model="priceStrategyForm.startTime" type="date" placeholder="选择日期" style="width:100%;">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="endTime">
<el-date-picker v-model="priceStrategyForm.endTime" type="date" placeholder="选择日期" style="width:100%;">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="适用" prop="status">
<el-radio-group v-model="priceStrategyForm.status">
<el-radio label="1">仅适用于此客户</el-radio>
<el-radio label="2">设为公共价格策略</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remarks">
<el-input type="textarea" v-model="priceStrategyForm.remarks" placeholder="请输入备注"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane label="从已有策略中选择" name="yycl">
<el-table :data="dataPriceStrategy" style="width: 100%;margin-bottom:24px;" border>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="strategyName" label="策略名称"></el-table-column>
<el-table-column prop="status" label="状态" width="80" align="center"></el-table-column>
<el-table-column prop="status" label="适用" width="80" align="center"></el-table-column>
<el-table-column prop="startTime" label="开始时间" width="160"></el-table-column>
<el-table-column prop="endTime" label="结束时间" width="160"></el-table-column>
<el-table-column prop="createdBy" label="创建人" width="150"></el-table-column>
<el-table-column prop="creationDate" label="创建时间" width="160"></el-table-column>
<el-table-column prop="remarks" label="备注"></el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="modalPriceStrategy = false"> </el-button>
<el-button type="primary" @click="submitForm('priceStrategyForm')" v-if="activeName=='xzcl'"></el-button>
<el-button type="primary" v-if="activeName=='yycl'"> </el-button>
</span>
</el-dialog>
<!-- end 价格策略模态窗 -->
<el-drawer title="****有限公司" :visible.sync="drawer" size="70%" custom-class="customer-info-detail-drawer">
<figure class="drawer-content">
<h2 class="single-title">客户信息</h2>
<el-form label-width="130px" label-suffix="" class="read-only-form">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="编码">
C41259665582
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户名称">
****有限公司
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="状态">
有效
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系人">
丁春秋
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系人电话">
13800138000
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="邮箱">
vvchuanqi@yb.tech
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开户行">
中国建设银行
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="户头">
****有限公司
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="账号">
56479816513213156546
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="地址">
广东省*****
</el-form-item>
</el-col>
</el-row>
</el-form>
<h2 class="single-title">价格策略</h2>
<el-table :data="dataPriceStrategy" style="width: 100%;margin-bottom:24px;" border>
<el-table-column prop="strategyName" label="策略名称"></el-table-column>
<el-table-column prop="status" label="状态" width="80" align="center"></el-table-column>
<el-table-column prop="startTime" label="开始时间" width="190"></el-table-column>
<el-table-column prop="endTime" label="结束时间" width="190"></el-table-column>
<el-table-column prop="createdBy" label="创建人" width="150"></el-table-column>
<el-table-column prop="creationDate" label="创建时间" width="190"></el-table-column>
<el-table-column prop="remarks" label="备注"></el-table-column>
</el-table>
<h2 class="single-title">历史订单</h2>
<el-table style="width: 100%;margin-bottom:24px;" border>
<el-table-column prop="orderCode" label="订单编号" width="150"></el-table-column>
<el-table-column prop="strategyName" label="价格策略" width="150" align="center"></el-table-column>
<el-table-column prop="personInCharge" label="负责人" width="100"></el-table-column>
<el-table-column prop="startTime" label="开始时间" width="190"></el-table-column>
<el-table-column prop="endTime" label="结束时间" width="190"></el-table-column>
<el-table-column prop="remarks" label="备注"></el-table-column>
</el-table>
</figure>
</el-drawer>
</section>
</template>
<script>
export default {
name: 'CustomerList',
data() {
return {
loading: false,
searchForm: { //
customerName: '', //
contacts: '', //
contactNumber: '', //
status: '', //
},
drawer: false, //
currentRow: null, //
modalAdd: false, ///
modalPriceStrategy: false, ///
activeName: 'xzcl', //tabs
ruleForm: { //
code: 'DV20070082', //:
createdBy: 'admin', //:
creationDate: '2020.06.30', //
name: '', //::::::::::::::
category: '', //::::::::::::::
customerType: '', //:::::::::::::::
contacts: '', //::::::::::::::
contactNumber: '', //::::::::::::::
email: '', //
addressCity: [],
addressCityOptions: [{
value: 'beijing',
label: '北京市',
children: [{
value: 'dongcheng',
label: '东城区',
},
{
value: 'xicheng',
label: '西城区',
},
{
value: 'chaoyang',
label: '朝阳区',
}
]
},
{
value: 'tianjin',
label: '天津市',
children: [{
value: 'heping',
label: '和平区',
}, {
value: 'form',
label: '河东区',
}, {
value: 'data',
label: '河西区',
}, {
value: 'notice',
label: '南开区',
}, {
value: 'navigation',
label: '河北区',
}, {
value: 'others',
label: '红桥区',
}]
}, {
value: 'shanghai',
label: '上海市',
children: [{
value: 'axure',
label: '黄浦区'
},
{
value: 'sketch',
label: '徐汇区'
}, {
value: 'jiaohu',
label: '长宁区'
}, {
value: 'jiaohu',
label: '静安区'
}
]
}, {
value: 'guangdong',
label: '广东省',
children: [{
value: 'guangzhou',
label: '广州市'
},
{
value: 'shenzhen',
label: '深圳市'
}, {
value: 'zhuhai',
label: '珠海市',
children: [{
value: 'xiangzhou',
label: '香洲区'
},
{
value: 'jinwan',
label: '金湾区'
}, {
value: 'doumen',
label: '斗门区'
}
]
}
]
}
],
address: '', //
bankOfDeposit: '', //::::::::::::::
account: '', //::::::::::::::
unitPriceSetting: '', //::::::::::::::
status: '', //
},
rules: { //
name: [{
required: true,
message: '请输入客户名称',
trigger: 'blur'
}],
customerType: [{
required: true,
message: '请选择客户类型',
trigger: 'change'
}],
contacts: [{
required: true,
message: '请输入联系人姓名',
trigger: 'blur'
}],
contactNumber: [{
required: true,
message: '请输入联系电话',
trigger: 'blur'
}],
},
priceStrategyForm: { //
customerName: '', //
priceStrategyName: '', //
productName: '', //
standardPricePrimary: '', //
standardPriceSecondary: '', //
primarySecondaryProportion: '', //
startTime: '', //
endTime: '', //
status: '', //12
remarks: '', //
},
priceStrategyRules: { //
priceStrategyName: [{
required: true,
message: '请输入价格策略名称',
trigger: 'blur'
}],
status: [{
required: true,
message: '请选择适用范围',
trigger: 'change'
}],
},
data: [{ //
code: 'DZ2020070030',
customerName: '****有限公司',
category: '充值用户',
customerType: 1,
contactNumber: '13800138000',
email: 'admin@dzkjy.com',
contacts: '丁春秋',
address: '广东省',
bankOfDeposit: '中国建设银行999支行',
account: '65685768579365',
historyOrder: '/',
status: 0,
createdBy: 'admin',
creationDate: '2020.08.01 02:48:35',
}
],
dataPriceStrategy: [{ //
strategyName: '国庆优惠价8.5折',
status: '0', //01
createdBy: 'admin',
creationDate: '2020.08.01 02:48:35',
startTime: '2020.07.26 00:00:00',
endTime: '2020.08.26 00:00:00',
remarks: '-',
},
{
strategyName: '元旦优惠价9.5折',
status: '0', //01
createdBy: 'admin',
creationDate: '2020.08.01 02:48:35',
startTime: '2020.07.26 00:00:00',
endTime: '2020.08.26 00:00:00',
remarks: '-',
}, {
strategyName: '新春优惠价7.5折',
status: '0', //01
createdBy: 'admin',
creationDate: '2020.08.01 02:48:35',
startTime: '2021.02.21 00:00:00',
endTime: '2021.03.06 00:00:00',
remarks: '-',
}
],
}
},
methods: {
clickFormSearch() {
this.loading = true;
setTimeout(() => {
this.loading = false;
}, 2000);
},
rowDblclick() { //
this.drawer = true;
},
handleCurrentChange(val) {
this.currentRow = val;
},
clickShowOrderHistory() { //
this.drawer = true;
},
clickAdd() { //
this.modalAdd = true;
},
clickToPriceStrategy() { //
if (this.currentRow == null) {
this.$message({
type: 'info',
message: '请选择一个客户'
});
} else {
this.modalPriceStrategy = true;
console.log(this.currentRow.customerName);
this.priceStrategyForm.customerName = this.currentRow.customerName;
}
},
handleTabClick(tab, event) { //tabs
console.log(tab, event);
// console.log(tab.label, event);
},
clickDelete(row) { //
this.$confirm('此操作将永久删除该科目, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row);
this.$message({
type: 'success',
message: '删除成功!'
});
})
.catch(() => {});
},
clickEdit(row) { //
console.log(row);
},
submitForm(formName) { //
this.$refs[formName].validate((valid) => {
if (valid) {
alert('提交成功!');
} else {
console.log('提交失败!!');
return false;
}
});
},
},
filters: {
changeToText(value) {
if (value == 0)
return '有效'
else {
return '停用'
}
},
changeToText2(value) {
if (value == 0)
return '个人'
else {
return '企业'
}
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.customer-list {
display: flex;
flex-flow: column;
.table-data {
padding: 0 16px;
flex: 1;
}
.customer-info-detail-drawer {
.drawer-content {
padding: 0 20px;
}
}
}
</style>

@ -0,0 +1,20 @@
<template>
<section class="supplier-management">
库存清单管理
</section>
</template>
<script>
export default {
name: 'SupplierManagement',
data() {
return {}
},
methods: {}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.supplier-management {}
</style>

@ -0,0 +1,85 @@
<template>
<figure class="global-breadcrumb">
<!-- <el-tag type="success" @click="clickGoHome" effect="dark">首页</el-tag>-->
<!-- <el-tag type="info" effect="plain" closable>科目设置</el-tag>-->
<!-- <el-tag type="info" effect="plain" closable v-for="tag in dynamicTags" :key="tag">{{tag}}</el-tag>-->
<el-tag :type="activePath=='/index'?'info':'info'" :effect="activePath=='/index'?'dark':'plain'" @click="clickGoHome('/index')"></el-tag>
<el-tag
v-for="(item,index ) in dynamicTags"
:key="index"
:type="item.url==activePath?'info':'info'"
@click="clickGoHome(item.url)"
:effect="item.url==activePath?'dark':'plain'"
@close="handleClose(index)"
closable
>{{item.menuName}}</el-tag>
</figure>
</template>
<script>
import bus from "../plugins/eventBus";
export default {
name: 'GlobalBreadcrumb',
data() {
return {
effect: 1,
dynamicTags: new Set(),
activePath: "",
}
},
mounted() {
this.activePath= window.sessionStorage.getItem("activePath")?window.sessionStorage.getItem("activePath"):'/index'
let tabs=JSON.parse(window.sessionStorage.getItem("tabs"))
this.dynamicTags=tabs?tabs.rows:[];
var self = this;
bus.$on("tabsEvent", function () {
self.activePath = window.sessionStorage.getItem("activePath");
self.dynamicTags=JSON.parse(window.sessionStorage.getItem("tabs")).rows;
});
},
methods: {
clickGoHome(path) {
console.log('123' )
if (this.$route.path !== path) {
this.$router.push(path);
}
this.activePath = path;
//bus.$emit("tabsEvent")
//bus.$emit("menusEvent", this.$route)
console.log('this.$route' , this.$route)
this.$emit('update_menu', this.$route)
},
handleClose(index) {
this.dynamicTags.splice(index,1);
let obj={
rows:this.dynamicTags
}
window.sessionStorage.setItem("tabs",JSON.stringify(obj))
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.global-breadcrumb {
padding: 12px 15px;
background-color: #FFF;
border-bottom: 1px solid @color-border-lighter;
.el-tag {
cursor: pointer;
&+.el-tag {
margin-left: 10px;
}
}
}
</style>

@ -0,0 +1,20 @@
<template>
<section class="hello">
哈罗世界
</section>
</template>
<script>
export default {
name: 'hello',
data() {
return {}
},
methods: {}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.hello {}
</style>

@ -0,0 +1,703 @@
<template>
<section class="index">
<figure class="quick-port">
<el-row :gutter="24">
<!-- <el-col :span="2.5">-->
<!-- <router-link class="item" :style="{'background-color':quikPortSetting.color1}" to="/basicData/menus-management">-->
<!-- <img src="../static/images/icon_quick_port_3.png" alt="">-->
<!-- <h2>权限管理</h2>-->
<!-- </router-link>-->
<!-- </el-col>-->
<!-- <el-col :span="2.5">-->
<!-- <router-link class="item" :style="{'background-color':quikPortSetting.color2}" to="/basicData/permission">-->
<!-- <img src="../static/images/icon_quick_port_3.png" alt="">-->
<!-- <h2>角色管理</h2>-->
<!-- </router-link>-->
<!-- </el-col>-->
<el-col :span="2.7">
<router-link class="item" :style="{'background-color':quikPortSetting.color3}" to="/basicData/personnel-list">
<img src="../static/images/icon_quick_port_3.png" alt="">
<h2>管理员管理</h2>
</router-link>
</el-col>
<el-col :span="2.7">
<router-link class="item" :style="{'background-color':quikPortSetting.color4}" to="/basicData/jobSeeker">
<img src="../static/images/icon_quick_port_3.png" alt="">
<h2>求职者管理</h2>
</router-link>
</el-col>
<el-col :span="2.7">
<router-link class="item" :style="{'background-color':quikPortSetting.color5}" to="/basicData/hrList">
<img src="../static/images/icon_quick_port_3.png" alt="">
<h2>招聘人员管理</h2>
</router-link>
</el-col>
<el-col :span="2.7">
<router-link class="item" :style="{'background-color':quikPortSetting.color6}" to="/basicData/recruitmentUnit">
<img src="../static/images/icon_quick_port_3.png" alt="">
<h2>企业信息管理</h2>
</router-link>
</el-col>
<el-col :span="2.7">
<router-link class="item" :style="{'background-color':quikPortSetting.color7}" to="/jobManagement/jobInfo-list">
<img src="../static/images/icon_quick_port_3.png" alt="">
<h2>岗位信息管理</h2>
</router-link>
</el-col>
<el-col :span="2.7">
<router-link class="item" :style="{'background-color':quikPortSetting.color8}" to="/jobManagement/label-list">
<img src="../static/images/icon_quick_port_3.png" alt="">
<h2>岗位标签管理</h2>
</router-link>
</el-col>
<el-col :span="2.7">
<router-link class="item" :style="{'background-color':quikPortSetting.color9}" to="/jobManagement/label-list">
<img src="../static/images/icon_quick_port_3.png" alt="">
<h2>意见与反馈管理</h2>
</router-link>
</el-col>
</el-row>
</figure>
<!-- start 全局统计卡片展示 -->
<el-row :gutter="10" class="cards-group">
<el-col :xs="12" :sm="6" :md="6" :lg="6" :xl="6" style="margin-right:-200px;">
<el-card class="box-card" :class="countDict['userCount'].style" style="width: 150px;">
<p class="title">{{ countDict['userCount'].name }}</p>
<p>_________</p>
<h2 class="number">{{ statisticObj.qznum }}</h2>
</el-card>
</el-col>
<el-col :xs="12" :sm="6" :md="6" :lg="6" :xl="6" style="margin-right:-200px;">
<el-card class="box-card" :class="countDict['supplierCount'].style"
style="width: 150px;margin-left: 10px">
<p class="title">{{ countDict['supplierCount'].name }}</p>
<p>_________</p>
<h2 class="number">{{ statisticObj.dwnum }}</h2>
</el-card>
</el-col>
<el-col :xs="12" :sm="6" :md="6" :lg="6" :xl="6" style="margin-right:-200px;">
<el-card class="box-card" :class="countDict['productCount'].style"
style="width: 150px;margin-left: 10px">
<p class="title">{{ countDict['productCount'].name }}</p>
<p>_________</p>
<h2 class="number">{{ statisticObj.gwnum }}</h2>
</el-card>
</el-col>
<el-col :xs="12" :sm="6" :md="6" :lg="6" :xl="6" style="margin-right:55px;">
<el-card class="box-card" :class="countDict['rmgw'].style"
style="width: 430px;margin-left: 10px">
<p class="title">{{ countDict['rmgw'].name }}</p>
<p>______________________________________________________</p>
<h2 class="number">{{ statisticObj11.rmgw }}</h2>
</el-card>
</el-col>
<el-col :xs="12" :sm="6" :md="6" :lg="6" :xl="6" style="margin-right:-200px;">
<el-card class="box-card" :class="countDict['lmgw'].style"
style="width: 445px;">
<p class="title">{{ countDict['lmgw'].name }}</p>
<p>______________________________________________________</p>
<h2 class="number">{{ statisticObj11.lmgw }}</h2>
</el-card>
</el-col>
</el-row>
<el-card>
<div style="height: 500px; display: flex;">
<div id="echarts1" style="width: 49%; height: 500px; ">
11111
</div>
<div style="width: 2%;"></div>
<div id="echarts2" style="width: 49%; height: 500px; ">
22222
</div>
</div>
</el-card>
</section>
</template>
<script>
import ChartsLine from '@/components/ChartsLine.vue'
import Radar from '@/components/Radar.vue'
import {countDict} from "@/static/countDict"
export default {
name: 'index',
components: {
// ChartsLine,
// Radar
},
data() {
return {
statisticObj: {},
statisticObj11: {
rmgw:"",
lmgw:""
},
countDict: countDict,
quikPortSetting: {
color0: '#29CE8B',
color1: '#29CE8B',
color2: '#3E82EE',
color3: '#C77BE6',
color4: '#FD9E8A',
color5: '#FCA713',
color6: '#05C3EE',
color7: '#729FFF',
color8: '#13c2c2',
color9: '#c27200',
}
}
},
created() {
this.selectStatistic()
},
methods: {
linkToMoreOrders() {
this.$router.push('/production-management/production-schedule-list');
},
selectStatistic() {
this.$axios.get("/statistic/selectStatistic", {}).then((res) => {
if (res.code == 200) {
this.statisticObj = res.data[0];
this.getGwtd();
} else {
this.$message({
type: 'erro',
message: '查询失败!'
});
}
});
},
getGwtd() {
this.$axios.get("/statistic/getGwtd", {}).then((res) => {
let data = res.data;
let xDataArr = [];
let yDataArr1 = [];
let yDataArr2 = [];
let yDataArr3 = [];
if( data.length>2 ){
this.statisticObj11.rmgw=data[0].name+","+data[1].name
this.statisticObj11.lmgw=data[data.length-1].name+","+data[data.length-2].name
console.log(this.statisticObj11,"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
}
for (let i = 0; i < data.length; i++) {
xDataArr.push(data[i].name)
yDataArr1.push(data[i].num)
yDataArr2.push(data[i].tg)
yDataArr3.push(data[i].jj)
}
if (res.code == 200) {
let myChart = this.$echarts.init( document.getElementById("echarts1"), "light" );
myChart.setOption({
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
label: {
backgroundColor: "rgba(66, 139, 202, 0.7)"
}
}
},
legend: {
textStyle: {
color: "#999",
fontSize: 14,
},
data: [{
name: "岗位热度",
icon: 'circle'
}]
},
grid: {
left: "4%",
right: "4%",
bottom: "0%",
containLabel: true
},
xAxis: [{
type: "category",
boundaryGap: false,
axisLine: {
show: true
}, //线
axisTick: {
show: false
}, //
splitLine: {
show: true,
lineStyle: {
color: ["#eee"],
width: 1,
type: "dashed"
}
},
data: xDataArr
}],
yAxis: [{
type: "value",
axisLine: {
show: true
}, //线
axisLabel: {
show: false
},
axisTick: {
show: false
}, //
splitLine: {
show: true,
lineStyle: {
color: ["#eee"],
width: 1,
type: "dashed"
}
},
}],
series: [{
name: "岗位热度",
type: "line",
// stack: "",
itemStyle: {
color: "#FD9E8A"
},
label: {
normal: {
show: true,
position: "top"
}
},
smooth: true,
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: "#FD9E8A" // 0%
},
{
offset: 1,
color: "#ffe" // 100%
}
]
}
},
data: yDataArr1
}]
});
let myChart2 = this.$echarts.init( document.getElementById("echarts2"), "light" );
myChart2.setOption({
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
label: {
backgroundColor: "rgba(66, 139, 202, 0.7)"
}
}
},
legend: {
textStyle: {
color: "#999",
fontSize: 14,
},
data: [{
name: "岗位通过率",
icon: 'circle'
},{
name: "岗位拒绝率",
icon: 'circle'
}]
},
grid: {
left: "4%",
right: "4%",
bottom: "0%",
containLabel: true
},
xAxis: [{
type: "category",
boundaryGap: false,
axisLine: {
show: true
}, //线
axisTick: {
show: false
}, //
splitLine: {
show: true,
lineStyle: {
color: ["#eee"],
width: 1,
type: "dashed"
}
},
data: xDataArr
}],
yAxis: [{
type: "value",
axisLine: {
show: true
}, //线
axisLabel: {
show: false
},
axisTick: {
show: false
}, //
splitLine: {
show: true,
lineStyle: {
color: ["#eee"],
width: 1,
type: "dashed"
}
},
}],
series: [{
name: "岗位通过率",
type: "line",
// stack: "",
itemStyle: {
color: "rgba(2,255,91,0.3)"
},
label: {
normal: {
show: true,
position: "top"
}
},
smooth: true,
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: "rgba(2,255,91,0.3)" // 0%
},
{
offset: 1,
color: "#ffe" // 100%
}
]
}
},
data: yDataArr2
}, {
name: "岗位拒绝率",
type: "line",
// stack: "",
itemStyle: {
color: "rgba(2,255,91,0.3)"
},
label: {
normal: {
show: true,
position: "top"
}
},
smooth: true,
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: "rgba(2,255,91,0.3)" // 0%
},{
offset: 1,
color: "#ffe" // 100%
}]
}
},
data: yDataArr3
}]
});
} else {
this.$message({
type: 'erro',
message: '查询失败!'
});
}
});
}
},
filters: {}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.index {
padding: 16px;
height: 100%;
overflow: hidden;
overflow-y: auto;
background-color: @color-body-bg;
.box-card {
margin-bottom: 16px;
}
.order-charts-list {
h3 {
margin-top: 12px;
font-weight: 800;
margin-bottom: 6px;
white-space: nowrap;
overflow: hidden;
width: 100%;
text-overflow: ellipsis;
}
}
.quick-port {
margin-bottom: 16px;
.item {
background-color: #FFF;
padding: 22px 16px;
display: flex;
align-items: center;
border-radius: 4px;
transition: all 0.2s;
cursor: pointer;
position: relative;
overflow: hidden;
&::before {
content: "";
position: absolute;
transition: all 0.2s;
width: 100%;
left: 0;
top: 95%;
height: 100%;
background-color: rgba(0, 0, 0, .15);
}
&:hover {
box-shadow: 0 5px 15px rgba(0, 0, 0, .15);
> img {
transform: scale(.65);
}
&::before {
top: 0;
z-index: 0;
}
}
&:active {
box-shadow: 0 5px 0 rgba(0, 0, 0, .15);
}
> img {
margin-right: 12px;
width: 56px;
height: 56px;
transition: all 0.2s;
position: relative;
z-index: 5;
}
> h2 {
font-size: 17px;
font-weight: 800;
color: #FFF;
flex: 1;
position: relative;
z-index: 5;
}
&.item_plus {
}
&.color1 {
background-color: #29CE8B;
}
&.color2 {
background-color: #3E82EE;
}
&.color3 {
background-color: #C77BE6;
}
&.color4 {
background-color: #FD9E8A;
}
&.color5 {
background-color: #FCA713;
}
&.color6 {
background-color: #05C3EE;
}
&.color7 {
background-color: #729FFF;
}
&.color8 {
background-color: #606266;
}
}
}
}
//
.menu-list {
> li {
display: flex;
align-items: center;
padding: 12px 16px;
position: relative;
&::after {
content: "";
position: absolute;
left: 16px;
bottom: 0;
border-bottom: 1px solid @color-border-lighter;
right: 0;
}
&:last-child::after {
display: none;
}
&:hover {
background-color: #f5f7fa;
}
> span {
margin-left: 12px;
&.menu-name {
margin-left: 0;
flex: 1;
font-size: 16px;
font-weight: 800;
}
}
}
}
.index {
height: 100%;
.cards-group {
.box-card {
height: 104px;
}
}
.quick-links-group {
/deep/ .box-card {
.el-card__body {
display: flex;
align-items: center;
.el-avatar {
margin-right: 10px;
background-color: #fff;
}
.item-content {
h2 {
font-weight: 800;
margin-bottom: 5px;
}
p {
font-size: 12px;
color: @color-placeholder;
}
}
}
}
}
}
.box-card {
line-height: 1;
margin-bottom: 15px;
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
.title {
color: @color-primary;
}
}
.sub-text {
i {
margin-left: 5px;
}
}
.number {
font-size: 24px;
font-weight: 800;
padding: 5px 0;
}
&.bg1 {
color: #fff;
background-image: linear-gradient(120deg, #3e82ee 0, #00c8ee 100%);
//background-color: #8c939d;
}
&.bg2 {
color: #fff;
background-image: linear-gradient(120deg, #6cdeb0 0, #b9f39c 100%);
//background-color: #8c939d;
}
&.bg3 {
color: #fff;
background-image: linear-gradient(120deg, #c77be6 0, #ea9aff 100%);
}
&.bg4 {
color: #fff;
background-image: linear-gradient(120deg, #fd9e8a 0, #ffecca 100%);
}
&.bg5{
color: #fff;
background-image: linear-gradient(120deg, #c77be6 0, #b9f39c 100%);
}
}
</style>

@ -0,0 +1,587 @@
<template>
<section class="personnel-list">
<!-- start form search -->
<el-form :inline="true" :model="formInline" label-width="100px" size="small" class="search-form" label-suffix="">
<el-form-item label="单位名称">
<el-input v-model="formInline.name" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<el-form-item label="岗位名称">
<el-input v-model="formInline.code" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<!-- <el-form-item label="部门" prop="deptId">-->
<!-- <el-select-->
<!-- v-model="formInline.deptId"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable-->
<!-- reserve-keyword-->
<!-- placeholder="请输入关键词"-->
<!-- :remote-method="queryDept"-->
<!-- :loading="loadingDept"-->
<!-- @change="getDeptName"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="clickFormSearch"></el-button>
</el-form-item>
</el-form>
<!-- end form search -->
<!-- start btn group -->
<el-row class="table-control">
<el-col :span="18">
<!-- <el-button icon="el-icon-plus" size="small" type="primary" plain @click="clickAdd"></el-button>-->
</el-col>
<el-col :span="6"></el-col>
</el-row>
<!-- end btn group -->
<!-- start table -->
<article class="table-data">
<el-table :data="tableData" border style="width: 100%">
<el-table-column type="index" label="序号" width="90"></el-table-column>
<!-- <el-table-column prop="id" label="id" width="90"></el-table-column>-->
<el-table-column prop="recruitUnit.name" label="招聘单位" width="90"></el-table-column>
<el-table-column prop="jobName" label="岗位名称" width="90"></el-table-column>
<el-table-column prop="workTime" label="兼职时间" width="90"></el-table-column>
<el-table-column prop="location" label="地点" width="90"></el-table-column>
<el-table-column prop="label" label="兼职标签" width="120"></el-table-column>
<el-table-column prop="detail" label="岗位描述" width="70"></el-table-column>
<el-table-column prop="requirement" label="岗位要求" width="120"></el-table-column>
<el-table-column prop="salaryTreatment" label="薪资待遇" width="100"></el-table-column>
<el-table-column prop="status" label="岗位状态" width="200" :formatter="formatStatus"></el-table-column>
<el-table-column prop="needResumeAttachment" label="是否需要简历附件" width="100"></el-table-column>
<el-table-column prop="wechat" label="WeChat" width="100"></el-table-column>
<el-table-column prop="creator" label="创建人" align="center" width="150"></el-table-column>
<el-table-column prop="create_time" label="创建日期" align="center" width="180" sortable></el-table-column>
<el-table-column prop="updator" label="更新人" align="center" width="100"></el-table-column>
<el-table-column prop="update_time" label="更新时间" align="center" width="180"></el-table-column>
<!-- <el-table-column prop="status" label="状态" width="90">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag effect="dark" :type="scope.row.status === '0' ? 'success' : 'warning'" size="mini">{{scope.row.status | changeToText1}}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button type="danger" @click="clickDelete(scope.row)" size="mini" plain icon="el-icon-delete" circle title="删除"></el-button>
<!-- <el-button size="mini" @click="clickEdit(scope.row)" circle icon="el-icon-edit" title="编辑"></el-button>-->
</template>
</el-table-column>
</el-table>
</article>
<!-- end table -->
<!-- start pagination -->
<el-pagination :current-page="1" :page-sizes="[10, 20, 30, 40]" :page-size="1" layout="total, sizes, prev, pager, next, jumper" :total="4" class="table-pagination">
</el-pagination>
<!-- end pagination -->
<!-- start 新增模态窗 -->
<el-dialog title="职员信息" :visible.sync="modalAdd" width="1100px" :append-to-body="true" :close-on-click-modal="false">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm" label-suffix="">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="编号" prop="code">
<el-input v-model="ruleForm.code" placeholder="请输入编号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名" prop="name">
<el-input v-model="ruleForm.name" placeholder="请输入姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别" prop="sex">
<!-- <el-input v-model="ruleForm.sex" placeholder="请输入性别"></el-input> -->
<el-radio-group v-model="ruleForm.sex">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="身份证号码" prop="idcard">
<el-input v-model="ruleForm.idcard" placeholder="请输入电话"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="电话" prop="phone">
<el-input v-model="ruleForm.phone" placeholder="请输入电话"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="邮箱" prop="email">
<el-input v-model="ruleForm.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系地址" prop="address">
<el-input v-model="ruleForm.address" placeholder="请输入地址"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="QQ" prop="qq">
<el-input v-model="ruleForm.qq" placeholder="请输入qq"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="wechat" prop="wechat">
<el-input v-model="ruleForm.wechat" placeholder="请输入微信"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="入职时间" prop="hiredate">
<el-date-picker v-model="ruleForm.hiredate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"> </el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="状态" prop="status">
<el-radio-group v-model="ruleForm.status">
<el-radio label="0">有效</el-radio>
<el-radio label="1">停用</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="deptId">
<el-select v-model="ruleForm.deptId" placeholder="请选择">
<el-option
v-for="item in deptOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="角色" prop="roleId">
<el-select v-model="ruleForm.roleId" placeholder="请选择">
<el-option
v-for="item in roleOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item label="允许登录" prop="isUser">
<el-radio-group v-model="ruleForm.isUser">
<el-radio label="0">允许</el-radio>
<el-radio label="1">不允许</el-radio>
</el-radio-group>
</el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="创建人" prop="createdBy">
{{ruleForm.createdBy}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间" prop="creationtime">
{{ruleForm.creationtime}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="更新人" prop="updatedBy">
{{ruleForm.updatedBy}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="更新时间" prop="updatedDate">
{{ruleForm.updatedDate}}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="ruleForm.remark" placeholder="请输入备注"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="initForm"> </el-button>
<el-button type="primary" @click=" dialogType === 'add' ? addPerson('ruleForm') : updatePerson('ruleForm') "> </el-button>
</span>
</el-dialog>
<!-- end 新增模态窗 -->
</section>
</template>
<script>
export default {
name: 'PersonnelList', //
data() {
return {
modalAdd: false,
pageCurrent: 1,//
pageSize: 50,//
count: 0,//
loadingDept:false,
deptOptions:[],
roleOptions:[],
formInline: {
name: '',
code: '',
deptId: '',
},
ruleForm: {
code:'',
name: '',
sex:'',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
},
rules: {
hiredate:[
{
required: true,
message: '请选择',
trigger: 'blur'
}
],
status:[
{
required: true,
message: '请选择',
trigger: 'blur'
}
],
name: [{
required: true,
message: '请输入姓名',
trigger: 'blur'
}],
idcard:[{
required: true,
message: '请输入身份证',
trigger: 'blur'
}],
phone: [{
required: true,
message: '请输入手机号码',
trigger: 'blur'
}],
deptId: [{
required: true,
message: '请选择部门',
trigger: 'change'
}],
roleId: [{
required: true,
message: '请选择角色',
trigger: 'change'
}],
},
tableData: []
}
},
methods: {
formatStatus(row) {
if (row.status === '1'){
return '已发布';
}else if (row.status === '2'){
return '已关闭';
}else if (row.status === '3'){
return '已删除';
}
},
clickAdd() {
this.dialogType = "add";
this.modalAdd = true;
},
addPerson(formName){
this.$refs[formName].validate((valid) => {
console.log('5555555'+JSON.stringify(this.ruleForm));
if (valid) {
this.$axios.post("/proStaff/add", this.ruleForm).then((res) => {
if (res.code == 10000) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("添加成功");
this.initForm();
this.queryList({
code: this.ruleForm.code,
name: this.ruleForm.name,
sex: this.ruleForm.sex,
idcard: this.ruleForm.idcard,
phone: this.ruleForm.phone,
email: this.ruleForm.email,
});
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
clickEdit(params) {
console.log("点击编辑按钮");
this.dialogType = "edit";
this.modalAdd = true; //
console.log("编辑传入的参数", params);
Object.assign(this.ruleForm, params); //
console.log("点击编辑", this.ruleForm);
},
updatePerson(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.$axios.post("/proStaff/edit", this.ruleForm).then((res) => {
if (res.code == 10000) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("更新成功");
this.initForm();
this.queryList({
code: this.ruleForm.code,
name: this.ruleForm.name,
sex: this.ruleForm.sex,
idcard: this.ruleForm.idcard,
phone: this.ruleForm.phone,
email: this.ruleForm.email,
});
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
//
initForm() {
this.modalAdd = false;
this.resetEdit();
},
resetEdit(){
return (this.ruleForm = {
code:'',
name: '',
sex:'',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
});
},
//
clickFormSearch() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
},
queryList(data) {
this.$axios.post("/jobInfo/list", data).then((res) => {
if (res.code == 200) {
this.tableData = res.data.records;
console.log('eeeeeeeeeeeeeee'+JSON.stringify(this.tableData));
this.count = res.total;
//
this.pageCurrent = res.current;
console.log("查找成功");
}else{
this.$message({
type: 'erro',
message: '查询失败!'
});
}
});
},
clickDelete(row) {
this.$confirm('此操作将永久删除此项, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row);
this.deletePerson(row);
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
deletePerson(data){
this.$axios.delete("/proStaff/delete/" + data.id).then((res) => {
if (res.code == 200) {
this.$message.success("删除成功");
if (
(this.pageCurrent * this.pageSize - this.count) % this.pageSize ==
this.pageSize - 1
) {
this.pageCurrent -= 1;
}
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
}else{
this.$message.error("删除失败请联系管理员");
}
});
},
queryDept(){
var list = [];//
var states = [];
console.log("222222222")
let a ={};
this.loadingDept = true;//
this.$axios.post("/proDept/list",a).then((res) => {
if (res.code == 200) {
states = res.data.records;
list = states.map(item => {
console.log('33333344'+item.name);
return {
value: `${item.id}`,
label: `${item.name}` };
});
setTimeout(() => {
this.loadingDept = false;
this.deptOptions = list;
}, 200);
console.log(list);
}
});
},
queryRole(params){
console.log('ppppp'+params);
if(params == null){
params={}
}
var list = [];//
var states = [];
console.log("222222222")
// let a ={};
//this.loadingDept = true;//
this.$axios.post("/proRole/list",params).then((res) => {
if (res.code == 200) {
states = res.data.records;
list = states.map(item => {
return {
value: `${item.id}`,
label: `${item.name}` };
});
setTimeout(() => {
//this.loadingDept = false;
this.roleOptions = list;
}, 200);
}
});
},
getDeptName(deptName){
let deptOption = {};
deptOption = this.deptOptions.find((item) => {
return item.value == deptName;
});
this.ruleForm.deptName = deptOption.label;
},
},
filters: {
changeToText1(value) {
if (value == '0')
return '正常'
else if (value == '1') {
return '停用'
}
},
changeToText3(value) {
if (value == '0')
return '销售部'
else if (value == '1') {
return '设计部'
}else if (value == '2') {
return '生产部'
}
else if (value == '3') {
return '财务部'
}
else if (value == '4') {
return '总经办'
}
},
},
mounted() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
this.queryDept();
this.queryRole();
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.personnel-list {}
</style>

@ -0,0 +1,203 @@
<template>
<section class="department-list">
<!-- start btn group -->
<el-row class="table-control">
<el-col :span="18">
<el-button icon="el-icon-plus" size="small" type="primary" plain @click="clickAdd"></el-button>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<!-- end btn group -->
<!-- start table -->
<article class="table-data">
<el-table :data="data" border style="width: 100%">
<!-- <el-table-column type="index" label="序号" width="150"></el-table-column>-->
<el-table-column prop="id" label="id" width="220"></el-table-column>
<el-table-column prop="name" label="名称" width="220"></el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button type="danger" @click="clickDelete(scope.row)" size="mini" plain icon="el-icon-delete" circle title="删除"></el-button>
<el-button size="mini" @click="clickEdit(scope.row)" circle icon="el-icon-edit" title="编辑"></el-button>
</template>
</el-table-column>
</el-table>
</article>
<!-- end table -->
<!-- start pagination 分页-->
<el-pagination
:current-page="pageCurrent" :page-sizes="[50, 100, 200]" :page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="count"
class="table-pagination">
</el-pagination>
<!-- end pagination -->
<!-- start 新增模态窗 -->
<el-dialog title="标签信息" :visible.sync="modalAdd" width="480px" :append-to-body="true" :close-on-click-modal="false">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px" class="demo-ruleForm" label-suffix="">
<el-form-item label="名称" prop="name">
<el-input v-model="ruleForm.name" placeholder="请输入标签名称" style="width:280px;" maxlength="20" show-word-limit></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="initForm"> </el-button>
<el-button type="primary" @click=" dialogType === 'add' ? addDept() : updateDept() "> </el-button>
</span>
</el-dialog>
<!-- end 新增模态窗 -->
</section>
</template>
<script>
export default {
name: 'DepartmentList', //
data() {
return {
modalAdd: false,
pageCurrent: 1,//
pageSize: 50,//
count: 0,//
ruleForm: {
name:'',
},
rules: {
name: [{
required: true,
message: '请输入部门名称',
trigger: 'blur'
}],
},
data: []
}
},
methods: {
clickAdd() {
this.dialogType = "add";
this.modalAdd = true;
},
addDept(){
console.log('val' , this.ruleForm)
this.$axios.post("/jobLabel/add", this.ruleForm).then((res) => {
if (res.code == 200){
this.modalAdd = false;
this.$message.success("操作成功");
this.queryJobLabelList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
this.ruleForm = {
name:'',
};
}else {
this.$message.error("操作失败");
}
});
},
clickEdit(params) {
console.log("点击编辑按钮");
this.dialogType = "edit";
this.modalAdd = true; //
console.log("编辑传入的参数", params);
Object.assign(this.ruleForm, params); //
console.log("点击编辑", this.ruleForm);
},
updateDept(){
console.log('this.ddddd' ,this.ruleForm )
this.$axios.post("/jobLabel/edit", this.ruleForm).then((res) => {
if (res.code == 200){
this.modalAdd = false;
this.$message.success("操作成功");
this.queryJobLabelList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
this.ruleForm = {
name:'',
};
}else {
this.$message.error("操作失败");
}
});
},
//
initForm() {
this.modalAdd = false;
this.resetEdit();
},
resetEdit(){
return (this.ruleForm = {
code:'',
name:'',
leader:'',
parentId:'',
remarks: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
});
},
queryJobLabelList(data) {
this.$axios.post("/jobLabel/list", data).then((res) => {
if (res.code == 200) {
this.data = res.data.records;
//this.count = res.total;
console.log("查找成功");
}else{
this.$message({
type: 'erro',
message: '查询失败!'
});
}
});
},
clickDelete(row) {
this.$confirm('此操作将永久删除此项, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row);
this.deleteRole(row);
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
deleteRole(val){
console.log('val' , val)
this.$axios.delete("/jobLabel/delete/"+val.id).then((res) => {
if (res.code == 200) {
this.queryJobLabelList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
this.$message.success("操作成功");
}else{
this.$message.error("操作失败");
}
});
},
},
mounted() {
this.queryJobLabelList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.department-list {}
</style>

@ -0,0 +1,170 @@
<template>
<section class="message">
<el-page-header @back="goBack" :content="pageName"></el-page-header>
<el-tabs tab-position="left" v-model="activeName" @tab-click="tabClick" class="main-tabs">
<el-tab-pane label="个人资料" name="first">个人资料</el-tab-pane>
<el-tab-pane label="设置" name="second">设置</el-tab-pane>
<el-tab-pane label="消息管理" name="third">
<el-tabs v-model="activeName2" type="card" class="tabs-sub">
<el-tab-pane label="全部通知" name="first">
<!-- start 消息列表 -->
<ul class="message-list">
<li v-for="item in 3" :key="item" class="no-read">
<span class="message-type-icon"><img src="../../static/images/icon_message_order.png" alt="订单通知"></span>
<div class="message-content">
<h3>[订单通知]</h3>
<p>您有一条来自报价员张三丰创建的订单订单编号<router-link to="/order-management/order-list">TC-ABB202010161534</router-link>20201016 15:21:44
</p>
</div>
</li>
<li class="has-read" v-for="item in 2" :key="item">
<span class="message-type-icon"><img src="../../static/images/icon_message_system.png" alt="系统消息"></span>
<div class="message-content">
<h3>[系统消息]</h3>
<p>您有一条来自报价员张三丰创建的订单订单编号<router-link to="/order-management/order-list">TC-ABB202010161534</router-link>20201016 15:21:44
</p>
</div>
</li>
<li class="has-read" v-for="item in 4" :key="item">
<span class="message-type-icon"><img src="../../static/images/icon_message_finance.png" alt="财务通知"></span>
<div class="message-content">
<h3>[财务通知]</h3>
<p>您有一条来自报价员张三丰创建的订单订单编号<router-link to="/order-management/order-list">TC-ABB202010161534</router-link>20201016 15:21:44
</p>
</div>
</li>
<li class="has-read" v-for="item in 2" :key="item">
<span class="message-type-icon"><img src="../../static/images/icon_message_stock.png" alt="库管通知"></span>
<div class="message-content">
<h3>[库管通知]</h3>
<p>您有一条来自报价员张三丰创建的订单订单编号<router-link to="/order-management/order-list">TC-ABB202010161534</router-link>20201016 15:21:44
</p>
</div>
</li>
</ul>
<!-- end 消息列表 -->
<!-- start 分页 -->
<el-pagination background layout="prev, pager, next" :total="1000">
</el-pagination>
<!-- end 分页 -->
</el-tab-pane>
<el-tab-pane label="订单通知" name="second">订单通知</el-tab-pane>
<el-tab-pane label="系统消息" name="third">系统消息</el-tab-pane>
<el-tab-pane label="财务通知" name="fourth">财务通知</el-tab-pane>
<el-tab-pane label="库管消息" name="five">库管消息</el-tab-pane>
</el-tabs>
</el-tab-pane>
</el-tabs>
</section>
</template>
<script>
export default {
name: 'Message',
data() {
return {
activeName: 'third',
activeName2: 'first',
pageName: '消息管理'
}
},
methods: {
goBack() {
this.$router.back(-1)
},
tabClick(tab, event) {
// console.log(tab, event);
console.log(tab.label, event);
this.pageName = tab.label
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.message {
// padding: 16px;
flex-flow: column;
display: flex;
overflow: hidden;
/deep/.main-tabs {
flex: 1;
display: flex;
.el-tabs__header.is-left {
width: 260px;
margin-right: 0;
background-color: #FFF;
.el-tabs__nav-wrap.is-left {
height: 100%;
}
}
> .el-tabs__content {
flex: 1;
overflow-y: auto;
> .el-tab-pane {
background-color: #FFF;
padding: 16px;
overflow: hidden;
}
.el-tabs--top {}
}
}
.message-list {
list-style: none;
> li {
display: flex;
align-items: center;
margin-bottom: 16px;
padding: 16px;
border-radius: 4px;
transition: all 0.2s;
border-bottom: 1px dashed @color-border-lighter;
&:hover {
background-color: @color-body-bg;
}
.message-type-icon {
width: 48px;
height: 48px;
overflow: hidden;
margin-right: 16px;
> img {
display: block;
width: 100%;
height: 100%;
}
}
.message-content {
> h3 {
font-size: 16px;
margin-bottom: 5px;
}
}
&.no-read {
background-color: fade(@color-warning,5%);
.message-content {
> h3 {
font-weight: 800;
}
> p {
opacity: 1;
}
}
}
&.has-read {
.message-content {
> h3 {
font-weight: lighter;
}
> p {
opacity: 0.6;
}
}
}
}
}
}
</style>

@ -0,0 +1,148 @@
<template>
<header class="header">
<a class="btn-header-menu" @click="toggleMenuClick"><i class="el-icon-s-unfold"></i></a>
<!-- <h1 class="logo" @click="linkToHome">-->
<!-- <img src="../static/images/logo.png" alt="">-->
<!-- </h1>-->
<h1 style=" margin-right: 20px;
display: flex;
align-items: center;
cursor: pointer;" @click="linkToHome">
兼职平台后台管理
</h1>
<!-- <div class="location">广州新塘店<el-dropdown>-->
<!-- <span class="el-dropdown-link">-->
<!-- 切换<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
<!-- </span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item>广州越秀店</el-dropdown-item>-->
<!-- <el-dropdown-item>广州新塘店</el-dropdown-item>-->
<!-- <el-dropdown-item>广州增城店</el-dropdown-item>-->
<!-- <el-dropdown-item divided>深圳福田店</el-dropdown-item>-->
<!-- <el-dropdown-item>深圳南山店</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!-- </div>-->
<div class="user-status">
<!-- <span>您好管理员</span>-->
<el-dropdown title="切换角色">
<!-- <span class="el-dropdown-link">-->
<!-- 超级管理员<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
<!-- </span>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item>超级管理员</el-dropdown-item>-->
<!-- <el-dropdown-item divided>财务</el-dropdown-item>-->
<!-- <el-dropdown-item>报价员</el-dropdown-item>-->
<!-- <el-dropdown-item>业务员</el-dropdown-item>-->
<!-- <el-dropdown-item divided>生产主管</el-dropdown-item>-->
<!-- <el-dropdown-item>工程师</el-dropdown-item>-->
<!-- <el-dropdown-item divided>送货员</el-dropdown-item>-->
<!-- <el-dropdown-item>工序员工</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
</el-dropdown>
<!-- <el-badge :value="3" :max="10" style="margin-left:24px;">-->
<!-- <el-button type="text" @click="clickToMessage"></el-button>-->
<!-- </el-badge>-->
<!-- <el-button type="text" style="margin-left:24px;" @click="clickToMessage"></el-button>-->
普通管理员
<el-button type="info" style="margin-left:24px;" @click="clickLogout">退</el-button>
</div>
</header>
</template>
<script>
// import { config } from 'vue/types/umd';
export default {
name: 'PageHeader',
data() {
return {
user: "我当前的身份是超级管理员", //
}
},
methods: {
linkToHome() {
this.$router.push('/');
},
clickToMessage() {
this.$router.push('/messages/message');
},
toggleMenuClick() {
this.$emit('toggleMenuClick', this.user)
},
async clickLogout() {
let res = await this.$confirm("此操作将退出系统, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
});
if (res == "confirm") {
window.sessionStorage.clear();
this.$router.push("/login");
}
},
},
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.header {
padding: 0 20px;
display: flex;
align-items: center;
box-shadow: 0 1px 15px rgba(0, 0, 0, .10);
position: relative;
z-index: 500;
height: 55px;
.btn-header-menu {
font-size: 24px;
margin-left: -20px;
margin-right: 16px;
padding: 0 20px;
height: 55px;
display: flex;
align-items: center;
overflow: hidden;
transition: all 0.15s;
cursor: pointer;
&:hover {
background-color: @color-primary;
color: #FFF;
}
}
.logo {
margin-right: 20px;
display: flex;
align-items: center;
cursor: pointer;
}
.location {
margin-right: 20px;
.el-dropdown-link {
color: @color-primary;
margin-left: 16px;
cursor: pointer;
&::before {
content: "[";
}
&::after {
content: "]";
}
}
}
.user-status {
margin-left: auto;
.el-dropdown-link {
color: @color-primary;
margin-left: 16px;
cursor: pointer;
&::before {
content: "[";
}
&::after {
content: "]";
}
}
}
}
</style>

@ -0,0 +1,20 @@
<template>
<section class="hello">
哈罗世界
</section>
</template>
<script>
export default {
name: 'hello',
data() {
return {}
},
methods: {}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.hello {}
</style>

@ -0,0 +1,187 @@
<template>
<figure class="radar" id="myChart2">
折线图
</figure>
</template>
<script>
export default {
name: "ChartsLine",
components: {},
methods: {
drawLine() {
// domecharts
let myChart = this.$echarts.init(
document.getElementById("myChart2"),
"light"
);
var indicator = [{
text: '不锈钢304',
max: 6000,
},
{
text: '铜柱4mm*6mm',
max: 5000
},
{
text: '镀锌铁皮1000mm*3卷',
max: 5000
},
{
text: '铁皮',
max: 5000,
// axisLabel: {
// show: true,
// textStyle: {
// fontSize: 12,
// color: '#333'
// }
// }
},
{
text: '不锈钢404',
max: 5000
},
{
text: '铜皮',
max: 5000
}
];
var dataArr = [{
value: [4300, 4700, 4600, 3900, 3800, 4200],
name: '昨日库存',
areaStyle: {
normal: { //
color: {
type: 'linear',
x: 0, //
y: 0, //
x2: 1, //
y2: 1, //
colorStops: [{
offset: 0,
color: '#6CDEB0'
}, {
offset: 1,
color: '#B9F39C'
}],
globalCoord: false
},
opacity: .6 //
}
}
},
{
value: [3200, 3000, 3400, 2000, 2900, 2000],
name: '今日剩余',
areaStyle: {
normal: { //
color: {
type: 'linear',
x: 1, //
y: 1, //
x2: 0, //
y2: 0, //
colorStops: [{
offset: 0,
color: '#00C8EE'
}, {
offset: 1,
color: '#3E82EE'
}],
globalCoord: false
},
opacity: .3 //
}
}
}
];
var colorArr = ['#6CDEB0', '#00C8EE']; //
//
myChart.setOption({
// backgroundColor: '#101736',
color: colorArr,
tooltip: {},
legend: {
orient: 'vertical',
// icon: 'circle', //
// data: ['', ''], //
data: [{
name: "昨日库存",
icon: 'circle'
}, {
name: "今日剩余",
icon: 'circle'
}],
top: 0,
left: 0,
itemWidth: 14, // [ default: 25 ]
itemHeight: 14, // [ default: 14 ]
itemGap: 21, // [ default: 10 ]
textStyle: {
fontSize: 14,
color: '#999',
},
},
radar: {
// shape: 'circle',
name: {
textStyle: {
color: '#ccc',
fontSize: 14
},
},
indicator: indicator,
splitArea: { // grid
show: true,
areaStyle: { //
color: ['rgba(255,255,255,0)', 'rgba(255,255,255,0)'], //
}
},
axisLine: { //线
lineStyle: {
color: '#eee',
type: "dashed",
width: 1, // 线线
}
},
splitLine: {
lineStyle: {
color: '#eee', // 线
width: 1, // 线线
type: "dashed",
}
},
},
series: [{
type: 'radar',
symbolSize: 10,
// symbol: 'circle',
data: dataArr
}]
});
}
},
mounted() {
this.drawLine();
let myChart = this.$echarts.init(
document.getElementById("myChart"),
"light"
);
window.onresize = () => {
myChart.resize();
}; //resizeSelftrue,
if (this.resizeSelf) {
myChart.resize();
}
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.radar {
height: 350px;
width: 100%;
}
</style>

@ -0,0 +1,768 @@
<template>
<section class="personnel-list">
<!-- start form search -->
<el-form :inline="true" :model="formInline" label-width="80px" size="small" class="search-form" label-suffix="">
<el-form-item label="编号">
<el-input v-model="formInline.name" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="formInline.code" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<el-form-item label="企业">
<el-input v-model="formInline.code" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<!-- <el-form-item label="部门" prop="deptId">-->
<!-- <el-select-->
<!-- v-model="formInline.deptId"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable-->
<!-- reserve-keyword-->
<!-- placeholder="请输入关键词"-->
<!-- :remote-method="queryDept"-->
<!-- :loading="loadingDept"-->
<!-- @change="getDeptName"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="clickFormSearch"></el-button>
</el-form-item>
</el-form>
<!-- end form search -->
<!-- start btn group -->
<el-row class="table-control">
<el-col :span="18">
<el-button icon="el-icon-plus" size="small" type="primary" plain @click="clickAdd">HR</el-button>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<!-- end btn group -->
<!-- start table -->
<article class="table-data">
<el-table :data="tableData" border style="width: 100%" :fit="true">
<!-- <el-table-column prop="id" label="hrid" ></el-table-column>-->
<el-table-column prop="userId" label="编号" ></el-table-column>
<el-table-column prop="username" label="用户名" ></el-table-column>
<el-table-column prop="name" label="姓名" ></el-table-column>
<el-table-column prop="sex" label="性别" :formatter="sexFormatter"></el-table-column>
<el-table-column prop="unitName" label="所属单位" ></el-table-column>
<el-table-column prop="createTime" label="注册时间" ></el-table-column>
<!-- <el-table-column prop="status" label="状态" >-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag effect="dark" size="mini">{{scope.row.status | changeToText1}}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" >
<template slot-scope="scope">
<!-- <el-button type="danger" @click="clickDelete(scope.row)" size="mini" plain icon="el-icon-delete" circle title="删除"></el-button>-->
<!-- <el-button size="mini" @click="clickEdit(scope.row)" circle icon="el-icon-edit" title="编辑"></el-button>-->
<!-- <el-tooltip class="item" effect="dark" content="分配角色" placement="top" :enterable="false">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="mini"-->
<!-- icon="el-icon-s-tools"-->
<!-- @click="assignRoles(scope.row.id)"-->
<!-- >分配角色</el-button>-->
<!-- </el-tooltip>-->
<el-button
@click="clickDelete(scope.row)"
type="text"
icon="el-icon-delete"
size="small"
>删除</el-button>
<el-button
@click="clickEdit(scope.row)"
type="text"
icon="el-icon-edit"
size="small"
>编辑</el-button>
<el-button
@click="assignRoles(scope.row)"
type="text"
icon="el-icon-s-tools"
size="small"
>分配角色</el-button>
</template>
</el-table-column>
</el-table>
</article>
<!-- end table -->
<!-- start pagination -->
<el-pagination :current-page="1" :page-sizes="[10, 20, 30, 40]" :page-size="1" layout="total, sizes, prev, pager, next, jumper" :total="4" class="table-pagination">
</el-pagination>
<!-- end pagination -->
<!-- start 新增模态窗 -->
<el-dialog title="职员信息" :visible.sync="modalAdd" width="1100px" :append-to-body="true" :close-on-click-modal="false">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm" label-suffix="">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="用户名" prop="username">
<el-input v-model="ruleForm.username" placeholder="请输入用户名" :disabled="dialogType=== 'add' ? false :true "></el-input>
</el-form-item>
</el-col>
<el-col :span="8" :hidden="dialogType=== 'add' ? false :true">
<el-form-item label="密码" prop="password" >
<el-input v-model="ruleForm.password" placeholder="请输入密码" ></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="状态" prop="status">-->
<!-- <el-radio-group v-model="ruleForm.status">-->
<!-- <el-radio :label="1">有效</el-radio>-->
<!-- <el-radio :label="0">停用</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</el-form>
<el-form :model="ruleForm2" :rules="rules" ref="ruleForm2" label-width="130px" class="demo-ruleForm" label-suffix="">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="编号" prop="id">
<el-input v-model="ruleForm2.id" placeholder="" disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名" prop="name">
<el-input v-model="ruleForm2.name" placeholder="请输入姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别" prop="sex">
<el-radio-group v-model="ruleForm2.sex">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="电话" prop="phone">
<el-input v-model="ruleForm2.phone" placeholder="请输入电话"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="邮箱" prop="email">
<el-input v-model="ruleForm2.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="QQ" prop="qq">
<el-input v-model="ruleForm2.qq" placeholder="请输入QQ"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="wechat" prop="wechat">
<el-input v-model="ruleForm2.wechat" placeholder="请输入微信"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="入职时间" prop="hiredate">-->
<!-- <el-date-picker v-model="ruleForm.hiredate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"> </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="部门" prop="deptId">-->
<!-- <el-select v-model="ruleForm.deptId" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in deptOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="角色" prop="roleId">-->
<!-- <el-select v-model="ruleForm.roleId" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in roleOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">
<el-form-item label="允许登录" prop="isUser">
<el-radio-group v-model="ruleForm.isUser">
<el-radio label="0">允许</el-radio>
<el-radio label="1">不允许</el-radio>
</el-radio-group>
</el-form-item>
</el-col> -->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="创建人" prop="createdBy">-->
<!-- {{ruleForm.createdBy}}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="创建时间" prop="creationtime">-->
<!-- {{ruleForm.creationtime}}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="更新人" prop="updatedBy">-->
<!-- {{ruleForm.updatedBy}}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="更新时间" prop="updatedDate">-->
<!-- {{ruleForm.updatedDate}}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="备注" prop="remark">-->
<!-- <el-input type="textarea" v-model="ruleForm.remark" placeholder="请输入备注"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click=" dialogType === 'add' ? addPerson('ruleForm') : updatePerson('ruleForm') "> </el-button>
</span>
</el-dialog>
<!-- end 新增模态窗 -->
<!--start role set 角色分配模态窗-->
<el-dialog center title="分配角色" @close="closeAssignDialog" :visible.sync="assignDialogVisible" width="800px" :append-to-body="true" :close-on-click-modal="false">
<span>
<template>
<el-transfer
class="transfer"
filterable
:titles="['未拥有','已拥有']"
:button-texts="['到左边', '到右边']"
v-model="value"
:data="roles"
></el-transfer>
</template>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="assignDialogVisible = false" class="el-icon-close">取消分配</el-button>
<el-button
v-hasPermission="'user:assign'"
type="primary"
@click="doAssignRoles"
class="el-icon-check"
:loading="btnLoading"
:disabled="btnDisabled"
>确定分配</el-button>
</span>
</el-dialog>
<!--end role set-->
</section>
</template>
<script>
export default {
name: 'PersonnelList', //
data() {
return {
modalAdd: false,
pageCurrent: 1,//
pageSize: 50,//
count: 0,//
loadingDept:false,
deptOptions:[],
roleOptions:[],
formInline: {
name: '',
code: '',
deptId: '',
},
ruleForm: {
code:'',
name: '',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
},
ruleForm2: {
code:'',
name: '',
sex:'0',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
sno:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
},
rules: {
hiredate:[
{
required: true,
message: '请选择',
trigger: 'blur'
}
],
status:[
{
required: true,
message: '请选择',
trigger: 'blur'
}
],
name: [{
required: true,
message: '请输入姓名',
trigger: 'blur'
}],
idcard:[{
required: true,
message: '请输入身份证',
trigger: 'blur'
}],
phone: [{
required: true,
message: '请输入手机号码',
trigger: 'blur'
}],
deptId: [{
required: true,
message: '请选择部门',
trigger: 'change'
}],
roleId: [{
required: true,
message: '请选择角色',
trigger: 'change'
}],
},
tableData: [],
dialogType:true,//
assignDialogVisible: false, //
roles: [], //
value: [], //
btnLoading: false,
btnDisabled: false,
uid: "",//userid
zzid:'',//id
}
},
methods: {
roleFormatter(row){
var a = this.roleOptions
var role = a.filter((p)=>{
return p.value == row.roleId;
});
return role[0].label;
},
deptFormatter(row){
var a = this.deptOptions
console.log('000000000000'+JSON.stringify(row));
var dept = a.filter((p)=>{
return p.value == row.deptId;
});
return dept[0].label;
},
sexFormatter(row) {
console.log(row.sex+'33333');
if(row.sex==0){
return '男';
}else{
return '女';
}
},
clickAdd() {
this.dialogType = "add";
this.modalAdd = true;
},
addPerson(formName){
this.$refs[formName].validate((valid) => {
console.log('5555555'+JSON.stringify(this.ruleForm));
if (valid) {
this.$axios.post("/proStaff/add", this.ruleForm).then((res) => {
if (res.code == 10000) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("添加成功");
this.initForm();
this.queryList({
code: this.ruleForm.code,
name: this.ruleForm.name,
sex: this.ruleForm.sex,
idcard: this.ruleForm.idcard,
phone: this.ruleForm.phone,
email: this.ruleForm.email,
});
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
clickEdit(params) {
console.log("点击编辑按钮");
this.dialogType = "edit";
this.modalAdd = true; //
console.log("编辑传入的参数", params);
Object.assign(this.ruleForm, params); //
Object.assign(this.ruleForm2, params); //
console.log("点击编辑", this.ruleForm);
},
updatePerson(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.$axios.post("/hrInfo/edit", this.ruleForm2).then((res) => {
if (res.code == 10000) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("更新成功");
this.initForm();
this.queryList({
// code: this.ruleForm.code,
// name: this.ruleForm.name,
// sex: this.ruleForm.sex,
// idcard: this.ruleForm.idcard,
// phone: this.ruleForm.phone,
// email: this.ruleForm.email,
});
this.closeDialog()
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
//
initForm() {
//this.modalAdd = false;
this.resetEdit();
},
closeDialog(){
this.modalAdd = false;
},
resetEdit(){
return (this.ruleForm = {
code:'',
name: '',
sex:'',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
});
},
//
clickFormSearch() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
code: this.formInline.code,
name: this.formInline.name,
deptId: this.formInline.deptId,
});
},
queryList(data) {
this.$axios.post("/hrInfo/list", data).then((res) => {
if (res.code == 200) {
this.tableData = res.data.records;
console.log('eeeeeeeeeeeeeee'+JSON.stringify(this.tableData));
this.count = res.total;
//
this.pageCurrent = res.current;
console.log("查找成功");
}else{
this.$message({
type: 'erro',
message: '查询失败!'
});
}
});
},
clickDelete(row) {
this.$confirm('此操作将永久删除此项, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row);
this.deletePerson(row);
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
deletePerson(data){
this.$axios.delete("/proStaff/delete/" + data.id).then((res) => {
if (res.code == 200) {
this.$message.success("删除成功");
if (
(this.pageCurrent * this.pageSize - this.count) % this.pageSize ==
this.pageSize - 1
) {
this.pageCurrent -= 1;
}
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
}else{
this.$message.error("删除失败请联系管理员");
}
});
},
queryDept(){
var list = [];//
var states = [];
console.log("222222222")
let a ={};
this.loadingDept = true;//
this.$axios.post("/proDept/list",a).then((res) => {
if (res.code == 200) {
states = res.data.records;
list = states.map(item => {
console.log('33333344'+item.name);
return {
value: `${item.id}`,
label: `${item.name}` };
});
setTimeout(() => {
this.loadingDept = false;
this.deptOptions = list;
}, 200);
console.log(list);
}
});
},
queryRole(params){
console.log('ppppp'+params);
if(params == null){
params={}
}
var list = [];//
var states = [];
console.log("222222222")
// let a ={};
//this.loadingDept = true;//
this.$axios.post("/proRole/list",params).then((res) => {
if (res.code == 200) {
states = res.data.records;
list = states.map(item => {
return {
value: `${item.id}`,
label: `${item.name}` };
});
setTimeout(() => {
//this.loadingDept = false;
this.roleOptions = list;
}, 200);
}
});
},
getDeptName(deptName){
let deptOption = {};
deptOption = this.deptOptions.find((item) => {
return item.value == deptName;
});
this.ruleForm.deptName = deptOption.label;
},
/**
* 弹出用户分配角色
*/
async assignRoles(val) {
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
console.log('this.$store.state.config.userInfo;' , this.$store.state.config.userInfo)
this.zzid = val.userId
let res = await this.$axios.get("user/" + val.userId + "/roles").catch(err=>{
loading.close();
});
console.log(res)
if (res.code == 200) {
this.roles = res.data.roles;
this.value = res.data.values;
this.uid = this.$store.state.config.userInfo.id;
setTimeout(() => {
loading.close();
this.assignDialogVisible = true;
}, 400);
}else{
loading.close();
}
},
/**
* 确定分配角色
*/
async doAssignRoles() {
this.assignDialogVisible = true;
this.btnLoading = true;
this.btnDisabled = true;
let res = await this.$axios.post(
"user/" + this.zzid + "/assignRoles",
this.value
);
if (res.code == 200) {
this.$message({
message: "用户分配角色成功",
type: "success",
});
} else {
this.$message.error("分配角色失败:" + res.msg);
}
this.assignDialogVisible = false;
this.btnLoading = false;
this.btnDisabled = false;
},
},
filters: {
changeToText1(value) {
if (value == '0')
return '正常'
else if (value == '1') {
return '停用'
}
},
changeToText2(value) {
if (value == '0')
return '超级管理员'
else if (value == '1') {
return '文员'
}else if (value == '2') {
return '报价员'
}else if (value == '3') {
return '采购员'
}else if (value == '4') {
return '仓管员'
}else if (value == '5') {
return '生产主管'
}else if (value == '6') {
return '工程师'
}else if (value == '7') {
return '工序员工'
}else if (value == '8') {
return '送货员'
}
},
changeToText3(value) {
if (value == '0')
return '销售部'
else if (value == '1') {
return '设计部'
}else if (value == '2') {
return '生产部'
}
else if (value == '3') {
return '财务部'
}
else if (value == '4') {
return '总经办'
}
},
},
mounted() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
this.queryDept();
this.queryRole();
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.personnel-list {}
</style>

@ -0,0 +1,772 @@
<template>
<section class="personnel-list">
<!-- start form search -->
<el-form :inline="true" :model="formInline" label-width="80px" size="small" class="search-form" label-suffix="">
<el-form-item label="学号">
<el-input v-model="formInline.name" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<el-form-item label="姓名">
<el-input v-model="formInline.code" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<!-- <el-form-item label="部门" prop="deptId">-->
<!-- <el-select-->
<!-- v-model="formInline.deptId"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable-->
<!-- reserve-keyword-->
<!-- placeholder="请输入关键词"-->
<!-- :remote-method="queryDept"-->
<!-- :loading="loadingDept"-->
<!-- @change="getDeptName"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="clickFormSearch"></el-button>
</el-form-item>
</el-form>
<!-- end form search -->
<!-- start btn group -->
<el-row class="table-control">
<el-col :span="18">
<el-button icon="el-icon-plus" size="small" type="primary" plain @click="clickAdd"></el-button>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<!-- end btn group -->
<!-- start table -->
<article class="table-data">
<el-table :data="tableData" border style="width: 100%" :fit="true">
<el-table-column prop="id" label="编号" ></el-table-column>
<el-table-column prop="username" label="用户名" ></el-table-column>
<el-table-column prop="schoolName" label="学校" ></el-table-column>
<el-table-column prop="grade" label="年级" ></el-table-column>
<el-table-column prop="sno" label="学号" ></el-table-column>
<el-table-column prop="name" label="姓名" ></el-table-column>
<el-table-column prop="sex" label="性别" :formatter="sexFormatter"></el-table-column>
<el-table-column prop="createTime" label="注册时间" width="180" ></el-table-column>
<el-table-column prop="phone" label="电话" ></el-table-column>
<el-table-column prop="email" label="邮箱" ></el-table-column>
<el-table-column prop="qq" label="QQ" ></el-table-column>
<el-table-column prop="wechat" label="WeChat" ></el-table-column>
<!-- <el-table-column prop="status" label="状态" width="90">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag effect="dark" :type="scope.row.status === '0' ? 'success' : 'warning'" size="mini">{{scope.row.status | changeToText1}}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<!-- <el-button type="danger" @click="clickDelete(scope.row)" size="mini" plain icon="el-icon-delete" circle title="删除"></el-button>-->
<!-- <el-button size="mini" @click="clickEdit(scope.row)" circle icon="el-icon-edit" title="编辑"></el-button>-->
<!-- <el-tooltip class="item" effect="dark" content="分配角色" placement="top" :enterable="false">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="mini"-->
<!-- icon="el-icon-s-tools"-->
<!-- @click="assignRoles(scope.row.id)"-->
<!-- >分配角色</el-button>-->
<!-- </el-tooltip>-->
<el-button
@click="clickDelete(scope.row)"
type="text"
icon="el-icon-delete"
size="small"
>删除</el-button>
<el-button
@click="clickEdit(scope.row)"
type="text"
icon="el-icon-edit"
size="small"
>编辑</el-button>
<el-button
@click="assignRoles(scope.row)"
type="text"
icon="el-icon-s-tools"
size="small"
>分配角色</el-button>
</template>
</el-table-column>
</el-table>
</article>
<!-- end table -->
<!-- start pagination -->
<el-pagination :current-page="1" :page-sizes="[10, 20, 30, 40]" :page-size="1" layout="total, sizes, prev, pager, next, jumper" :total="4" class="table-pagination">
</el-pagination>
<!-- end pagination -->
<!-- start 新增模态窗 -->
<el-dialog :title="dialogType=== 'add' ? '添加管理员' :'编辑管理员'" :visible.sync="modalAdd" width="1100px" :append-to-body="true" :close-on-click-modal="false">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm" label-suffix="">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="用户名" prop="username">
<el-input v-model="ruleForm.username" placeholder="请输入用户名" :disabled="dialogType=== 'add' ? false :true "></el-input>
</el-form-item>
</el-col>
<el-col :span="8" :hidden="dialogType=== 'add' ? false :true">
<el-form-item label="密码" prop="password" >
<el-input v-model="ruleForm.password" placeholder="请输入密码" ></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="状态" prop="status">-->
<!-- <el-radio-group v-model="ruleForm.status">-->
<!-- <el-radio :label="1">有效</el-radio>-->
<!-- <el-radio :label="0">停用</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</el-form>
<el-form :model="ruleForm2" :rules="rules" ref="ruleForm2" label-width="130px" class="demo-ruleForm" label-suffix="">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="编号" prop="id">
<el-input v-model="ruleForm2.id" placeholder="" disabled="true"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="学校" prop="name">-->
<!-- <el-input v-model="ruleForm2.schoolId" placeholder="请输入学校"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item label="年级" >
<el-input v-model="ruleForm2.grade" placeholder="请输入年级"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="学号" prop="sno">
<el-input v-model="ruleForm2.sno" placeholder="请输入学号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名" prop="name">
<el-input v-model="ruleForm2.name" placeholder="请输入姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别" prop="sex">
<el-radio-group v-model="ruleForm2.sex">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="电话" prop="phone">
<el-input v-model="ruleForm2.phone" placeholder="请输入电话"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="邮箱" prop="email">
<el-input v-model="ruleForm2.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="QQ" prop="qq">
<el-input v-model="ruleForm2.qq" placeholder="请输入QQ"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="wechat" prop="wechat">
<el-input v-model="ruleForm2.wechat" placeholder="请输入微信"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="入职时间" prop="hiredate">-->
<!-- <el-date-picker v-model="ruleForm.hiredate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"> </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="部门" prop="deptId">-->
<!-- <el-select v-model="ruleForm.deptId" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in deptOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="角色" prop="roleId">-->
<!-- <el-select v-model="ruleForm.roleId" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in roleOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">
<el-form-item label="允许登录" prop="isUser">
<el-radio-group v-model="ruleForm.isUser">
<el-radio label="0">允许</el-radio>
<el-radio label="1">不允许</el-radio>
</el-radio-group>
</el-form-item>
</el-col> -->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="创建人" prop="createdBy">-->
<!-- {{ruleForm.createdBy}}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="创建时间" prop="creationtime">-->
<!-- {{ruleForm.creationtime}}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="更新人" prop="updatedBy">-->
<!-- {{ruleForm.updatedBy}}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="更新时间" prop="updatedDate">-->
<!-- {{ruleForm.updatedDate}}-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="备注" prop="remark">-->
<!-- <el-input type="textarea" v-model="ruleForm.remark" placeholder="请输入备注"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog"></el-button>
<el-button type="primary" @click=" dialogType === 'add' ? addPerson('ruleForm') : updatePerson('ruleForm') ">确定</el-button>
</span>
</el-dialog>
<!-- end 新增模态窗 -->
<!--start role set 角色分配模态窗-->
<el-dialog center title="分配角色" @close="closeAssignDialog" :visible.sync="assignDialogVisible" width="800px" :append-to-body="true" :close-on-click-modal="false">
<span>
<template>
<el-transfer
class="transfer"
filterable
:titles="['未拥有','已拥有']"
:button-texts="['到左边', '到右边']"
v-model="value"
:data="roles"
></el-transfer>
</template>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="assignDialogVisible = false" class="el-icon-close">取消分配</el-button>
<el-button
v-hasPermission="'user:assign'"
type="primary"
@click="doAssignRoles"
class="el-icon-check"
:loading="btnLoading"
:disabled="btnDisabled"
>确定分配</el-button>
</span>
</el-dialog>
<!--end role set-->
</section>
</template>
<script>
export default {
name: 'PersonnelList', //
data() {
return {
modalAdd: false,
pageCurrent: 1,//
pageSize: 50,//
count: 0,//
loadingDept:false,
deptOptions:[],
roleOptions:[],
formInline: {
name: '',
code: '',
deptId: '',
},
ruleForm: {
code:'',
name: '',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
},
ruleForm2: {
code:'',
name: '',
sex:'0',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
sno:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
},
rules: {
username: [{
required: true,
message: '请输入用户名',
trigger: 'blur'
}],
phone: [{
required: true,
message: '请输入手机号码',
trigger: 'blur'
}],
},
tableData: [],
assignDialogVisible: false, //
roles: [], //
value: [], //
btnLoading: false,
btnDisabled: false,
uid: "",//userid
dialogType:true,//
zzid:'',//id
}
},
methods: {
roleFormatter(row){
var a = this.roleOptions
var role = a.filter((p)=>{
return p.value == row.roleId;
});
return role[0].label;
},
deptFormatter(row){
var a = this.deptOptions
console.log('000000000000'+JSON.stringify(row));
var dept = a.filter((p)=>{
return p.value == row.deptId;
});
return dept[0].label;
},
sexFormatter(row) {
console.log(row.sex+'33333');
if(row.sex=="0"){
return '男';
}else{
return '女';
}
},
clickAdd() {
this.dialogType = "add";
this.modalAdd = true;
this.initForm();
},
addPerson(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
console.log('nnnnnnn'+JSON.stringify(this.ruleForm2));
var zhou ={
username:this.ruleForm.username,
password:this.ruleForm.password,
status:this.ruleForm.status,
wechat:this.ruleForm2.ruleForm,
name:this.ruleForm2.name,
phone:this.ruleForm2.phone,
type:1,
schoolId:1,
sno:this.ruleForm2.sno
}
this.$axios.post("/sysUser/register", zhou).then((res) => {
if (res.code == 10000) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("添加成功");
this.initForm();
this.queryList({
// code: this.ruleForm.code,
// name: this.ruleForm.name,
// sex: this.ruleForm.sex,
// idcard: this.ruleForm.idcard,
// phone: this.ruleForm.phone,
// email: this.ruleForm.email,
});
this.closeDialog();
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
clickEdit(params) {
console.log("点击编辑按钮");
this.dialogType = "edit";
this.modalAdd = true; //
console.log("编辑传入的参数", params);
Object.assign(this.ruleForm, params); //
Object.assign(this.ruleForm2, params); //
console.log("点击编辑", this.ruleForm);
},
updatePerson(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
console.log('this.ruleForm2' , this.ruleForm2)
this.$axios.post("/jobSeeker/edit",this.ruleForm2).then((res) => {
if (res.code != 200) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("更新成功");
this.initForm();
this.queryList({
// code: this.ruleForm.code,
// name: this.ruleForm.name,
// sex: this.ruleForm.sex,
// idcard: this.ruleForm.idcard,
// phone: this.ruleForm.phone,
// email: this.ruleForm.email,
});
this.closeDialog();
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
//
initForm() {
//this.modalAdd = false;
this.resetEdit();
},
closeDialog(){
this.modalAdd = false;
},
resetEdit(){
return (this.ruleForm = {
code:'',
name: '',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
},this.ruleForm2= {
code:'',
name: '',
sex:'0',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
sno:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
});
},
//
clickFormSearch() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
code: this.formInline.code,
name: this.formInline.name,
deptId: this.formInline.deptId,
});
},
queryList(data) {
this.$axios.post("/jobSeeker/list", data).then((res) => {
if (res.code == 200) {
this.tableData = res.data.records;
//console.log('eeeeeeeeeeeeeee'+JSON.stringify(this.tableData));
this.count = res.total;
//
this.pageCurrent = res.current;
console.log("查找成功");
}else{
this.$message({
type: 'erro',
message: '查询失败!'
});
}
});
},
clickDelete(row) {
this.$confirm('此操作将永久删除此项, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row);
this.deletePerson(row);
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
deletePerson(data){
this.$axios.delete("/proStaff/delete/" + data.id).then((res) => {
if (res.code == 200) {
this.$message.success("删除成功");
if (
(this.pageCurrent * this.pageSize - this.count) % this.pageSize ==
this.pageSize - 1
) {
this.pageCurrent -= 1;
}
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
}else{
this.$message.error("删除失败请联系管理员");
}
});
},
queryDept(){
var list = [];//
var states = [];
console.log("222222222")
let a ={};
this.loadingDept = true;//
this.$axios.post("/proDept/list",a).then((res) => {
if (res.code == 200) {
states = res.data.records;
list = states.map(item => {
console.log('33333344'+item.name);
return {
value: `${item.id}`,
label: `${item.name}` };
});
setTimeout(() => {
this.loadingDept = false;
this.deptOptions = list;
}, 200);
console.log(list);
}
});
},
queryRole(params){
console.log('ppppp'+params);
if(params == null){
params={}
}
var list = [];//
var states = [];
console.log("222222222")
// let a ={};
//this.loadingDept = true;//
this.$axios.post("/proRole/list",params).then((res) => {
if (res.code == 200) {
states = res.data.records;
list = states.map(item => {
return {
value: `${item.id}`,
label: `${item.name}` };
});
setTimeout(() => {
//this.loadingDept = false;
this.roleOptions = list;
}, 200);
}
});
},
getDeptName(deptName){
let deptOption = {};
deptOption = this.deptOptions.find((item) => {
return item.value == deptName;
});
this.ruleForm.deptName = deptOption.label;
},
/**
* 弹出用户分配角色
*/
async assignRoles(val) {
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
console.log('this.$store.state.config.userInfo;' , this.$store.state.config.userInfo)
console.log('val' , val)
this.zzid = val.userId
let res = await this.$axios.get("user/" + val.userId + "/roles").catch(err=>{
loading.close();
});
console.log(res)
if (res.code == 200) {
this.roles = res.data.roles;
this.value = res.data.values;
this.uid = this.$store.state.config.userInfo.id;
setTimeout(() => {
loading.close();
this.assignDialogVisible = true;
}, 400);
}else{
loading.close();
}
},
/**
* 确定分配角色
*/
async doAssignRoles() {
this.assignDialogVisible = true;
this.btnLoading = true;
this.btnDisabled = true;
let res = await this.$axios.post(
"user/" + this.zzid + "/assignRoles",
this.value
);
if (res.code == 200) {
this.$message({
message: "用户分配角色成功",
type: "success",
});
} else {
this.$message.error("分配角色失败:" + res.msg);
}
this.assignDialogVisible = false;
this.btnLoading = false;
this.btnDisabled = false;
},
},
filters: {
changeToText1(value) {
if (value == '0')
return '正常'
else if (value == '1') {
return '停用'
}
},
changeToText3(value) {
if (value == '0')
return '销售部'
else if (value == '1') {
return '设计部'
}else if (value == '2') {
return '生产部'
}
else if (value == '3') {
return '财务部'
}
else if (value == '4') {
return '总经办'
}
},
},
mounted() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
this.queryDept();
this.queryRole();
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.personnel-list {}
</style>

@ -0,0 +1,443 @@
<template>
<section class="permission">
<!-- start btn group -->
<el-row class="table-control">
<el-col :span="8">
<el-input
clearable
placeholder="请输入角色名查询"
v-model="queryMap.roleName"
class="input-with-select"
@clear="getRoleList"
>
<el-button slot="append" icon="el-icon-search" @click="search"></el-button>
</el-input>
</el-col>
<el-col :span="2" style="margin-left:20px">
<el-button
v-hasPermission="'sysRole:add'"
type="success"
icon="el-icon-circle-plus-outline"
@click="addDialogVisible=true"
>添加</el-button>
</el-col>
</el-row>
<!-- end btn group -->
<!-- start table 数据展示-->
<el-table :data="roleData" v-loading="loading" border style="width: 100%" height="650">
<!-- <el-table-column prop="id" label="ID" width="180"></el-table-column> -->
<el-table-column type="index" width="60" align="center"></el-table-column>
<el-table-column prop="roleName" label="角色名" width="180" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" align="center" sortable></el-table-column>
<el-table-column prop="isban" label="是否启用" width="180" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" @change="changRoleStatus(scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" align="center"></el-table-column>
<el-table-column fixed="right" label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button
v-hasPermission="'sysRole:authority'"
@click="grant(scope.row.id)"
type="text"
icon="el-icon-present"
size="small"
>授权</el-button>
<el-button
@click="edit(scope.row.id)"
v-hasPermission="'sysRole:edit'"
type="text"
icon="el-icon-edit"
size="small"
>编辑</el-button>
<el-button
v-hasPermission="'sysRole:delete'"
@click="del(scope.row.id)"
type="text"
icon="el-icon-delete"
size="small"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- end table -->
<!-- start pagination -->
<el-pagination
background
style="margin-top:10px;"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryMap.pageCurrent"
:page-sizes="[50,100]"
:page-size="queryMap.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
<!-- end pagination -->
<!-- start 编辑角色 -->
<el-dialog
title="编辑角色"
:visible.sync="editDialogVisible"
width="800px"
@close="closeEdit"
:append-to-body="true"
:close-on-click-modal="false"
>
<el-form
:model="editForm"
:rules="addFormRoles"
ref="editFormRef"
label-width="120px"
class="demo-ruleForm"
label-suffix=""
>
<el-row :gutter="24">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="editForm.roleName" placeholder="请输入角色名称"></el-input>
</el-form-item>
<el-form-item label="描述信息" prop="remark">
<el-input type="textarea" v-model="editForm.remark"></el-input>
</el-form-item>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editDialogVisible = false"> </el-button>
<el-button
v-hasPermission="'sysRole:update'"
type="primary"
@click="updateRole"
:loading="btnLoading"
:disabled="btnDisabled"
> </el-button>
</span>
</el-dialog>
<!-- start 添加角色 -->
<el-dialog
title="添加角色"
:visible.sync="addDialogVisible"
width="800px"
@close="closeAdd"
:append-to-body="true"
:close-on-click-modal="false"
>
<el-form
:model="addForm"
:rules="addFormRoles"
ref="addFormRef"
label-width="120px"
class="demo-ruleForm"
label-suffix=""
>
<el-row :gutter="24">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="addForm.roleName" placeholder="请输入角色名称"></el-input>
</el-form-item>
<el-form-item label="描述信息" prop="remark">
<el-input type="textarea" v-model="addForm.remark"></el-input>
</el-form-item>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="addDialogVisible = false"> </el-button>
<el-button type="primary" @click="addRole" :loading="btnLoading" :disabled="btnDisabled"> </el-button>
</span>
</el-dialog>
<!-- 角色授权弹出框 -->
<el-dialog title="分配菜单权限" :visible.sync="grantDialogVisible" width="38%">
<span>
<!-- show-checkbox是可以选择节点 -->
<el-tree
:auto-expand-parent="false"
:data="data"
show-checkbox
node-key="id"
:default-expanded-keys="open"
:props="defaultProps"
ref="tree"
highlight-current
></el-tree>
<!-- check-strictly -->
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="grantDialogVisible = false"> </el-button>
<el-button
v-hasPermission="'sysRole:authority'"
type="primary"
icon="el-icon-setting"
@click="authority"
:loading="btnLoading"
:disabled="btnDisabled"
> </el-button>
</span>
</el-dialog>
<!-- end 编辑角色 -->
</section>
</template>
<script>
export default {
name: "Permission",
data() {
return {
btnLoading: false,
btnDisabled: false,
loading: true,
total: 0,
queryMap: { roleName: "", pageCurrent: 1, pageSize: 50 }, //
roleData: [], //
addForm: {}, //
editForm: {}, //
addDialogVisible: false, //
editDialogVisible: false, //
grantDialogVisible: false, //
data: [],
open: [], //
grantId: "",
defaultProps: {
children: "children",
label: "menuName",
},
addFormRoles: {
roleName: [
{ required: true, message: "请输入角色名称", trigger: "blur" },
{
min: 3,
max: 10,
message: "长度在 3 到 10 个字符",
trigger: "blur",
},
],
// remark: [
// { required: true, message: "", trigger: "blur" },
// { min: 5, max: 20, message: " 5 20 ", trigger: "blur" }
// ]
}, //
};
},
created() {
this.getRoleList();
setTimeout(() => {
this.loading = false;
}, 500);
},
methods: {
//
async authority() {
this.btnDisabled = true;
this.btnLoading = true;
let res = await this.$axios.post(
"sysRole/authority/" + this.grantId,
[].concat(
this.$refs.tree.getCheckedKeys(),
this.$refs.tree.getHalfCheckedKeys()
)
);
if (res.code == 200) {
this.$message.success("角色授权成功");
} else {
this.$message.error("角色授权失败:" + res.msg);
}
this.btnDisabled = false;
this.btnLoading = false;
this.grantDialogVisible = false;
},
//,
async grant(id) {
//id
let res = await this.$axios.get("sysRole/findRoleMenu/" + id);
console.log('this.$store.getters.userInfoggggggggggggggg' , this.$store.getters.userInfo)
let isAdmin = this.$store.getters.userInfo.isAdmin;
if (res.code == 200) {
//
let that = this;
setTimeout(function () {
//id
res.data.mids.forEach((value) => {
//
that.$refs.tree.setChecked(value, true, false);
});
}, 100);
if (isAdmin) {
console.log('ggggggggggggg' )
//,/
this.data = res.data.tree;
} else {
//--> /
///
for (let item of res.data.tree) {
///
if (item.id == 2) {
for (let node of item.children) {
//
if (node.id == 4) {
//
for (let son of node.children) {
///,
if (son.id == 27|son.id == 28) {
//
son.disabled = true;
}
}
//退
break;
}
}
//退
break;
}
}
this.data = res.data.tree;
}
this.open = res.data.open;
//id
this.grantId = id;
}
//
this.grantDialogVisible = true;
},
//
async getRoleList() {
let res = await this.$axios.get("/sysRole/findRoleList", {
params: this.queryMap,
});
if (res.code == 200) {
this.roleData = res.data.records;
this.total = res.data.total;
}
},
//
search() {
this.queryMap.pageCurrent = 1;
this.getRoleList();
},
//
closeAdd() {
this.$refs.addFormRef.clearValidate();
this.addForm = {};
},
closeEdit() {
this.$refs.editFormRef.clearValidate();
this.editForm = {};
},
//
async addRole() {
this.$refs.addFormRef.validate(async (valid) => {
if (!valid) {
return;
} else {
this.btnDisabled = true;
this.btnLoading = true;
let res = await this.$axios.post("sysRole/add", this.addForm);
if (res.code == 200) {
this.$message.success("添加成功");
this.addDialogVisible = false;
this.btnDisabled = false;
this.btnLoading = false;
this.addForm = {};
this.getRoleList();
} else {
return this.$message.error("角色添加失败:" + res.msg);
}
}
});
},
//
async edit(id) {
let res = await this.$axios.get("sysRole/edit/" + id);
if (res.code == 200) {
this.editForm = res.data;
this.editDialogVisible = true;
} else {
return this.$message.error("角色编辑失败:" + res.msg);
}
},
//
async updateRole() {
this.$refs.editFormRef.validate(async (valid) => {
if (!valid) {
return;
} else {
this.btnDisabled = true;
this.btnLoading = true;
let res = await this.$axios.put(
"sysRole/update/" + this.editForm.id,
this.editForm
);
if (res.code == 200) {
this.$message.success("角色信息更新成功");
this.getRoleList();
} else {
this.$message.error("角色信息更新失败:" + res.msg);
}
this.editDialogVisible = false;
this.btnDisabled = false;
this.btnLoading = false;
this.editForm = {};
}
});
},
//
async del(id) {
var res = await this.$confirm(
"此操作将永久删除该角色, 是否继续?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
if (res == "confirm") {
let res = await this.$axios.delete("sysRole/delete/" + id);
if (res.code == 200) {
this.$message.success("删除成功");
this.getRoleList();
} else {
this.$message.error("删除失败:" + res.msg);
}
}
},
//
async changRoleStatus(row) {
let res = await this.$axios.put(
"sysRole/updateStatus/" + row.id + "/" + row.status
);
if (res.code !== 200) {
this.$message.error("更新状态失败:" + res.msg);
row.status = !row.status;
} else {
this.$message.success("更新状态成功");
}
},
//
handleSizeChange(newSize) {
this.queryMap.pageSize = newSize;
this.getRoleList();
},
//
handleCurrentChange(current) {
this.queryMap.pageCurrent = current;
this.getRoleList();
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.permission {
}
</style>

@ -0,0 +1,279 @@
<!--<template>-->
<!--&lt;!&ndash; 角色管理 &ndash;&gt;-->
<!--<section class="permission">-->
<!-- &lt;!&ndash; start btn group &ndash;&gt;-->
<!-- <el-row class="table-control">-->
<!-- <el-col :span="18">-->
<!-- <el-button icon="el-icon-plus" size="small" type="primary" plain @click="clickAdd"></el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="6"></el-col>-->
<!-- </el-row>-->
<!-- &lt;!&ndash; end btn group &ndash;&gt;-->
<!-- &lt;!&ndash; start table &ndash;&gt;-->
<!-- <article class="table-data">-->
<!-- <el-table :data="data" border style="width: 80%">-->
<!-- <el-table-column type="index" width="100" label="ID" align="center"></el-table-column>-->
<!-- <el-table-column width="200" prop="code" label="角色编号"></el-table-column>-->
<!-- <el-table-column width="200" prop="name" label="角色名称"></el-table-column>-->
<!-- <el-table-column prop="remark" label="备注"></el-table-column>-->
<!-- <el-table-column width="200" prop="createdBy" label="创建人" align="center"></el-table-column>-->
<!-- <el-table-column width="200" prop="creationtime" label="创建时间" align="center" ></el-table-column>-->
<!-- &lt;!&ndash; <el-table-column prop="isEable" label="是否启用" align="center" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag effect="dark" :type="scope.row.isEable === '0' ? 'success' : 'warning'" size="mini">{{scope.row.isEable | changeToText}}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column> &ndash;&gt;-->
<!-- <el-table-column label="操作" width="180" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="danger" @click="clickDelete(scope.row)" size="mini" plain icon="el-icon-delete" circle title="删除"></el-button>-->
<!-- <el-button size="mini" @click="clickEdit(scope.row)" circle icon="el-icon-edit" title="编辑"></el-button>-->
<!-- <el-button size="mini" @click="grant(scope.row)" circle icon="el-icon-present" title="授权"></el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </article>-->
<!-- &lt;!&ndash; end table &ndash;&gt;-->
<!-- <el-pagination -->
<!-- :current-page="pageCurrent" :page-sizes="[50, 100, 200]" :page-size="pageSize" -->
<!-- layout="total, sizes, prev, pager, next, jumper" :total="count"-->
<!-- class="table-pagination">-->
<!-- </el-pagination>-->
<!-- -->
<!-- <el-dialog title="角色信息" :visible.sync="modalAdd" width="1100px" :append-to-body="true" :close-on-click-modal="false">-->
<!-- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm" label-suffix="">-->
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="角色编码" prop="code">-->
<!-- <el-input v-model="ruleForm.code" placeholder="请输入编号"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="角色名称" prop="name">-->
<!-- <el-input v-model="ruleForm.name" placeholder="请输入名称"></el-input>-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; <el-form-item label="是否启用" prop="isEnable">-->
<!-- <el-radio-group v-model="ruleForm.isEnable">-->
<!-- <el-radio label="0">启用</el-radio>-->
<!-- <el-radio label="1">禁用</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item> &ndash;&gt;-->
<!-- <el-form-item label="创建人" prop="createdBy">-->
<!-- {{ruleForm.createdBy}}-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建时间" prop="creationTime">-->
<!-- {{ruleForm.createdTime}}-->
<!-- </el-form-item>-->
<!-- <el-form-item label="更新人" prop="updatedBy">-->
<!-- {{ruleForm.updatedBy}}-->
<!-- </el-form-item>-->
<!-- <el-form-item label="更新时间" prop="updatedTime">-->
<!-- {{ruleForm.updatedDate}}-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备注" prop="remarks">-->
<!-- <el-input type="textarea" v-model="ruleForm.remarks" placeholder="请输入备注"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-form>-->
<!-- <span slot="footer" class="dialog-footer">-->
<!-- <el-button @click="initForm"> </el-button>-->
<!-- <el-button type="primary" @click=" dialogType === 'add' ? addRole('ruleForm') : updateRole('ruleForm') "> </el-button>-->
<!-- </span>-->
<!-- </el-dialog>-->
<!-- &lt;!&ndash; end 编辑角色 &ndash;&gt;-->
<!--</section>-->
<!--</template>-->
<!--<script>-->
<!--export default {-->
<!-- name: 'Permission',-->
<!-- data() {-->
<!-- return {-->
<!-- modalAdd: false,-->
<!-- -->
<!-- pageCurrent: 1,//-->
<!-- pageSize: 50,//-->
<!-- count: 0,//-->
<!-- ruleForm: {-->
<!-- code:'',-->
<!-- name:'',-->
<!-- remarks: '',-->
<!-- createdBy: '',-->
<!-- creationtime: '',-->
<!-- updatedBy: '',-->
<!-- updatedDate: '',-->
<!-- },-->
<!-- rules: {-->
<!-- name: [{-->
<!-- required: true,-->
<!-- message: '请输入角色名称',-->
<!-- trigger: 'blur'-->
<!-- },-->
<!-- {-->
<!-- min: 1,-->
<!-- max: 4,-->
<!-- message: '长度在 1 到 10 个字符',-->
<!-- trigger: 'blur'-->
<!-- }-->
<!-- ],-->
<!-- code: [{-->
<!-- required: true,-->
<!-- message: '请输入编号',-->
<!-- trigger: 'blur'-->
<!-- },-->
<!-- ],-->
<!-- -->
<!-- },-->
<!-- data: []-->
<!-- }-->
<!-- },-->
<!-- methods: {-->
<!-- clickAdd() {-->
<!-- this.dialogType = "add";-->
<!-- this.modalAdd = true;-->
<!-- },-->
<!-- addRole(formName){-->
<!-- this.$refs[formName].validate((valid) => {-->
<!-- if (valid) {-->
<!-- this.$axios.post("/proRole/add", this.ruleForm).then((res) => {-->
<!-- if (res.code == 10000) {-->
<!-- this.$message.error(res.msg);-->
<!-- } else if (res.code == 200) {-->
<!-- this.$message.success("添加成功");-->
<!-- this.initForm();-->
<!-- this.queryList({-->
<!-- code: this.ruleForm.code,-->
<!-- name: this.ruleForm.name,-->
<!-- //-->
<!-- }); -->
<!-- } else {-->
<!-- this.$message.error("添加失败,请联系管理员");-->
<!-- }-->
<!-- });-->
<!-- } else {-->
<!-- return false;-->
<!-- }-->
<!-- });-->
<!-- },-->
<!-- clickEdit(params) {-->
<!-- console.log("点击编辑按钮");-->
<!-- this.dialogType = "edit";-->
<!-- this.modalAdd = true; //-->
<!-- console.log("编辑传入的参数", params);-->
<!-- Object.assign(this.ruleForm, params); //-->
<!-- console.log("点击编辑", this.ruleForm);-->
<!-- },-->
<!-- updateRole(formName){-->
<!-- this.$refs[formName].validate((valid) => {-->
<!-- if (valid) {-->
<!-- this.$axios.post("/proRole/edit", this.ruleForm).then((res) => {-->
<!-- if (res.code == 10000) {-->
<!-- this.$message.error(res.msg);-->
<!-- } else if (res.code == 200) {-->
<!-- this.$message.success("更新成功");-->
<!-- this.initForm();-->
<!-- this.queryList({-->
<!-- code: this.ruleForm.code,-->
<!-- name: this.ruleForm.name,-->
<!-- -->
<!-- });-->
<!-- } else {-->
<!-- this.$message.error("添加失败,请联系管理员");-->
<!-- }-->
<!-- });-->
<!-- } else {-->
<!-- return false;-->
<!-- }-->
<!-- });-->
<!-- },-->
<!-- grant(params) {-->
<!-- this.$message.success("未实现"+params.name+"的授权功能");-->
<!-- },-->
<!-- //-->
<!-- initForm() {-->
<!-- this.modalAdd = false;-->
<!-- this.resetEdit(); -->
<!-- },-->
<!-- resetEdit(){-->
<!-- return (this.ruleForm = {-->
<!-- code:'',-->
<!-- name:'',-->
<!-- remarks: '',-->
<!-- createdBy: '',-->
<!-- creationtime: '',-->
<!-- updatedBy: '',-->
<!-- updatedDate: '',-->
<!-- });-->
<!-- },-->
<!-- queryList(data) {-->
<!-- this.$axios.post("/proRole/list", data).then((res) => {-->
<!-- console.log('rrrrrrrrrr'+JSON.stringify(res));-->
<!-- -->
<!-- if (res.code == 200) {-->
<!-- this.data = res.data.records;-->
<!-- this.count = res.total;-->
<!-- this.pageCurrent = res.current;-->
<!-- }else{-->
<!-- this.$message({-->
<!-- type: 'erro',-->
<!-- message: '查询失败!'-->
<!-- });-->
<!-- }-->
<!-- });-->
<!-- },-->
<!-- clickDelete(row) {-->
<!-- this.$confirm('此操作将永久删除此项, 是否继续?', '提示', {-->
<!-- confirmButtonText: '确定',-->
<!-- cancelButtonText: '取消',-->
<!-- type: 'warning'-->
<!-- })-->
<!-- .then(() => {-->
<!-- console.log(row);-->
<!-- this.deleteRole(row);-->
<!-- })-->
<!-- .catch(() => {-->
<!-- this.$message({-->
<!-- type: 'info',-->
<!-- message: '已取消删除'-->
<!-- });-->
<!-- });-->
<!-- },-->
<!-- deleteRole(data){-->
<!-- this.$axios.delete("/proRole/delete/" + data.id).then((res) => {-->
<!-- if (res.code == 200) {-->
<!-- this.$message.success("删除成功");-->
<!-- if (-->
<!-- (this.pageCurrent * this.pageSize - this.count) % this.pageSize ==-->
<!-- this.pageSize - 1-->
<!-- ) {-->
<!-- this.pageCurrent -= 1;-->
<!-- }-->
<!-- this.queryList({-->
<!-- pageSize: this.pageSize,-->
<!-- pageCurrent: this.pageCurrent,-->
<!-- });-->
<!-- }else {-->
<!-- this.$message.error("删除失败");-->
<!-- }-->
<!-- });-->
<!-- },-->
<!-- },-->
<!-- mounted() {-->
<!-- this.queryList({-->
<!-- pageSize: this.pageSize,-->
<!-- pageCurrent: this.pageCurrent,-->
<!-- });-->
<!-- },-->
<!--};-->
<!--</script>-->
<!--<style scoped lang="less">-->
<!--.permission{}-->
<!--</style>-->

@ -0,0 +1,654 @@
<template>
<section class="personnel-list">
<!-- start form search -->
<el-form :inline="true" :model="formInline" label-width="80px" size="small" class="search-form" label-suffix="">
<el-form-item label="编号">
<el-input v-model="formInline.name" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="formInline.code" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<!-- <el-form-item label="部门" prop="deptId">-->
<!-- <el-select-->
<!-- v-model="formInline.deptId"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable-->
<!-- reserve-keyword-->
<!-- placeholder="请输入关键词"-->
<!-- :remote-method="queryDept"-->
<!-- :loading="loadingDept"-->
<!-- @change="getDeptName"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="clickFormSearch"></el-button>
</el-form-item>
</el-form>
<!-- end form search -->
<!-- start btn group -->
<el-row class="table-control">
<el-col :span="18">
<el-button icon="el-icon-plus" size="primary" plain @click="clickAdd"></el-button>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<!-- end btn group -->
<!-- start table -->
<article class="table-data">
<el-table :data="tableData" border style="width: 100%" :fit="true">
<el-table-column prop="id" label="编号" ></el-table-column>
<el-table-column prop="username" label="用户名" ></el-table-column>
<el-table-column prop="wechat" label="WeChat" ></el-table-column>
<!-- <el-table-column prop="createdBy" label="创建人" width="150"></el-table-column>-->
<!-- <el-table-column prop="creationDate" label="创建时间" width="190"></el-table-column>-->
<el-table-column prop="status" label="状态" >
<template slot-scope="scope">
<el-tag effect="dark" :type="scope.row.status === 1 ? 'success' : 'warning'" size="mini">{{scope.row.status | changeToText1}}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" >
<template slot-scope="scope">
<!-- <el-button type="danger" @click="clickDelete(scope.row)" size="mini" plain icon="el-icon-delete" circle title="删除"></el-button>-->
<!-- <el-button @click="clickEdit(scope.row)" type="text"-->
<!-- size="small" icon="el-icon-edit" title="编辑">编辑</el-button>-->
<!-- <el-tooltip class="item" effect="dark" content="分配角色" placement="top" :enterable="false">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- size="mini"-->
<!-- icon="el-icon-s-tools"-->
<!-- @click="assignRoles(scope.row.id)"-->
<!-- ></el-button>-->
<!-- </el-tooltip>-->
<el-button
@click="clickDelete(scope.row)"
type="text"
icon="el-icon-delete"
size="small"
>删除</el-button>
<el-button
@click="clickEdit(scope.row)"
type="text"
icon="el-icon-edit"
size="small"
>编辑</el-button>
<el-button
@click="assignRoles(scope.row)"
type="text"
icon="el-icon-s-tools"
size="small"
>分配角色</el-button>
</template>
</el-table-column>
</el-table>
</article>
<!-- end table -->
<!-- start pagination -->
<el-pagination :current-page="1" :page-sizes="[10, 20, 30, 40]" :page-size="1" layout="total, sizes, prev, pager, next, jumper" :total="4" class="table-pagination">
</el-pagination>
<!-- end pagination -->
<!-- start 新增模态窗 -->
<el-dialog :title="dialogType=== 'add' ? '添加管理员' :'编辑管理员'" :visible.sync="modalAdd" width="1100px" :append-to-body="true" :close-on-click-modal="false">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm" label-suffix="">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="编号" prop="id">
<el-input v-model="ruleForm.id" placeholder="请输入编号" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="用户名" prop="username">
<el-input v-model="ruleForm.username" placeholder="请输入用户名" :disabled="dialogType=== 'add' ? false :true "></el-input>
</el-form-item>
</el-col>
<el-col :span="8" :hidden="dialogType=== 'add' ? false :true">
<el-form-item label="密码" prop="password" >
<el-input v-model="ruleForm.password" placeholder="请输入密码" ></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="性别" prop="sex">-->
<!-- &lt;!&ndash; <el-input v-model="ruleForm.sex" placeholder="请输入性别"></el-input> &ndash;&gt;-->
<!-- <el-radio-group v-model="ruleForm.sex">-->
<!-- <el-radio label="0"></el-radio>-->
<!-- <el-radio label="1"></el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item label="wechat" prop="wechat">
<el-input v-model="ruleForm.wechat" placeholder="请输入微信"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="入职时间" prop="hiredate">-->
<!-- <el-date-picker v-model="ruleForm.hiredate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"> </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8">
<el-form-item label="状态" prop="status">
<el-radio-group v-model="ruleForm.status">
<el-radio :label="1">有效</el-radio>
<el-radio :label="0">停用</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<!-- <el-col :span="8">-->
<!-- <el-form-item label="部门" prop="deptId">-->
<!-- <el-select v-model="ruleForm.deptId" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in deptOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item label="角色" prop="roleId">-->
<!-- <el-select v-model="ruleForm.roleId" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in roleOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">
<el-form-item label="允许登录" prop="isUser">
<el-radio-group v-model="ruleForm.isUser">
<el-radio label="0">允许</el-radio>
<el-radio label="1">不允许</el-radio>
</el-radio-group>
</el-form-item>
</el-col> -->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="备注" prop="remark">-->
<!-- <el-input type="textarea" v-model="ruleForm.remark" placeholder="请输入备注"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeDialog"></el-button>
<el-button type="primary" @click=" dialogType === 'add' ? addPerson('ruleForm') : updatePerson('ruleForm') "> </el-button>
</span>
</el-dialog>
<!-- end 新增模态窗 -->
<!--start role set 角色分配模态窗-->
<el-dialog center title="分配角色" @close="closeAssignDialog" :visible.sync="assignDialogVisible" width="800px" :append-to-body="true" :close-on-click-modal="false">
<span>
<template>
<el-transfer
class="transfer"
filterable
:titles="['未拥有','已拥有']"
:button-texts="['到左边', '到右边']"
v-model="value"
:data="roles"
></el-transfer>
</template>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="assignDialogVisible = false" class="el-icon-close">取消分配</el-button>
<el-button
v-hasPermission="'user:assign'"
type="primary"
@click="doAssignRoles"
class="el-icon-check"
:loading="btnLoading"
:disabled="btnDisabled"
>确定分配</el-button>
</span>
</el-dialog>
<!--end role set-->
</section>
</template>
<script>
export default {
name: 'PersonnelList', //
data() {
return {
modalAdd: false,
pageCurrent: 1,//
pageSize: 50,//
count: 0,//
loadingDept:false,
deptOptions:[],
roleOptions:[],
formInline: {
name: '',
code: '',
deptId: '',
},
ruleForm: {
code:'',
username: '',
sex:'',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:1,
deptId:'',
roleId:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
},
rules: {
hiredate:[
{
required: true,
message: '请选择',
trigger: 'blur'
}
],
status:[
{
required: true,
message: '请选择',
trigger: 'blur'
}
],
username:[{
required: true,
message: '请输入用户名',
trigger: 'blur'
}],
password: [{
required: true,
message: '请输入密码',
trigger: 'blur'
}],
deptId: [{
required: true,
message: '请选择部门',
trigger: 'change'
}],
roleId: [{
required: true,
message: '请选择角色',
trigger: 'change'
}],
},
tableData: [],
uid: "",//userid
assignDialogVisible: false, //
roles: [], //
value: [], //
btnLoading: false,
btnDisabled: false,
dialogType:true,//
zzid:'',//id
}
},
methods: {
// roleFormatter(row){
// var a = this.roleOptions
// var role = a.filter((p)=>{
// return p.value == row.roleId;
// });
// return role[0].label;
// },
// deptFormatter(row){
// var a = this.deptOptions
// console.log('000000000000'+JSON.stringify(row));
// var dept = a.filter((p)=>{
// return p.value == row.deptId;
// });
// return dept[0].label;
// },
// sexFormatter(row) {
// console.log(row.sex+'33333');
// if(row.sex==0){
// return '';
// }else{
// return '';
// }
// },
clickAdd() {
this.dialogType = "add";
this.modalAdd = true;
this.initForm();
},
addPerson(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
console.log('5555555'+JSON.stringify(this.ruleForm));
this.$axios.post("/sysUser/register", this.ruleForm).then((res) => {
if (res.code == 10000) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("添加成功");
this.initForm();
this.queryList({
// code: this.ruleForm.code,
// name: this.ruleForm.name,
// sex: this.ruleForm.sex,
// idcard: this.ruleForm.idcard,
// phone: this.ruleForm.phone,
// email: this.ruleForm.email,
});
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
clickEdit(params) {
console.log("点击编辑按钮");
this.dialogType = "edit";
this.modalAdd = true; //
console.log("编辑传入的参数", params);
Object.assign(this.ruleForm, params); //
console.log("点击编辑", this.ruleForm);
},
updatePerson(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.$axios.put("/user/update/"+this.ruleForm.id, this.ruleForm).then((res) => {
if (res.code != 200) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("更新成功");
this.initForm();
this.queryList({
// code: this.ruleForm.code,
// name: this.ruleForm.name,
// sex: this.ruleForm.sex,
// idcard: this.ruleForm.idcard,
// phone: this.ruleForm.phone,
// email: this.ruleForm.email,
});
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
//
initForm() {
//this.modalAdd = false;
this.resetEdit();
},
closeDialog(){
this.modalAdd = false;
this.resetEdit();
},
resetEdit(){
return (this.ruleForm = {
username: '',
sex:'',
wechat:'',
status:1,
roleId:'',
remark: '',
});
},
//
clickFormSearch() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
code: this.formInline.code,
name: this.formInline.name,
deptId: this.formInline.deptId,
});
},
queryList(data) {
console.log('data' , data)
this.$axios.get("/user/list", {params:{
pageCurrent: 1,
pageSize: 50,
type:3
}}).then((res) => {
if (res.code == 200) {
console.log('res.data.records' , res.data.records)
this.tableData = res.data.records;
console.log('eeeeeeeeeeeeeee'+JSON.stringify(this.tableData));
this.count = res.total;
//
this.pageCurrent = res.current;
console.log("查找成功");
}else{
this.$message({
type: 'erro',
message: '查询失败!'
});
}
});
},
clickDelete(row) {
this.$confirm('此操作将永久删除此项, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row);
this.deletePerson(row);
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
deletePerson(data){
this.$axios.delete("/proStaff/delete/" + data.id).then((res) => {
if (res.code == 200) {
this.$message.success("删除成功");
if (
(this.pageCurrent * this.pageSize - this.count) % this.pageSize ==
this.pageSize - 1
) {
this.pageCurrent -= 1;
}
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
}else{
this.$message.error("删除失败请联系管理员");
}
});
},
queryRole(params){
console.log('ppppp'+params);
if(params == null){
params={}
}
var list = [];//
var states = [];
console.log("222222222")
// let a ={};
//this.loadingDept = true;//
this.$axios.post("/proRole/list",params).then((res) => {
if (res.code == 200) {
states = res.data.records;
list = states.map(item => {
return {
value: `${item.id}`,
label: `${item.name}` };
});
setTimeout(() => {
//this.loadingDept = false;
this.roleOptions = list;
}, 200);
}
});
},
/**
* 弹出用户分配角色
*/
async assignRoles(val) {
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
console.log('this.$store.state.config.userInfo;' , this.$store.state.config.userInfo)
this.zzid = val.id
console.log('val' ,val )
let res = await this.$axios.get("user/" + val.id + "/roles").catch(err=>{
loading.close();
});
console.log(res)
if (res.code == 200) {
this.roles = res.data.roles;
this.value = res.data.values;
this.uid = this.$store.state.config.userInfo.id;
setTimeout(() => {
loading.close();
this.assignDialogVisible = true;
}, 400);
}else{
loading.close();
}
},
/**
* 确定分配角色
*/
async doAssignRoles() {
this.assignDialogVisible = true;
this.btnLoading = true;
this.btnDisabled = true;
let res = await this.$axios.post(
"user/" + this.zzid + "/assignRoles",
this.value
);
if (res.code == 200) {
this.$message({
message: "用户分配角色成功",
type: "success",
});
} else {
this.$message.error("分配角色失败:" + res.msg);
}
this.assignDialogVisible = false;
this.btnLoading = false;
this.btnDisabled = false;
},
getDeptName(deptName){
let deptOption = {};
deptOption = this.deptOptions.find((item) => {
return item.value == deptName;
});
this.ruleForm.deptName = deptOption.label;
},
},
filters: {
changeToText1(value) {
if (value == '0')
return '停用'
else if (value == '1') {
return '正常'
}
},
changeToText2(value) {
if (value == '0')
return '超级管理员'
else if (value == '1') {
return '文员'
}else if (value == '2') {
return '报价员'
}else if (value == '3') {
return '采购员'
}else if (value == '4') {
return '仓管员'
}else if (value == '5') {
return '生产主管'
}else if (value == '6') {
return '工程师'
}else if (value == '7') {
return '工序员工'
}else if (value == '8') {
return '送货员'
}
},
changeToText3(value) {
if (value == '0')
return '销售部'
else if (value == '1') {
return '设计部'
}else if (value == '2') {
return '生产部'
}
else if (value == '3') {
return '财务部'
}
else if (value == '4') {
return '总经办'
}
},
},
mounted() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
//this.queryDept();
//this.queryRole();
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.personnel-list {}
</style>

@ -0,0 +1,686 @@
<template>
<section class="personnel-list">
<!-- start form search -->
<el-form :inline="true" :model="formInline" label-width="80px" size="small" class="search-form" label-suffix="">
<el-form-item label="名称">
<el-input v-model="formInline.name" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<el-form-item label="地址">
<el-input v-model="formInline.code" placeholder="请输入" style="width:200px;"></el-input>
</el-form-item>
<!-- <el-form-item label="部门" prop="deptId">-->
<!-- <el-select-->
<!-- v-model="formInline.deptId"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable-->
<!-- reserve-keyword-->
<!-- placeholder="请输入关键词"-->
<!-- :remote-method="queryDept"-->
<!-- :loading="loadingDept"-->
<!-- @change="getDeptName"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in deptOptions"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="clickFormSearch"></el-button>
</el-form-item>
</el-form>
<!-- end form search -->
<!-- start btn group -->
<el-row class="table-control">
<el-col :span="18">
<!-- <el-button icon="el-icon-plus" size="small" type="primary" plain @click="clickAdd"></el-button>-->
</el-col>
<el-col :span="6"></el-col>
</el-row>
<!-- end btn group -->
<!-- start table -->
<article class="table-data">
<el-table :data="tableData" border style="width: 100%" :fit="true">
<!-- <el-table-column prop="id" label="id" ></el-table-column>-->
<el-table-column prop="name" label="名称" ></el-table-column>
<el-table-column prop="location" label="地址" ></el-table-column>
<el-table-column prop="field" label="领域" ></el-table-column>
<el-table-column prop="scale" label="规模" ></el-table-column>
<el-table-column prop="profile" label="简介"></el-table-column>
<el-table-column prop="createTime" label="申请时间" ></el-table-column>
<el-table-column prop="updateTime" label="修改时间" ></el-table-column>
<el-table-column prop="status" label="状态" >
<template slot-scope="scope">
<el-tag effect="dark" v-if="scope.row.status === 0" type="info" size="mini">{{scope.row.status | changeToText1}}</el-tag>
<el-tag effect="dark" v-else-if="scope.row.status === 1" type="danger" size="mini">{{scope.row.status | changeToText1}}</el-tag>
<el-tag effect="dark" v-else-if="scope.row.status === 2" type="success" size="mini">{{scope.row.status | changeToText1}}</el-tag>
<el-tag effect="dark" v-else-if="scope.row.status === 3" type="warning" size="mini">{{scope.row.status | changeToText1}}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button type="danger" @click="clickDelete(scope.row)" size="mini" plain icon="el-icon-delete" circle title="删除"></el-button>
<!-- <el-button size="mini" @click="clickEdit(scope.row)" circle icon="el-icon-edit" title="编辑"></el-button>-->
<el-button size="mini" @click="clickView(scope.row)" circle icon="el-icon-view" title="审核"></el-button>
</template>
</el-table-column>
</el-table>
</article>
<!-- end table -->
<!-- start pagination -->
<el-pagination :current-page="1" :page-sizes="[10, 20, 30, 40]" :page-size="1" layout="total, sizes, prev, pager, next, jumper" :total="2" class="table-pagination">
</el-pagination>
<!-- end pagination -->
<!-- start 新增模态窗 -->
<el-dialog title="职员信息" :visible.sync="modalAdd" width="1100px" :append-to-body="true" :close-on-click-modal="false">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm" label-suffix="">
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="编号" prop="code">
<el-input v-model="ruleForm.code" placeholder="请输入编号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名" prop="name">
<el-input v-model="ruleForm.name" placeholder="请输入姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别" prop="sex">
<!-- <el-input v-model="ruleForm.sex" placeholder="请输入性别"></el-input> -->
<el-radio-group v-model="ruleForm.sex">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="身份证号码" prop="idcard">
<el-input v-model="ruleForm.idcard" placeholder="请输入电话"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="电话" prop="phone">
<el-input v-model="ruleForm.phone" placeholder="请输入电话"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="邮箱" prop="email">
<el-input v-model="ruleForm.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系地址" prop="address">
<el-input v-model="ruleForm.address" placeholder="请输入地址"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="QQ" prop="qq">
<el-input v-model="ruleForm.qq" placeholder="请输入qq"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="wechat" prop="wechat">
<el-input v-model="ruleForm.wechat" placeholder="请输入微信"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="入职时间" prop="hiredate">
<el-date-picker v-model="ruleForm.hiredate" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"> </el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="状态" prop="status">
<el-radio-group v-model="ruleForm.status">
<el-radio label="0">有效</el-radio>
<el-radio label="1">停用</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="deptId">
<el-select v-model="ruleForm.deptId" placeholder="请选择">
<el-option
v-for="item in deptOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="角色" prop="roleId">
<el-select v-model="ruleForm.roleId" placeholder="请选择">
<el-option
v-for="item in roleOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item label="允许登录" prop="isUser">
<el-radio-group v-model="ruleForm.isUser">
<el-radio label="0">允许</el-radio>
<el-radio label="1">不允许</el-radio>
</el-radio-group>
</el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="创建人" prop="createdBy">
{{ruleForm.createdBy}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间" prop="creationtime">
{{ruleForm.creationtime}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="更新人" prop="updatedBy">
{{ruleForm.updatedBy}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="更新时间" prop="updatedDate">
{{ruleForm.updatedDate}}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="ruleForm.remark" placeholder="请输入备注"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="initForm"> </el-button>
<el-button type="primary" @click=" dialogType === 'add' ? addPerson('ruleForm') : updatePerson('ruleForm') "> </el-button>
</span>
</el-dialog>
<!-- end 新增模态窗 -->
<el-drawer
title=""
:visible.sync="drawer"
direction="rtl"
style="margin-left: 10px;">
<h2 class="single-title">企业信息</h2>
<el-form ref="formInfo" :model="formInfo" style="margin-left: 30px;">
<div style="text-align: center; margin-bottom: 10px">
<img width="80px" height="80px" style="border-radius: 40px" :src="formInfo.unitImageUrl">
<div style="margin: 10px">
<div>
<p style="color: #20a0ff; font-size: 14px" v-if="formInfo.status == 2"></p>
<p style="color: #20a0ff; font-size: 14px" v-if="formInfo.status == 1"></p>
<p style="color: red; font-size: 14px" v-if="formInfo.status == 3"></p>
<p style="color: red; font-size: 14px" v-if="formInfo.status == 4"></p>
</div>
</div>
</div>
<div class="form-item">
<el-form-item label="名称" prop="name">
{{formInfo.name}}
</el-form-item>
</div>
<div class="form-item">
<el-form-item label="地址" prop="location">
{{formInfo.location}}
</el-form-item>
</div>
<div class="form-item">
<el-form-item label="领域" prop="field">
{{formInfo.field}}
</el-form-item>
</div>
<div class="form-item">
<el-form-item label="规模" prop="scale">
{{formInfo.scale}}
</el-form-item>
</div>
<div class="form-item">
<el-form-item label="简介" prop="profile">
{{formInfo.profile}}
</el-form-item>
</div>
<div class="form-item">
<el-form-item label="营业执照" prop="profile">
<div class="demo-image__preview">
<el-image
style="width: 100px; height: 100px"
:src="require('../../../source/zhizhao.jpeg')"
:preview-src-list="srcList">
</el-image>
</div>
</el-form-item>
</div>
<div style="text-align: center">
<el-button type="info" round v-if="formInfo.status == 0 || formInfo.status == 1 || formInfo.status == 3" @click="clickShenhe(0)" >不通过</el-button>
<el-button type="success" round v-if="formInfo.status == 0 || formInfo.status == 1 || formInfo.status == 3" @click="clickShenhe(2)"></el-button>
<el-button type="danger" round v-if="formInfo.status == 2" @click="clickShenhe(4)"></el-button>
</div>
</el-form>
</el-drawer>
</section>
</template>
<script>
import {ossUrl} from "../../utils/pub";
export default {
name: 'PersonnelList', //
data() {
return {
modalAdd: false,
pageCurrent: 1,//
pageSize: 50,//
count: 0,//
loadingDept:false,
deptOptions:[],
roleOptions:[],
formInline: {
name: '',
code: '',
deptId: '',
},
ruleForm: {
code:'',
name: '',
sex:'',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
},
rules: {
hiredate:[
{
required: true,
message: '请选择',
trigger: 'blur'
}
],
status:[
{
required: true,
message: '请选择',
trigger: 'blur'
}
],
name: [{
required: true,
message: '请输入姓名',
trigger: 'blur'
}],
idcard:[{
required: true,
message: '请输入身份证',
trigger: 'blur'
}],
phone: [{
required: true,
message: '请输入手机号码',
trigger: 'blur'
}],
deptId: [{
required: true,
message: '请选择部门',
trigger: 'change'
}],
roleId: [{
required: true,
message: '请选择角色',
trigger: 'change'
}],
},
tableData: [],
drawer: false,//
formInfo: {},//
url: ossUrl+'recruitUnit/0/zhizhao.jpeg',
srcList: [
ossUrl+'recruitUnit/0/zhizhao.jpeg'
]
}
},
methods: {
roleFormatter(row){
var a = this.roleOptions
var role = a.filter((p)=>{
return p.value == row.roleId;
});
return role[0].label;
},
deptFormatter(row){
var a = this.deptOptions
console.log('000000000000'+JSON.stringify(row));
var dept = a.filter((p)=>{
return p.value == row.deptId;
});
return dept[0].label;
},
sexFormatter(row) {
console.log(row.sex+'33333');
if(row.sex==0){
return '男';
}else{
return '女';
}
},
clickAdd() {
this.dialogType = "add";
this.modalAdd = true;
},
addPerson(formName){
this.$refs[formName].validate((valid) => {
console.log('5555555'+JSON.stringify(this.ruleForm));
if (valid) {
this.$axios.post("/proStaff/add", this.ruleForm).then((res) => {
if (res.code == 10000) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("添加成功");
this.initForm();
this.queryList({
code: this.ruleForm.code,
name: this.ruleForm.name,
sex: this.ruleForm.sex,
idcard: this.ruleForm.idcard,
phone: this.ruleForm.phone,
email: this.ruleForm.email,
});
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
clickEdit(params) {
console.log("点击编辑按钮");
this.dialogType = "edit";
this.modalAdd = true; //
console.log("编辑传入的参数", params);
Object.assign(this.ruleForm, params); //
console.log("点击编辑", this.ruleForm);
},
updatePerson(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.$axios.post("/proStaff/edit", this.ruleForm).then((res) => {
if (res.code == 10000) {
this.$message.error(res.msg);
} else if (res.code == 200) {
this.$message.success("更新成功");
this.initForm();
this.queryList({
code: this.ruleForm.code,
name: this.ruleForm.name,
sex: this.ruleForm.sex,
idcard: this.ruleForm.idcard,
phone: this.ruleForm.phone,
email: this.ruleForm.email,
});
} else {
this.$message.error("添加失败,请联系管理员");
}
});
} else {
return false;
}
});
},
//
initForm() {
this.modalAdd = false;
this.resetEdit();
},
resetEdit(){
return (this.ruleForm = {
code:'',
name: '',
sex:'',
idcard:'',
phone:'',
email:'',
address:'',
qq:'',
wechat:'',
hiredate:'',
status:'',
deptId:'',
roleId:'',
remark: '',
createdBy: '',
creationtime: '',
updatedBy: '',
updatedDate: '',
});
},
//
clickFormSearch() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
code: this.formInline.code,
name: this.formInline.name,
deptId: this.formInline.deptId,
});
},
queryList(data) {
this.$axios.post("/recruitUnit/list", data).then((res) => {
if (res.code == 200) {
this.tableData = res.data.records;
console.log('eeeeeeeeeeeeeee'+JSON.stringify(this.tableData));
this.count = res.total;
//
this.pageCurrent = res.current;
console.log("查找成功");
}else{
this.$message({
type: 'erro',
message: '查询失败!'
});
}
});
},
clickDelete(row) {
this.$confirm('此操作将永久删除此项, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log(row);
this.deletePerson(row);
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
deletePerson(data){
this.$axios.delete("/proStaff/delete/" + data.id).then((res) => {
if (res.code == 200) {
this.$message.success("删除成功");
if (
(this.pageCurrent * this.pageSize - this.count) % this.pageSize ==
this.pageSize - 1
) {
this.pageCurrent -= 1;
}
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
}else{
this.$message.error("删除失败请联系管理员");
}
});
},
queryDept(){
var list = [];//
var states = [];
console.log("222222222")
let a ={};
this.loadingDept = true;//
this.$axios.post("/proDept/list",a).then((res) => {
if (res.code == 200) {
states = res.data.records;
list = states.map(item => {
console.log('33333344'+item.name);
return {
value: `${item.id}`,
label: `${item.name}` };
});
setTimeout(() => {
this.loadingDept = false;
this.deptOptions = list;
}, 200);
console.log(list);
}
});
},
queryRole(params){
console.log('ppppp'+params);
if(params == null){
params={}
}
var list = [];//
var states = [];
console.log("222222222")
// let a ={};
//this.loadingDept = true;//
this.$axios.post("/proRole/list",params).then((res) => {
if (res.code == 200) {
states = res.data.records;
list = states.map(item => {
return {
value: `${item.id}`,
label: `${item.name}` };
});
setTimeout(() => {
//this.loadingDept = false;
this.roleOptions = list;
}, 200);
}
});
},
//
clickView(val){
console.log('val' ,val )
this.drawer = true;
this.formInfo = val
},
//
clickShenhe(status){
this.$confirm("是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$axios.post("/recruitUnit/edit",{id:this.formInfo.id,status:status}).then(res=>{
if (res.code == 200){
this.$message.success("操作成功")
this.drawer = false;
}
})
}).catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
},
filters: {
changeToText1(value) {
if (value == '0')
return '未通过审核'
else if (value == '1') {
return '待审核'
}else if (value == '2') {
return '审核通过'
}else if (value == '3') {
return '不存在的情况'
}
},
},
mounted() {
this.queryList({
pageSize: this.pageSize,
pageCurrent: this.pageCurrent,
});
this.queryDept();
this.queryRole();
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.personnel-list {}
</style>

@ -0,0 +1,440 @@
<template>
<section class="menus-management">
<!-- start btn group -->
<el-row class="table-control">
<el-col :span="18">
<el-button
icon="el-icon-plus"
size="small"
type="primary"
plain
v-hasPermission="'sysMenu:add'"
@click="openParentAdd"
>新增顶级菜单</el-button>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<!-- end btn group -->
<!-- start 菜单树列表 节点key是id,default-expanded-keys:默认勾选的节点的key的数组-->
<el-tree
:data="data"
accordion
:auto-expand-parent="false"
node-key="id"
:default-expanded-keys="open"
:expand-on-click-node="false"
:props="defaultProps"
highlight-current
:filter-node-method="filterNode"
ref="tree"
>
<!-- 使用 scoped slot 进行树节点内容的自定义-->
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="menu-name">
<!-- 节点的图标 -->
<i :class="data.icon"></i>
<!-- 节点的名称 -->
&nbsp;&nbsp;&nbsp;{{ node.label }}
</span>
<span class="menu-enable">
<el-tag style="margin-left:20px;" type="info" v-if="node.data.type==0" effect="plain" size="mini"></el-tag>
<el-tag
style="margin-left:20px;"
v-else
type="info"
effect="plain"
size="mini"
>权限[{{node.data.perms}}]</el-tag>
</span>
<!-- 功能按钮 -->
<span class="menu-control">
<el-button icon="el-icon-plus" circle v-hasPermission="'sysMenu:add'" @click="() => openAdd(data)"></el-button>
<el-button icon="el-icon-edit" circle v-hasPermission="'sysMenu:edit'" @click="edit(data)"></el-button>
<el-button icon="el-icon-delete" circle @click="() => delNode(node, data)"></el-button>
<!-- <el-button size="mini" v-hasPermission="'sysMenu:add'" icon="el-icon-plus" @click="() => openAdd(data)"></el-button>-->
<!-- <el-button size="mini" v-hasPermission="'sysMenu:edit'" icon="el-icon-edit" @click="edit(data)"></el-button>-->
<!-- <el-button size="mini" icon="el-icon-delete" @click="() => delNode(node, data)">删除</el-button>-->
</span>
</span>
</el-tree>
<!-- end 菜单树列表 -->
<!-- start 增加菜单 -->
<el-dialog
:title="addTitle"
:visible.sync="addDialogVisible"
width="800px"
@close="addClose"
:append-to-body="true"
:close-on-click-modal="false"
>
<el-form
size="mini"
:model="addForm"
:rules="addFormRules"
ref="addFormRef"
label-width="120px"
class="demo-ruleForm"
label-suffix=""
>
<el-form-item label="节点名称" prop="menuName">
<el-input v-model="addForm.menuName" placeholder="请输入菜单名称"></el-input>
</el-form-item>
<el-form-item label="URL" prop="url">
<el-input v-model="addForm.url" placeholder="请输入菜单名称"></el-input>
</el-form-item>
<el-form-item label="权限编码">
<el-input v-model="addForm.perms"></el-input>
</el-form-item>
<el-form-item label="图标名称" prop="icon">
<el-input
v-model="addForm.icon"
placeholder="请输入菜单图标名称,如el-icon-s-platform,多个class请用空格隔开"
></el-input>
</el-form-item>
<el-form-item label="是否启用" prop="disabled">
<template>
<el-radio v-model="addForm.disabled" label="false"></el-radio>
<el-radio v-model="addForm.disabled" label="true"></el-radio>
</template>
</el-form-item>
<el-form-item label="是否展开" prop="open">
<el-radio v-model="addForm.open" label="1"></el-radio>
<el-radio v-model="addForm.open" label="0"></el-radio>
</el-form-item>
<el-form-item label="排序" prop="orderNum">
<el-input-number v-model="addForm.orderNum" :min="1" :max="20" label="描述文字"></el-input-number>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-radio v-model="addForm.type" label="0"></el-radio>
<el-radio v-model="addForm.type" label="1"></el-radio>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="addDialogVisible = false"> </el-button>
<el-button type="primary" @click="addNode" :loading="btnLoading" :disabled="btnDisabled"> </el-button>
</span>
</el-dialog>
<!-- end 增加菜单 -->
<!-- start 编辑菜单 -->
<el-dialog
:title="editTitle"
:visible.sync="editlogVisible"
width="800px"
@close="editClose"
:append-to-body="true"
:close-on-click-modal="false"
>
<el-form
size="mini"
:model="editForm"
:rules="addFormRules"
ref="editFormRef"
label-width="120px"
class="demo-ruleForm"
label-suffix=""
>
<el-form-item label="节点名称" prop="menuName">
<el-input v-model="editForm.menuName" placeholder="请输入菜单名称"></el-input>
</el-form-item>
<el-form-item label="URL" prop="url">
<el-input v-model="editForm.url" placeholder="请输入菜单名称"></el-input>
</el-form-item>
<el-form-item label="权限编码">
<el-input v-model="editForm.perms"></el-input>
</el-form-item>
<el-form-item label="图标名称" prop="icon">
<el-input
v-model="editForm.icon"
placeholder="请输入菜单图标名称,如el-icon-s-platform,多个class请用空格隔开"
></el-input>
</el-form-item>
<el-form-item label="是否启用" prop="disabled">
<template>
<el-radio v-model="editForm.disabled" :label="false"></el-radio>
<el-radio v-model="editForm.disabled" :label="true"></el-radio>
</template>
</el-form-item>
<el-form-item label="是否展开" prop="open">
<template>
<el-radio v-model="editForm.open" :label="1"></el-radio>
<el-radio v-model="editForm.open" :label="0"></el-radio>
</template>
</el-form-item>
<el-form-item label="排序" prop="orderNum">
<el-input-number v-model="editForm.orderNum" :min="1" :max="100" label="描述文字"></el-input-number>
</el-form-item>
<el-form-item label="类型" prop="type">
<template>
<el-radio v-model="editForm.type" :label="0"></el-radio>
<el-radio v-model="editForm.type" :label="1"></el-radio>
</template>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editlogVisible = false"> </el-button>
<el-button
type="primary"
@click="updateMenu"
:loading="btnLoading"
:disabled="btnDisabled"
> </el-button>
</span>
</el-dialog>
<!-- end 编辑菜单 -->
</section>
</template>
<script>
let id = 1000;
export default {
name: "menusManagement",
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
data() {
const data = [];
return {
btnLoading: false,
btnDisabled: false,
loading: true,
open: [], //
filterText: "", //
addDialogVisible: false, //
editlogVisible: false, //
addTitle: "",
editTitle: "",
addForm: {
parentId: "",
menuName: "",
url: "",
type: "",
orderNum: "",
disabled: "",
open: "",
perms: "",
}, //
editForm: {}, //
addFormRules: {
menuName: [
{ required: true, message: "节点名称不能为空", trigger: "blur" },
{
min: 3,
max: 10,
message: "长度在 3 到 10 个字符",
trigger: "blur",
},
],
disabled: [
{ required: true, message: "节点状态不能为空", trigger: "blur" },
],
orderNum: [
{ required: true, message: "排序不能为空", trigger: "blur" },
],
type: [{ required: true, message: "类型不能为空", trigger: "blur" }],
open: [
{ required: true, message: "是否展开不能为空", trigger: "blur" },
],
}, //
pNode: {}, //
data: JSON.parse(JSON.stringify(data)),
//data: JSON.parse(JSON.stringify(data)),
defaultProps: {
children: "children",
//menuName
label: "menuName",
},
};
},
created() {
this.getMenuTree();
setTimeout(() => {
this.loading = false;
}, 500);
},
methods: {
//
updateMenu() {
this.$refs.editFormRef.validate(async (valid) => {
if (!valid) {
return;
} else {
this.btnLoading = true;
this.btnDisabled = true;
this.$axios
.put("sysMenu/update/" + this.editForm.id, this.editForm)
.then((res) => {
if (res.code == 200) {
this.$message({
title: "成功",
message: "节点信息更新",
type: "success",
});
//
this.editForm = {};
this.editlogVisible = false;
this.btnLoading = false;
this.btnDisabled = false;
this.getMenuTree();
} else {
return this.$message.error(res.msg);
}
});
}
});
},
//
edit(data) {
this.editTitle = "编辑:【" + data.menuName + "】";
this.$axios.get("sysMenu/edit/" + data.id).then((res) => {
if (res.code == 200) {
//
this.editForm = res.data;
//
this.editlogVisible = true;
} else {
return this.$message.error("节点编辑失败:" + res.msg);
}
});
},
//
filterNode(value, data) {
if (!value) return true;
return data.menuName.indexOf(value) !== -1;
},
//
addClose() {
this.$refs.addFormRef.clearValidate();
this.addForm = {};
},
editClose() {
this.$refs.editFormRef.clearValidate();
this.editForm = {};
},
//
getMenuTree() {
this.$axios.get("sysMenu/tree").then((res) => {
if (res.code == 200) {
this.data = res.data.tree;
//id,,
this.open = res.data.open;
console.log('this.openttttttttttttt' ,this.open )
}
});
},
//
openAdd(data) {
this.addTitle = "添加节点 :当前【" + data.menuName + "】";
this.addDialogVisible = true;
//id
this.addForm.parentId = data.id;
//
this.pNode = data;
},
//
openParentAdd(data) {
this.addTitle = "添加第一父级";
this.addDialogVisible = true;
this.addForm.parentId = 0;
},
//
async delNode(node, data) {
var res = await this.$confirm(
"此操作将永久删除该节点, 是否继续?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
if (res == "confirm") {
this.$axios.delete("sysMenu/delete/" + node.data.id).then((res) => {
if (res.code == 200) {
this.$message.success("节点删除成功");
this.getMenuTree();
} else {
this.$message.error("节点删除失败:" + res.msg);
}
});
}
},
//
addNode() {
this.$refs.addFormRef.validate(async (valid) => {
if (!valid) {
return;
} else {
this.btnLoading = true;
this.btnDisabled = true;
this.$axios.post("sysMenu/add", this.addForm).then((res) => {
if (res.code == 200) {
this.$message.success("节点添加成功");
this.addDialogVisible = false;
this.btnLoading = false;
this.btnDisabled = false;
this.getMenuTree();
} else {
this.$message.error(res.msg);
}
});
}
});
},
//
// append(data, newChild) {
// // var newChild = { id: 1231, label: "qqqqq", children: [] };
// if (!data.children) {
// this.$set(data, "children", []);
// }
// data.children.push(newChild);
// },
remove(node, data) {
const parent = node.parent;
const children = parent.data.children || parent.data;
const index = children.findIndex((d) => d.id === data.id);
children.splice(index, 1);
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.menus-management {
/deep/.el-tree-node__content {
height: 36px;
}
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
font-size: 14px;
.menu-name {
margin-right: 16px;
}
.menu-enable {
margin-right: 20px;
}
.menu-control {
margin-left: auto;
flex: 0 0 260px;
display: flex;
align-items: center;
justify-content: flex-end;
}
}
}
</style>

@ -0,0 +1,74 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './registerServiceWorker'
import './plugins/element.js'
import echarts from 'echarts'
import axios from 'axios'
import './theme/global.less';
import NProgress from 'nprogress' // 引入nprogress插件
import { hasPermission, hasRole,hasRolePermission} from './plugins/permissionDirct'
const Plugins = [hasPermission, hasRole, hasRolePermission]
Plugins.map((plugin) => {
Vue.use(plugin)
})
Vue.config.productionTip = false
Vue.prototype.$echarts = echarts
Vue.prototype.$axios = axios
axios.defaults.baseURL = 'http://localhost:19001'
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: 'http://localhost:19001',
// 超时
timeout: 10000
})
// 感觉这一段没有用
axios.defaults.headers.post['Content-Type'] = 'application/json'
Vue.prototype.$http = axios.create({
baseURL: "/api",
headers:{
post: {'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8'}
}
})
/**
* axios请求拦截器
*/
axios.interceptors.request.use(config => {
NProgress.start() // 设置加载进度条(开始..)
config.headers.Authorization = window.sessionStorage.getItem('JWT_TOKEN');
console.log("config",config);
return config;
}, error => {
return Promise.reject(error)
});
axios.interceptors.response.use(
function (response) {
NProgress.done() // 设置加载进度条(结束..)
if (response.data.code == 40300) { //如果返回的code==40300说明token错误或者token过期
window.sessionStorage.clear();
var vm = new Vue();
vm.$message.error("您的登入状态已失效,请您重新登入~")
return router.push("/login");
} else {
return Promise.resolve(response.data);
}
},
function (error) {
return Promise.reject(error)
}
)
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')

@ -0,0 +1,6 @@
import Vue from 'vue'
import Element from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import '../theme/element/index.css'
Vue.use(Element)

@ -0,0 +1,3 @@
import Vue from 'vue'
export default new Vue;

@ -0,0 +1,89 @@
export const hasPermission = {
install (Vue) {
Vue.directive('hasPermission', {
bind (el, binding, vnode) {
var flag=false;//默认不显示
console.log('vnode.context.$store.state' ,vnode.context.$store.state )
let userInfo = vnode.context.$store.state.config.userInfo;
var value=binding.value;
console.log('userInfo444444444' , userInfo)
if(userInfo.isAdmin){
//如果是超级管理员
flag=true;
console.log('3333' )
}else if(userInfo.perms.indexOf(value)!=-1){
//如果有该权限按钮显示
flag=true;
console.log('22222' )
}
if (!flag) {
// if (!el.parentNode) {
// el.style.display = 'none'
// } else {
// el.parentNode.removeChild(el);
// }
el.setAttribute("disabled",true);
el.classList.add("is-disabled");
console.log('331111133' )
}
}
})
}
}
export const hasRolePermission = {
install (Vue) {
Vue.directive('hasRolePermission', {
bind (el, binding, vnode) {
var flag=false;//默认不显示
let userInfo = vnode.context.$store.state.config.userInfo;
var value=binding.value;
if(userInfo.isAdmin){
//如果是超级管理员
flag=true;
}else if(userInfo.perms.indexOf(value.perm)!=-1&&userInfo.roleIds.indexOf(value.role)!==-1){
//如果有该权限按钮显示
flag=true;
}
if (!flag) {
// if (!el.parentNode) {
// el.style.display = 'none'
// } else {
// el.parentNode.removeChild(el);
// }
el.setAttribute("disabled",true);
el.classList.add("is-disabled");
}
}
})
}
}
export const hasRole={
install (Vue) {
Vue.directive('hasRole', {
bind (el, binding, vnode) {
var flag=false;//默认不显示
let userInfo = vnode.context.$store.state.config.userInfo;
var value=binding.value;
if(userInfo.isAdmin){
//如果是超级管理员
flag=true;
}else if(userInfo.roleIds.indexOf(value)!=-1){
//如果有该橘色按钮显示
flag=true;
}
if (!flag) {
// if (!el.parentNode) {
// el.style.display = 'none'
// } else {
// el.parentNode.removeChild(el);
// }
el.setAttribute("disabled",true);
el.classList.add("is-disabled");
}
}
})
}
}

@ -0,0 +1,32 @@
/* eslint-disable no-console */
import { register } from 'register-service-worker'
if (process.env.NODE_ENV === 'production') {
register(`${process.env.BASE_URL}service-worker.js`, {
ready () {
console.log(
'App is being served from cache by a service worker.\n' +
'For more details, visit https://goo.gl/AFskqB'
)
},
registered () {
console.log('Service worker has been registered.')
},
cached () {
console.log('Content has been cached for offline use.')
},
updatefound () {
console.log('New content is downloading.')
},
updated () {
console.log('New content is available; please refresh.')
},
offline () {
console.log('No internet connection found. App is running in offline mode.')
},
error (error) {
console.error('Error during service worker registration:', error)
}
})
}

@ -0,0 +1,73 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/',
component: Home,
children: [
{
path: '/',
component: () => import ('../components/Index.vue')
}, {
path: '/index',
component: () => import ('../components/Index.vue')
},
{
path: '/messages/message', //消息
component: () => import ('../components/Messages/Message.vue')
}, {
path: '/basicData/personnel-list', //基础数据:人员管理
component: () => import ('../components/basicData/PersonnelList.vue')
}, {
path: '/basicData/permission-list', //基础数据:角色管理
component: () => import ('../components/basicData/PermissionList.vue')
},
// ------start--------岗位管理-----------------------------------------------
{
path: '/jobManagement/jobInfo-list', //岗位管理:岗位信息管理
component: () => import ('../components/JobManagement/JobInfoList.vue')
},
{
path: '/jobManagement/label-list', //岗位管理:标签管理
component: () => import ('../components/JobManagement/JobLabelList.vue')
},
// ------end--------岗位管理-----------------------------------------------
{
path: '/basicData/menus-management',
name: 'menusManagement',
component: () => import('../components/basicData/menusManagement.vue'), //#####基础数据维护:权限设置
},
{
path: '/basicData/permission',
name: 'Permission',
component: () => import('../components/basicData/Permission.vue'), //#####基础数据维护:权限设置
},
{
path: '/basicData/jobSeeker', //基础数据:求职者管理
component: () => import ('../components/basicData/JobSeekerList.vue')
}, {
path: '/basicData/recruitmentUnit', //基础数据:招聘单位管理
component: () => import ('../components/basicData/RecruitmentUnitList.vue')
}, {
path: '/basicData/hrList', //基础数据:招聘人员管理
component: () => import ('../components/basicData/HrList.vue')
},
]
}, {
path: '/login',
name: 'login',
component: () => import ('../views/Login.vue')
}
]
const router = new VueRouter({mode: 'history', routes})
export default router

@ -0,0 +1,27 @@
export const countDict = {
"userCount" : {
name: "求职者人数",
increase: true,
style: "bg1",
},
"supplierCount" : {
name: "入驻企业数量",
increase: true,
style: "bg2",
},
"productCount" : {
name: "提供岗位",
increase: true,
style: "bg3",
},
"rmgw" : {
name: "热门岗位",
increase: false,
style: "bg4",
},
"lmgw" : {
name: "冷门岗位",
increase: false,
style: "bg5",
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -0,0 +1,17 @@
import Vue from 'vue'
import Vuex from 'vuex'
import modules from './modules'
Vue.use(Vuex)
export default new Vuex.Store({
modules,
// state: {
// },
// mutations: {
// },
// actions: {
// },
// modules: {
// }
})

@ -0,0 +1,60 @@
import fs from 'fs'
import path from 'path'
const state = {
config: null,
userInfo: null
}
const mutations = {
SET_CONFIG (state, opts){
state.config = opts
},
SET_USER_INFO( state, info){
state.userInfo = info
},
DESTROY (state){
state.userInfo = null
// //清空data数据库
// if( fs.existsSync(path.join(state.config.DB_PATH, 'op-record.db'))){
// fs.unlink( path.join(state.config.DB_PATH, 'op-record.db') )
// }
// if( fs.existsSync(path.join(state.config.DB_PATH, 'usertmp.db'))){
// fs.unlink( path.join(state.config.DB_PATH, 'usertmp.db') )
// }
}
}
const actions = {
SET_CONFIG ({ commit }, opts) {
commit('SET_CONFIG', opts)
},
SET_USER_INFO ({ commit }, info) {
commit('SET_USER_INFO', info)
},
DESTROY({ commit }) {
commit('DESTROY')
}
}
const getters = {
config: state => {
return state.config
},
userInfo: state => {
return state.userInfo
}
}
export default {
state,
mutations,
actions,
getters
}

@ -0,0 +1,14 @@
/**
* The file enables `@/store/index.js` to import all vuex modules
* in a one-shot manner. There should not be any reason to edit this file.
*/
const files = require.context('.', false, /\.js$/)
const modules = {}
files.keys().forEach(key => {
if (key === './index.js') return
modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default
})
export default modules

@ -0,0 +1,22 @@
@color-primary : #909399; //主题色
@color-primary-darker : #3f51b5; //主题色深色
@color-info : #909399; //info
@color-success : #29CE8B; //success
@color-warning : #FCA713; //warning
@color-danger : #F56C6C; //danger
//end 5个彩色变量
@color-text-primary : #444444; //主要字体颜色常用作标题,表头等加重字
@color-regular : #606266; //Regular Text常规内容字体
@color-subsidiary : #909399; //次要字体颜色
@color-placeholder : #808695; //Placeholder 占位符字体颜色
// end 字体的颜色
@color-border : #DCDFE6; //Border Base 一级边框颜色
@color-border-light : #E4E7ED; //Border Light二级边框颜色
@color-border-lighter : #EBEEF5; //Border Light 三级边框颜色
@color-border-extralight: #F2F6FC; //Border Light 四级边框颜色
//全局的页面背景色
@color-body-bg : #F5F7FA; //常用背景色
@color-deep-bg : #545C64; //深色,常用作左侧菜单背景色
@white : #FFF;
@black : #000;
@transparent : transparent;

File diff suppressed because one or more lines are too long

@ -0,0 +1,315 @@
*,
*:after,
*:before {
margin: 0;
padding: 0;
box-sizing: border-box;
outline: none;
}
/* start 滚动条样式 */
::-webkit-scrollbar-track-piece {
background-color: rgba(0, 0, 0, 0);
border-left: 1px solid rgba(0, 0, 0, 0);
}
::-webkit-scrollbar {
width: 17px;
height: 17px;
border-radius: 20px;
}
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
background-clip: padding-box;
border-radius: 20px;
min-height: 1.9rem;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.3);
border-radius: 20px;
}
// 初始化字体样式
body,
html {
margin: 0;
padding: 0;
font-size: 14px;
font-family: "PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
font-weight: normal;
-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: #0000;
color: @color-text-primary;
overflow-x: hidden;
min-width: 1280px;
height: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6,
textarea {
font-weight: inherit;
font-size: inherit;
font-family: inherit;
}
a {
color: @color-primary;
text-decoration: none;
&:hover {
color: lighten(@color-primary,10%);
}
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
.text-subsidiary {
color: @color-subsidiary !important;
}
.text-primary {
color: @color-primary !important;
}
.text-success {
color: @color-success !important;
}
.text-danger {
color: @color-danger !important;
}
.text-warning {
color: @color-warning !important;
}
.text-info {
color: @color-info !important;
}
.btn-block {
display: block;
width: 100%;
}
//样式覆盖
// 独立段落标题
.single-title {
font-size: 20px;
padding: 0 10px;
margin: 0 0 20px;
border-radius: 0 4px 4px 0;
border-left: 5px solid @color-primary;
font-weight: 800;
line-height: 1;
color: @color-info;
}
//解决在表单元素中的文本域“字数限制”行高受form表单默认行高影响
.el-form-item__content .el-input__count {
line-height: 1;
}
// 只读表格的行高限制一下
.read-only-form {
margin-bottom: 24px;
.el-form-item {
margin-bottom: 0;
}
}
//顶级返回el-page-header
.el-page-header {
background-color: fade(@color-primary,5%);
border-radius: 4px;
padding: 16px;
margin-bottom: 24px;
/deep/.el-page-header__left {
display: flex;
align-items: center;
}
/deep/.el-page-header__content {
flex: 1;
}
.page-header-content {
display: flex;
align-items: center;
.title-text {
font-weight: 600;
}
.sns-share {
margin-left: auto;
display: flex;
align-items: center;
.el-button {
padding: 4px;
}
}
}
}
//cells列表样式
.cells {
background-color: #FFF;
line-height: 1.41176471;
font-size: 16px;
overflow: hidden;
position: relative;
&::after,
&::before {
content: " ";
position: absolute;
left: 0;
right: 0;
height: 1px;
transform: scaleY(0.5);
z-index: 2;
}
&:before {
top: 0;
border-top: 1px solid @color-border;
transform-origin: 0 0;
}
&:after {
bottom: 0;
border-bottom: 1px solid @color-border;
transform-origin: 0 100%;
}
.cell {
padding: 16px;
position: relative;
display: flex;
align-items: center;
color: inherit;
&:before {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
border-top: 1px solid @color-border-light;
transform-origin: 0 0;
transform: scaleY(0.5);
left: 16px;
z-index: 2;
}
&:first-child:before {
display: none;
}
.cell__bd {
flex: 1;
}
.cell__ft {
text-align: right;
color: @color-subsidiary;
}
&.cell_access {
cursor: pointer;
&:hover {
background-color: @color-body-bg;
}
.cell__ft {
padding-right: 22px;
position: relative;
&:after {
content: " ";
width: 12px;
height: 24px;
-webkit-mask-position: 0 0;
mask-position: 0 0;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-size: 100%;
mask-size: 100%;
background-color: currentColor;
color: #0000004d;
mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E");
position: absolute;
top: 50%;
right: 0;
margin-top: -12px;
}
}
}
}
}
.el-card__body > .cells::before {
display: none;
}
.el-card__body > .cells:last-child::after {
display: none;
}
//单独的title-text
.card-title {
font-size: 16px;
display: inline-block;
padding: 0 10px;
margin: 0 0 0 -20px;
border-radius: 0 4px 4px 0;
border-left: 5px solid @color-primary;
font-weight: 800;
}
.title-text {
font-size: 16px;
font-weight: 800;
margin-bottom: 12px;
line-height: 1;
border-left: 4px solid @color-primary;
padding-left: 6px;
}
//预览大图的时候右上角的关闭按钮颜色
.el-image-viewer__close {
color: #FFF;
}
//抽屉的内容包裹区
.el-drawer {
overflow: hidden;
.el-drawer__body {
overflow: hidden;
}
}
//版本列表
.version-list {
.version-title {
> strong:first-child {
margin-right: 12px;
}
}
.version-info {
padding-top: 16px;
}
}
//全局搜索栏
.search-form {
padding-top: 15px;
background-color: #FFF;
}
.table-control {
padding: 16px;
.el-button-group+.el-button-group {
margin-left: 10px;
}
}
.el-dialog__body .table-control {
padding: 0;
margin-bottom: 16px;
}
.table-data {
padding: 0 16px;
}
.table-pagination {
display: flex;
align-items: center;
padding: 12px 16px;
.el-pagination {
margin-left: auto;
}
}
.tb-edit .el-input {
display: none;
}
.tb-edit .current-row .el-input {
display: block;
}
.tb-edit .current-row .el-input+span {
display: none;
}
//消息提示
.el-message {
min-width: 150px;
}

@ -0,0 +1,2 @@
// import vue from '@/main.js';
export const ossUrl = "https://testpartpimejob.oss-cn-beijing.aliyuncs.com/";

@ -0,0 +1,19 @@
<template>
<section class="about">
sdfsdfs
</section>
</template>
<script>
export default {
name: 'about',
data() {
return {}
},
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.about {}
</style>

@ -0,0 +1,208 @@
<template>
<main class="home">
<PageHeader @toggleMenuClick="toggleMenu"/>
<article class="main">
<el-menu :default-active="activeMenu" class="main-menu-vertical-aside" active-text-color="#FFF" router
:unique-opened="true" :collapse="isCollapse">
<el-menu-item index="/index" style="font-size:16px;">
<i class="el-icon-s-home"></i>
<span slot="title">首页</span>
</el-menu-item>
<el-submenu index="1">
<template slot="title"><i class="el-icon-document"></i>
<span>基础数据</span></template>
<el-menu-item index="/basicData/menus-management"
@click="savePath('/basicData/menus-management','权限管理')">权限管理
</el-menu-item>
<el-menu-item index="/basicData/permission" @click="savePath('/basicData/permission','角色管理')">
</el-menu-item>
</el-submenu>
<el-submenu index="2">
<template slot="title"><i class="el-icon-s-custom"></i>
<span>人员管理</span></template>
<el-menu-item index="/basicData/personnel-list"
@click="savePath('/basicData/personnel-list','后台人员管理')">后台人员管理
</el-menu-item>
<el-menu-item index="/basicData/jobSeeker" @click="savePath('/basicData/jobSeeker','求职者管理')">
</el-menu-item>
<el-menu-item index="/basicData/hrList" @click="savePath('/basicData/hrList','招聘人员管理')">
</el-menu-item>
</el-submenu>
<el-submenu index="3">
<template slot="title"><i class="el-icon-office-building"></i>
<span>企业管理</span></template>
<el-menu-item index="/basicData/recruitmentUnit"
@click="savePath('/basicData/recruitmentUnit','企业信息管理')">企业信息管理
</el-menu-item>
</el-submenu>
<el-submenu index="4">
<template slot="title"><i class="el-icon-suitcase"></i>
<span>岗位管理</span></template>
<el-menu-item index="/jobManagement/jobInfo-list"
@click="savePath('/jobManagement/jobInfo-list','岗位信息管理')">岗位信息管理
</el-menu-item>
<el-menu-item index="/jobManagement/label-list"
@click="savePath('/jobManagement/label-list','岗位标签管理')">岗位标签管理
</el-menu-item>
</el-submenu>
</el-menu>
<section class="main-content">
<GlobalBreadcrumb @update_menu="update_menu"/>
<router-view id="mainContainer"/>
</section>
</article>
</main>
</template>
<script>
// @ is an alias to /src
import PageHeader from '@/components/PageHeader.vue'
import GlobalBreadcrumb from '@/components/GlobalBreadcrumb.vue'
import bus from "../plugins/eventBus";
export default {
name: 'home',
components: {
PageHeader,
GlobalBreadcrumb
},
data() {
return {
isCollapse: false,
activeMenu: '',
};
},
methods: {
toggleMenu(val) {
this.isCollapse = !this.isCollapse;
console.log(val);
},
savePath(url, menuName) {
// if( item.url == null ) {
// this.$message.error('')
// this.$router.go(-1)
// return;
// }
console.log('11111')
let item = {
url: url,
menuName: menuName
}
window.sessionStorage.setItem("activePath", item.url);
let jsonTabs = window.sessionStorage.getItem("tabs")
let tabs = JSON.parse(jsonTabs)
if (tabs == null)
tabs = {
rows: []
}
item.url == '/index' ? '' : tabs.rows.push(item)
//
let obj = {
rows: this.unqiueArr(tabs.rows)
}
window.sessionStorage.setItem("tabs", JSON.stringify(obj))
bus.$emit("tabsEvent")
},
unqiueArr(arr) {
var tmp = new Set(arr.map(item => JSON.stringify(item)));
return Array.from(tmp).map(item => JSON.parse(item));
},
// active(r){
//
// }
update_menu(r) {
console.log('rrrrrrrrrrrr', r)
this.activeMenu = r.path
//this.$refs.menulist.active(r)
}
},
mounted() {
console.log(this.$route.name + '加' + this.$route.path)
this.activeMenu = this.$route.path
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.home {
height: 100%;
overflow: hidden;
display: flex;
flex-flow: column;
.main {
display: flex;
overflow: hidden;
flex: 1;
.main-menu-vertical-aside:not(.el-menu--collapse) {
width: 240px;
overflow: scroll; /*zhou左侧菜单栏滚动条*/
}
}
.main-content {
display: flex;
flex-flow: column;
overflow: hidden;
flex: 1;
}
#mainContainer {
flex: 1;
/*overflow: hidden;*/
background-color: @color-body-bg;
overflow: scroll; /*zhou滚动条*/
}
}
/deep/ .main-menu-vertical-aside {
.el-submenu__title {
font-size: 16px;
&:hover {
background-color: fade(@color-deep-bg, 5%);
}
}
.el-menu-item.is-active,
.el-menu-item.is-active:focus,
.el-menu-item.is-active:hover {
background-color: @color-primary;
}
.el-submenu {
.el-menu-item {
padding-left: 50px !important;
}
}
.el-submenu.is-opened {
.el-menu,
.el-submenu__title {
background-color: fade(@color-deep-bg, 8%);
}
}
.el-menu-item-group {
.el-menu-item-group__title {
background-color: rgba(255, 255, 255, .1);
opacity: 0.5;
padding-left: 50px !important;
}
.el-menu-item {
padding-left: 60px !important;
}
}
.el-menu-item:focus,
.el-menu-item:hover {
background-color: fade(@color-deep-bg, 5%);
}
}
</style>

@ -0,0 +1,254 @@
<template>
<section class="login" style="padding-left: 35%;padding-top: 10%">
<!-- <div class="login-box">-->
<!-- <div class="side-banner">-->
<!-- <h2>欢迎使用兼职平台后台管理系统</h2>-->
<!-- <p>兼职平台是一家***************</p>-->
<!-- <div><img src="../static/images/login-asie.png" alt="" style="display:block;width:100%;"></div>-->
<!-- </div>-->
<div class="side-form" >
<!-- <img src="../static/images/logo_se.png" alt="互联LOGO">-->
<h2>兼职 实践<br>
Part-time Job<br></h2>
<!-- <p class="icon-arrow-down">{{userControlStatus}}</p>-->
<p style="font-size: 30px">{{userControlStatus}}</p>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" v-if="isLogin">
<el-form-item prop="username">
<el-input placeholder="请输入帐号" prefix-icon="el-icon-user" v-model="ruleForm.username" clearable>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input placeholder="请输入登录密码" type="password" autocomplete="off" prefix-icon="el-icon-lock" v-model="ruleForm.password" clearable>
</el-input>
</el-form-item>
<el-form-item>
<!-- <el-checkbox v-model="checked" @change="rememberMe()"></el-checkbox>-->
</el-form-item>
<el-button type="info" size="default" @click="login('ruleForm')" style="display:block;width:100%;">登录</el-button>
</el-form>
</div>
<!-- </div>-->
</section>
</template>
<script>
export default {
name: 'login',
data() {
return {
headers: {
Authorization: sessionStorage.getItem("JWT_TOKEN"),
},
checked: false,
isForgetPassword: false,
isLogin: true,
isReg: false,
userControlStatus: '登录',
show: true, //
count: 60, //
timer: null, //
checkForm: {
username: "",
password: "",
},
ruleForm: {
companyCode: '',
username: '',
phone: '',
password: '',
verificationCode: '',
rememberMyName: true
},
rules: {
username: [{
required: true,
message: '请输入用户名',
trigger: 'blur'
}],
password: [{
required: true,
message: '请输入密码',
trigger: 'blur'
}],
}
}
},
methods: {
login(formName){
console.log("this.toLocalStorage",this.toLocalStorage);
console.log("formName"+formName);
this.rememberMe();
this.loading = true;
console.log("this.ruleForm",this.ruleForm);
this.$refs[formName].validate((valid) => {
if (valid) {
this.$axios.post("/sysUser/login", this.ruleForm).then((res) => {
console.log("res",res);
if (res.code == 200) {
//
this.toLocalStorage(this.checkForm);
this.$message.success("登入成功");
//token
sessionStorage.setItem("JWT_TOKEN", res.data);
this.getUserInfo();
} else {
console.log("登陆失败",res);
this.$message.error({
title: "登入失败",
message: res.msg,
type: "error",
});
}
this.loading = false;
}).catch(err=>{
this.$message.error({title: "登入失败", message: err, type: "error"});
this.loading = false;
});
} else {
this.$message.error("登录失败");
return false;
}
});
},
async getUserInfo() {
var data = {};
data["headers"] = this.headers;
let res = await this.$axios.get("/user/info",data);
console.log("res",res);
if (res.code !== 200) {
return this.$message.error("获取用户信息失败:" + res.data.msg);
}
if(!res.data.isAdmin&&res.data.roles.length<1){
return this.$message.error("您没有任何权限进入此系统,请联系管理员为您分配");
}
//
this.$store.commit("SET_USER_INFO", res.data);
//home
this.$router.push("/");
console.log("this.$router",this.$router);
},
//checkform
rememberMe(){
if(this.checked === true){
this.checkForm.username = this.ruleForm.username;
this.checkForm.password = this.ruleForm.password;
//console.log("",this.checkForm);
}else{
this.checkForm.username = '';
this.checkForm.password = '';
//console.log("",this.checkForm);
}
},
//
toLocalStorage(data){
if(data.username !== ''){
localStorage.setItem("username",data.username);
localStorage.setItem("password",data.password);
}
},
},
mounted() {
//
if(localStorage.getItem("username") != null){
this.ruleForm.username = localStorage.getItem("username");
this.ruleForm.password = localStorage.getItem("password");
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
#particle-canvas {
position: absolute;
left: 0;
right: 0;
width: 100%;
height: 100%;
z-index: 0;
}
.login {
height: 100%;
/*<!--background-color: @color-deep-bg;-->*/
background-image: url(../../src/../source/bbbb.jpg);
background-size: cover;
.login-box {
width: 1024px;
margin: 0 auto;
display: flex;
transform: translate(-50%,-50%);
position: absolute;
z-index: 20;
top: 50%;
left: 50%;
box-shadow: 0 20px 40px 0 rgba(0,0,0,0.08);
}
.side-banner {
width: 512px;
flex: 0 0 512px;
/*background: linear-gradient(314deg, #3a54e1 5%, #3acce1 100%) #00aae7;*/
/*background-color: #3acce1ab;*/
background: linear-gradient(314deg, #3a54e1 5%, #3acce1 100%) #00aae7;
background-color: #3acce1ab;
background-blend-mode: saturation;
text-align: center;
color: #FFF;
padding-bottom: 56px;
border-radius: 4px 0 0 4px;
display: flex;
flex-flow: column;
h2 {
font-size: 32px;
margin-bottom: 16px;
padding-top: 56px;
}
p {
padding: 0 56px;
margin-bottom: 16px;
}
div {
flex: 1;
margin-top: auto;
display: flex;
flex-flow: column;
justify-content: flex-end;
}
}
.side-form {
width: 512px;
flex: 0 0 512px;
padding: 56px;
background-color: #FFF;
border-radius: 0 4px 4px 0;
text-align: center;
h2 {
font-size: 32px;
margin-bottom: 16px;
}
p {
padding: 0 56px;
margin-bottom: 56px;
font-size: 20px;
font-weight: 800;
color: @color-primary;
&.icon-arrow-down {
position: relative;
&::after {
content: "";
position: absolute;
border: 10px solid transparent;
border-top-color: @color-border;
left: 50%;
margin-left: -10px;
bottom: -30px;
}
}
}
.el-form {
margin-bottom: 24px;
}
}
}
</style>

@ -0,0 +1,17 @@
const path = require('path')
module.exports = {
pluginOptions: {
'style-resources-loader': {
preProcessor: 'less',
patterns: [path.resolve(__dirname, './src/theme/colors.less')]
}
},
productionSourceMap: false,
devServer: {
port: 8082,
},
css: {
extract: false
}
}

@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save