Commit 5b3ccb43 by 胡悦

修改规则

1 parent 68cc569a
......@@ -21,11 +21,6 @@
v-if="item.clickFunc"
:type="item.inputText || 'text'"
:readonly="item.readonly || false"
:disabled="item.disabled || false"
:maxlength="item.maxlength"
:minlength="item.minlength"
:clearable="item.clearable"
show-word-limit
@click.native="item.clickFunc"
:class="item.clickFunc ? 'pointer' : ''"
:ref="item.ref"
......@@ -41,8 +36,9 @@
v-model="ruleForm[item.prop]"
:maxlength="item.maxlength"
:minlength="item.minlength"
:show-password="item.showPassword || false"
:clearable="item.clearable"
show-word-limit
:show-word-limit="item.showWordLimit || false"
>
</el-input>
</template>
......
......@@ -26,6 +26,11 @@ const Constants = {
2: '菜单',
3: '按钮'
},
MENU_NAME: {
1: '目录',
2: '菜单',
3: '按钮'
},
// 菜单状态
MENU_STATUS: {
1: '正常, green',
......
......@@ -109,7 +109,7 @@ export default {
placeholder: '请选择字典状态',
options: [
{
label: '正常',
label: '启用',
value: 1
}, {
label: '停用',
......@@ -174,11 +174,11 @@ export default {
},
dictDataData: [
{ label: '字典类型:', prop: 'dictType', type: 'input', readonly: true },
{ label: '字典标签:', prop: 'dictLabel', type: 'input', maxlength: 50 },
{ label: '字典标签:', prop: 'dictLabel', type: 'input', maxlength: 20 },
{ label: '字典键值:', prop: 'dictValue', type: 'input', maxlength: 50 },
{ label: '字典顺序:', prop: 'dictSort', type: 'input' },
{ label: '状态', prop: 'enableStatus', type: 'switch' },
{ label: '备注', prop: 'remark', type: 'input', inputText: 'textarea' }
{ label: '备注', prop: 'remark', type: 'input', inputText: 'textarea', maxlength: 200, showWordLimit: true }
],
dictDataRules: {
dictType: [{ required: true }],
......
......@@ -175,16 +175,14 @@ export default {
enableStatus: true
},
dictionaryData: [
{ label: '字典名称:', prop: 'dictName', type: 'input', maxlength: 50 },
{ label: '字典名称:', prop: 'dictName', type: 'input', maxlength: 20 },
{ label: '字典类型', prop: 'dictType', type: 'input', maxlength: 50 },
{ label: '状态', prop: 'enableStatus', type: 'switch' },
{ label: '备注', prop: 'remark', type: 'input', inputText: 'textarea', maxlength: 200 }
{ label: '备注', prop: 'remark', type: 'input', inputText: 'textarea', maxlength: 200, showWordLimit: true }
],
dictionaryRules: {
dictName: [{ required: true, message: '请输入字典名称', trigger: blur },
{ validator: this.$Common.checkName, trigger: 'blur' }],
dictType: [{ required: true, message: '请输入字典类型', trigger: blur },
{ validator: this.$Common.checkName, trigger: 'blur' }],
dictName: [{ required: true, message: '请输入字典名称', trigger: blur }],
dictType: [{ required: true, message: '请输入字典类型', trigger: blur }],
enableStatus: [{ required: true }]
}
}
......
......@@ -58,7 +58,7 @@
</template>
<template v-else-if="item.prop === 'type'">
<span>
{{scope.row.type ? MENU_TYPE[scope.row.type] : '--'}}
{{scope.row.type ? MENU_NAME[scope.row.type] : '--'}}
</span>
</template>
<template v-else>
......@@ -147,7 +147,7 @@ export default {
data() {
return {
MENUSTATUS: this.$Constants.MENU_STATUS,
MENU_TYPE: this.$Constants.MENU_TYPE,
MENU_NAME: this.$Constants.MENU_NAME,
searchForm: {},
menuFormList: [
{
......@@ -221,7 +221,7 @@ export default {
menuData: [
{ label: '菜单类型', prop: 'type', type: 'radio', children: this.$Constants.MENU_TYPE, disabled: false },
{ label: '上级菜单', prop: 'parentName', type: 'input', readonly: true, clickFunc: this.selectSuperior, hidden: true },
{ label: '菜单名称', prop: 'menuName', type: 'input' },
{ label: '菜单名称', prop: 'menuName', type: 'input', maxlength: 20 },
{ label: '权限标识', prop: 'permissionTag', type: 'input' },
{ label: '前端路由', prop: 'frontRoute', type: 'input' },
{ label: '显示排序', prop: 'orderNum', type: 'input' },
......@@ -231,7 +231,8 @@ export default {
menuRules: {
type: [{ required: true, message: '请选择菜单类型', trigger: 'blur' }],
menuName: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }],
orderNum: [{ required: true, message: '请输入显示排序', trigger: 'blur' }],
orderNum: [{ required: true, message: '请输入显示排序', trigger: 'blur' },
{ validator: this.$Common.checkRegExpNumber, trigger: 'blur' }],
enableStatus: [{ required: true }],
},
// 部门弹窗
......
......@@ -182,13 +182,14 @@ export default {
},
orginizaData: [
{ label: '上级组织', prop: 'superiorName', type: 'input', hidden: false, readonly: true },
{ label: '组织名称', prop: 'departmentName', type: 'input' },
{ label: '组织名称', prop: 'departmentName', type: 'input', maxlength: 20 },
{ label: '显示排序', prop: 'orderNum', type: 'input' },
{ label: '组织状态', prop: 'enableStatus', type: 'switch' }
],
orginizaRules: {
departmentName: [{ required: true, message: '请输入组织名称', trigger: 'blur' }],
orderNum: [{ required: true, message: '请输入显示排序', trigger: 'blur' }],
orderNum: [{ required: true, message: '请输入显示排序', trigger: 'blur' },
{ validator: this.$Common.checkRegExpNumber, trigger: 'blur' }],
enableStatus: [{ required: true }]
},
// 部门弹窗
......
......@@ -37,6 +37,16 @@
:hasNum="false"
>
<span
slot="status"
slot-scope="scope"
>
<span
class="dot"
:class="scope.scope.enableStatus ? USERSTATUS[scope.scope.enableStatus].split(',')[1] : ''"
></span>
<span class="statusText">{{ scope.scope.enableStatus ? USERSTATUS[scope.scope.enableStatus].split(',')[0] : '--'}}</span>
</span>
<span
slot="table-button"
slot-scope="scope"
>
......@@ -121,6 +131,7 @@ export default {
}
}
return {
USERSTATUS: this.$Constants.USER_STATUS,
searchForm: {},
roleFormList: [
{
......@@ -131,8 +142,8 @@ export default {
}
],
tableParams: {
mutiSelectName: 'role',
mutiSelectUniqueKey: 'id',
// mutiSelectName: 'role',
// mutiSelectUniqueKey: 'id',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [
......@@ -143,6 +154,10 @@ export default {
label: '备注',
prop: 'remark'
}, {
label: '状态',
prop: 'enableStatus',
addHtml: 'status'
}, {
label: '创建时间',
prop: 'createdDate'
}
......@@ -172,8 +187,8 @@ export default {
menuIdList: []
},
roleData: [
{ label: '角色名称:', prop: 'roleName', type: 'input' },
{ label: '备注:', prop: 'remark', type: 'input' },
{ label: '角色名称:', prop: 'roleName', type: 'input', maxlength: 50 },
{ label: '备注:', prop: 'remark', type: 'input', inputText: 'textarea', maxlength: 200, showWordLimit: true },
{ label: '状态:', prop: 'enableStatus', type: 'switch' },
{ label: '租户可见度:', prop: 'roleVisibility', type: 'customize', slotName: 'visible-type' },
{ label: '数据权限:', prop: 'rolePermissionType', type: 'radio', children: this.$Constants.ROLE_AUTH },
......
......@@ -221,14 +221,14 @@ export default {
},
roleList: [],
userData: [
{ label: '登录名称:', prop: 'account', type: 'input', clearable: true },
{ label: '部门名称:', prop: 'departmentName', type: 'input', clearable: true, readonly: true, clickFunc: this.selectDepart },
{ label: '直接上级:', prop: 'superiorName', type: 'input', clearable: true, readonly: true, clickFunc: this.selectSuperior, hidden: true },
{ label: '用户名称:', prop: 'username', type: 'input' },
{ label: '密码:', prop: 'password', type: 'input', inputText: 'password' },
{ label: '登录名称:', prop: 'account', type: 'input', clearable: true, maxlength: 50 },
{ label: '部门名称:', prop: 'departmentName', type: 'input', readonly: true, clickFunc: this.selectDepart },
{ label: '直接上级:', prop: 'superiorName', type: 'input', readonly: true, clickFunc: this.selectSuperior, hidden: true },
{ label: '用户名称:', prop: 'username', type: 'input', clearable: true, maxlength: 50 },
{ label: '密码:', prop: 'password', type: 'input', inputText: 'password', showPassword: true },
{ label: '角色:', prop: 'roleId', type: 'select', options: [], key: 'roleName', value: 'roleId', filterable: true },
{ label: '邮箱:', prop: 'email', type: 'input' },
{ label: '手机:', prop: 'phoneNumber', type: 'input' },
{ label: '手机:', prop: 'phoneNumber', type: 'input', maxlength: 11 },
{ label: '性别:', prop: 'gender', type: 'select', options: [], key: 'dictLabel', value: 'dictValue' },
{ label: '状态:', prop: 'enableStatus', type: 'switch' },
{ label: '岗位:', prop: 'position', type: 'select', options: [], key: 'dictLabel', value: 'dictValue' }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!