Skip to content

Commit

Permalink
🔖 Releasing / Version tags. 2.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pig666 committed Jun 1, 2020
1 parent 2385ec8 commit 11a71a0
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 99 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pig-ui",
"version": "2.7.3",
"version": "2.7.5",
"private": true,
"scripts": {
"pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",
Expand Down
50 changes: 28 additions & 22 deletions src/const/crud/admin/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import { getDetails } from '@/api/admin/user'
import {getDetails} from '@/api/admin/user'

var validateUsername = (rule, value, callback) => {
const validateUsername = (rule, value, callback) => {
if (!value) {
return callback(new Error('请输入用户名'))
}
getDetails(value).then(response => {
if (window.boxType === 'edit') callback()
let result = response.data.data
Expand All @@ -28,6 +31,18 @@ var validateUsername = (rule, value, callback) => {
})
}

// 设置密码校验规则
const checkPassword = (rule, value, callback) => {
if (window.boxType === 'edit') {
return callback()
}
if (!value) {
callback(new Error('请输入密码'))
} else {
callback()
}
}

// 设置手机号的验证规则
const checkPhone = (rule, value, callback) => {
if (!value) {
Expand Down Expand Up @@ -59,7 +74,7 @@ export const tableOption = {
prop: 'userId',
span: 24,
hide: true,
editDisabled: true,
editDisplay: false,
addDisplay: false
}, {
fixed: true,
Expand All @@ -73,13 +88,13 @@ export const tableOption = {
required: true,
message: '请输入用户名'
},
{
min: 3,
max: 20,
message: '长度在 3 到 20 个字符',
trigger: 'blur'
},
{ validator: validateUsername, trigger: 'blur' }
{
min: 3,
max: 20,
message: '长度在 3 到 20 个字符',
trigger: 'blur'
},
{validator: validateUsername, trigger: 'blur'}
]
}, {
label: '密码',
Expand All @@ -88,16 +103,7 @@ export const tableOption = {
value: '',
hide: true,
span: 24,
rules: [{
required: true,
message: '密码不能为空',
trigger: 'blur'
},{
min: 6,
max: 20,
message: '长度在 6 到 20 个字符',
trigger: 'blur'
}]
rules: [{validator: checkPassword, trigger: 'blur'}]
}, {
label: '所属部门',
prop: 'deptId',
Expand All @@ -116,11 +122,11 @@ export const tableOption = {
type: 'phone',
value: '',
span: 24,
rules: [ {
rules: [{
required: true,
message: '密码不能为空',
trigger: 'blur'
},{
}, {
validator: checkPhone,
trigger: 'blur'
}]
Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import basicContainer from './components/basic-container/main'
Vue.use(VueAxios, axios)

Vue.use(ElementUI, {
size: 'medium',
size: 'small',
menuType: 'text'
})

Vue.use(Avue, {
size: 'medium',
size: 'small',
menuType: 'text'
})

Expand Down
2 changes: 1 addition & 1 deletion src/page/index/tags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</el-tabs>
<el-dropdown class="avue-tags__menu">
<el-button type="primary"
size="mini">
>
更多
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
Expand Down
2 changes: 1 addition & 1 deletion src/page/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
src="/img/logo.png"
alt="">
<p class="title">{{website.infoTitle}}</p>
<p>©2020 v2.7.3</p>
<p>©2020 v2.7.5</p>
</div>
<div class="login-border">
<div class="login-main">
Expand Down
1 change: 0 additions & 1 deletion src/page/login/userlogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
</el-form-item>
<el-form-item>
<el-button type="primary"
size="small"
@click.native.prevent="handleLogin"
class="login-submit">登录</el-button>
</el-form-item>
Expand Down
2 changes: 1 addition & 1 deletion src/page/wel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="banner-text">
<span>
<a href="https://avue.top/#/pay" target="_blank">
<img src="https://img.shields.io/badge/Avue-2.3.5-green.svg" alt="Build Status">
<img src="https://img.shields.io/badge/Element-2.13.0-green.svg" alt="Build Status">
</a>
<img src="https://img.shields.io/badge/Spring%20Boot-2.2.6.RELEASE-yellowgreen.svg" alt="Downloads">
<img src="https://img.shields.io/badge/Spring%20Cloud-Hoxton.SR3-blue.svg" alt="Coverage Status">
Expand Down
1 change: 0 additions & 1 deletion src/views/admin/dict/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
<el-button
v-if="permissions.sys_dict_add"
type="text"
size="small"
icon="el-icon-menu"
@click="handleItem(scope.row,scope.index)">字典项
</el-button>
Expand Down
10 changes: 2 additions & 8 deletions src/views/admin/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,17 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="small"
type="text"
icon="el-icon-plus"
@click="addOrUpdateHandle(false,scope.row.id)"
v-if="permissions.sys_menu_add">添加
</el-button>
<el-button size="small"
type="text"
<el-button type="text"
icon="el-icon-edit"
@click="addOrUpdateHandle(true,scope.row.id)"
v-if="permissions.sys_menu_edit">修改
</el-button>
<el-button
size="small"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
<el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-if="permissions.sys_menu_del">删除
</el-button>
</template>
Expand Down
35 changes: 16 additions & 19 deletions src/views/admin/role/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
class="filter-item"
type="primary"
icon="el-icon-edit"
@click="handleCreate">添加
@click="$refs.crud.rowAdd()">添加
</el-button>
</template>
<template slot="dsScopeForm" slot-scope="scope">
Expand All @@ -62,21 +62,18 @@
<el-button
v-if="roleManager_btn_edit"
type="text"
size="mini"
icon="el-icon-edit"
@click="handleUpdate(scope.row,scope.index)">编辑
</el-button>
<el-button
v-if="roleManager_btn_del"
type="text"
size="mini"
icon="el-icon-delete"
@click="handleDelete(scope.row,scope.index)">删除
</el-button>
<el-button
v-if="roleManager_btn_perm"
type="text"
size="mini"
icon="el-icon-plus"
@click="handlePermission(scope.row,scope.index)">权限
</el-button>
Expand Down Expand Up @@ -105,24 +102,23 @@
class="dialog-footer">
<el-button
type="primary"
size="small"
@click="updatePermession(roleId)">更 新
</el-button>
<el-button
type="default"
size="small"
@click="cancal()">取消</el-button>
@click="cancal()">取消
</el-button>
</div>
</el-dialog>
</div>
</template>

<script>
import { addObj, delObj, fetchList, fetchRoleTree, permissionUpd, putObj } from '@/api/admin/role'
import { tableOption } from '@/const/crud/admin/role'
import { fetchTree } from '@/api/admin/dept'
import { fetchMenuTree } from '@/api/admin/menu'
import { mapGetters } from 'vuex'
import {addObj, delObj, fetchList, fetchRoleTree, permissionUpd, putObj} from '@/api/admin/role'
import {tableOption} from '@/const/crud/admin/role'
import {fetchTree} from '@/api/admin/dept'
import {fetchMenuTree} from '@/api/admin/menu'
import {mapGetters} from 'vuex'
export default {
name: 'TableRole',
Expand Down Expand Up @@ -185,11 +181,9 @@
},
handleFilter(form) {
this.searchForm = form
this.page.currentPage = 1
this.getList(this.page, form)
},
handleCreate() {
this.$refs.crud.rowAdd()
},
handleOpenBefore(show) {
fetchTree().then(response => {
this.dsScopeData = response.data.data
Expand All @@ -204,7 +198,7 @@
handleUpdate(row, index) {
this.$refs.crud.rowEdit(row, index)
},
cancal () {
cancal() {
this.dialogPermissionVisible = false;
},
handlePermission(row) {
Expand Down Expand Up @@ -254,7 +248,7 @@
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
}).then(function () {
return delObj(row.roleId)
}).then(() => {
this.getList(this.page)
Expand Down Expand Up @@ -285,12 +279,12 @@
loading()
})
},
updatePermession (roleId) {
updatePermession(roleId) {
this.menuIds = ''
this.menuIds = this.$refs.menuTree.getCheckedKeys().join(',').concat(',').concat(this.$refs.menuTree.getHalfCheckedKeys().join(','))
permissionUpd(roleId, this.menuIds).then(() => {
this.dialogPermissionVisible = false
this.$store.dispatch('GetMenu', {type:false})
this.$store.dispatch('GetMenu', {type: false})
this.$notify.success('修改成功')
})
}
Expand All @@ -302,15 +296,18 @@
.el-dialog__wrapper {
.el-dialog {
width: 61% !important;
.dialog-main-tree {
max-height: 400px;
overflow-y: auto;
}
}
.el-form-item__label {
width: 20% !important;
padding-right: 20px;
}
.el-form-item__content {
margin-left: 20% !important;
}
Expand Down
Loading

0 comments on commit 11a71a0

Please sign in to comment.