Commit 1e3f8399 by 冒粤蓉
2 parents 010828a3 2bee0341
...@@ -185,8 +185,8 @@ export default { ...@@ -185,8 +185,8 @@ export default {
{ label: '字典标签:', prop: 'dictLabel', type: 'input', maxlength: 20 }, { label: '字典标签:', prop: 'dictLabel', type: 'input', maxlength: 20 },
{ label: '字典键值:', prop: 'dictValue', type: 'input', maxlength: 50 }, { label: '字典键值:', prop: 'dictValue', type: 'input', maxlength: 50 },
{ label: '字典排序:', prop: 'dictSort', type: 'input', maxlength: 5 }, { label: '字典排序:', prop: 'dictSort', type: 'input', maxlength: 5 },
{ label: '状态', prop: 'enableStatus', type: 'switch' }, { label: '状态:', prop: 'enableStatus', type: 'switch' },
{ label: '备注', prop: 'remark', type: 'input', inputText: 'textarea', maxlength: 200, showWordLimit: true } { label: '备注:', prop: 'remark', type: 'input', inputText: 'textarea', maxlength: 200, showWordLimit: true }
], ],
dictDataRules: { dictDataRules: {
dictType: [{ required: true }], dictType: [{ required: true }],
...@@ -199,32 +199,32 @@ export default { ...@@ -199,32 +199,32 @@ export default {
} }
}, },
mounted() { mounted() {
let params = this.$route.params; let params = this.$route.params
if((JSON.stringify(params) === '{}' || !params)) { if ((JSON.stringify(params) === '{}' || !params)) {
params = this.getInitStorage(); params = this.getInitStorage()
this.storageParams = params; this.storageParams = params
} }
if(params) { if (params) {
this.searchForm.name = params.row.dictName this.searchForm.name = params.row.dictName
this.dictDataForm.dictType = params.row.dictType // this.dictDataForm.dictType = params.row.dictType
this.dictDataForm.enableStatus = params.row.enableStatus // this.dictDataForm.enableStatus = params.row.enableStatus == 1
} }
}, },
methods: { methods: {
getInitStorage() { getInitStorage() {
const getStorageParams = localStorage.getItem('dictionaryParams'); const getStorageParams = localStorage.getItem('dictionaryParams')
if(getStorageParams) { if (getStorageParams) {
return JSON.parse(getStorageParams); return JSON.parse(getStorageParams)
} else { } else {
return ''; return ''
} }
}, },
// 重置搜索条件 // 重置搜索条件
refresh() { refresh() {
let name = ''; let name = '';
if(this.$route.params.row) { if (this.$route.params.row) {
name = this.$route.params.row.dictName; name = this.$route.params.row.dictName;
} else if(this.storageParams.row) { } else if (this.storageParams.row) {
name = this.storageParams.row.dictName; name = this.storageParams.row.dictName;
} }
this.searchForm = { this.searchForm = {
...@@ -233,11 +233,11 @@ export default { ...@@ -233,11 +233,11 @@ export default {
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let getDictType = ''; let getDictType = '';
setTimeout(() => { setTimeout(() => {
if(this.$route.params.row) { if (this.$route.params.row) {
getDictType = this.$route.params.row.dictType; getDictType = this.$route.params.row.dictType;
} else if(this.storageParams.row) { } else if (this.storageParams.row) {
getDictType = this.storageParams.row.dictType; getDictType = this.storageParams.row.dictType;
} }
...@@ -299,6 +299,11 @@ export default { ...@@ -299,6 +299,11 @@ export default {
switch (pType) { switch (pType) {
case 'create': case 'create':
this.dictDataDialogTitle = '新增字典' this.dictDataDialogTitle = '新增字典'
const params = this.getInitStorage()
this.dictDataForm = {
dictType: params.row.dictType,
enableStatus: params.row.enableStatus == 1
}
this.handleClose() this.handleClose()
break break
case 'edit': case 'edit':
......
...@@ -181,9 +181,9 @@ export default { ...@@ -181,9 +181,9 @@ export default {
}, },
dictionaryData: [ dictionaryData: [
{ label: '字典名称:', prop: 'dictName', type: 'input', maxlength: 20 }, { label: '字典名称:', prop: 'dictName', type: 'input', maxlength: 20 },
{ label: '字典类型', prop: 'dictType', type: 'input', maxlength: 50, readonly: false }, { label: '字典类型:', prop: 'dictType', type: 'input', maxlength: 50, readonly: false },
{ label: '状态', prop: 'enableStatus', type: 'switch' }, { label: '状态:', prop: 'enableStatus', type: 'switch' },
{ label: '备注', prop: 'remark', type: 'input', inputText: 'textarea', maxlength: 200, showWordLimit: true } { label: '备注:', prop: 'remark', type: 'input', inputText: 'textarea', maxlength: 200, showWordLimit: true }
], ],
dictionaryRules: { dictionaryRules: {
dictName: [{ required: true, message: '请输入字典名称', trigger: blur }], dictName: [{ required: true, message: '请输入字典名称', trigger: blur }],
......
...@@ -219,14 +219,14 @@ export default { ...@@ -219,14 +219,14 @@ export default {
enableStatus: true enableStatus: true
}, },
menuData: [ menuData: [
{ label: '菜单类型', prop: 'type', type: 'radio', children: this.$Constants.MENU_TYPE, disabled: false }, { 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: 'parentName', type: 'input', readonly: true, clickFunc: this.selectSuperior, hidden: true },
{ label: '菜单名称', prop: 'menuName', type: 'input', maxlength: 20 }, { label: '菜单名称:', prop: 'menuName', type: 'input', maxlength: 20 },
{ label: '权限标识', prop: 'permissionTag', type: 'input' }, { label: '权限标识:', prop: 'permissionTag', type: 'input' },
{ label: '前端路由', prop: 'frontRoute', type: 'input' }, { label: '前端路由:', prop: 'frontRoute', type: 'input' },
{ label: '显示排序', prop: 'orderNum', type: 'input', maxlength: 5 }, { label: '显示排序:', prop: 'orderNum', type: 'input', maxlength: 5 },
{ label: '显示状态', prop: 'enableStatus', type: 'switch' }, { label: '显示状态:', prop: 'enableStatus', type: 'switch' },
{ label: '图标', prop: 'icon', type: 'input', hidden: false } { label: '图标:', prop: 'icon', type: 'input', hidden: false }
], ],
menuRules: { menuRules: {
type: [{ required: true, message: '请选择菜单类型', trigger: 'blur' }], type: [{ required: true, message: '请选择菜单类型', trigger: 'blur' }],
......
...@@ -183,10 +183,10 @@ export default { ...@@ -183,10 +183,10 @@ export default {
enableStatus: true enableStatus: true
}, },
orginizaData: [ orginizaData: [
{ label: '上级组织', prop: 'superiorName', type: 'input', hidden: false, readonly: true }, { label: '上级组织:', prop: 'superiorName', type: 'input', hidden: false, readonly: true },
{ label: '组织名称', prop: 'departmentName', type: 'input', maxlength: 20 }, { label: '组织名称:', prop: 'departmentName', type: 'input', maxlength: 20 },
{ label: '显示排序', prop: 'orderNum', type: 'input', maxlength: 5 }, { label: '显示排序:', prop: 'orderNum', type: 'input', maxlength: 5 },
{ label: '组织状态', prop: 'enableStatus', type: 'switch' } { label: '组织状态:', prop: 'enableStatus', type: 'switch' }
], ],
orginizaRules: { orginizaRules: {
departmentName: [{ required: true, message: '请输入组织名称', trigger: 'blur' }], departmentName: [{ required: true, message: '请输入组织名称', trigger: 'blur' }],
...@@ -196,7 +196,6 @@ export default { ...@@ -196,7 +196,6 @@ export default {
}, },
// 部门弹窗 // 部门弹窗
isRoot: false isRoot: false
} }
}, },
watch: { watch: {
......
...@@ -521,7 +521,7 @@ export default { ...@@ -521,7 +521,7 @@ export default {
}, },
// 获取性别列表 // 获取性别列表
getSex() { getSex() {
dictInfo('sys_user_sex2').then(res => { dictInfo('sys_user_sex').then(res => {
if (res.data.length > 0) { if (res.data.length > 0) {
this.deleteDict(res.data, 'gender', this.sexList) this.deleteDict(res.data, 'gender', this.sexList)
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!