diff --git a/src/api/system/dict/data.js b/src/api/system/dict/data.js
index 6c9eb79..8a66920 100644
--- a/src/api/system/dict/data.js
+++ b/src/api/system/dict/data.js
@@ -44,9 +44,10 @@ export function updateData(data) {
}
// 删除字典数据
-export function delData(dictCode) {
+export function delData(data) {
return request({
- url: '/system/dict/data/' + dictCode,
- method: 'delete'
+ url: '/system/dict/data/delete',
+ method: 'post',
+ data
})
}
diff --git a/src/api/system/dict/type.js b/src/api/system/dict/type.js
index a7a6e01..d127ef6 100644
--- a/src/api/system/dict/type.js
+++ b/src/api/system/dict/type.js
@@ -36,10 +36,11 @@ export function updateType(data) {
}
// 删除字典类型
-export function delType(dictId) {
+export function delType(data) {
return request({
- url: '/system/dict/type/' + dictId,
- method: 'delete'
+ url: '/system/dict/type/delete',
+ method: 'post',
+ data
})
}
@@ -57,4 +58,4 @@ export function optionselect() {
url: '/system/dict/type/optionselect',
method: 'get'
})
-}
\ No newline at end of file
+}
diff --git a/src/api/system/role.js b/src/api/system/role.js
index e9faa74..fe1bc8b 100644
--- a/src/api/system/role.js
+++ b/src/api/system/role.js
@@ -45,11 +45,7 @@ export function dataScope(data) {
}
// 角色状态修改
-export function changeRoleStatus(roleId, status) {
- const data = {
- roleId,
- status
- }
+export function changeRoleStatus(data) {
return request({
url: '/system/role/changeStatus',
method: 'put',
diff --git a/src/api/system/user.js b/src/api/system/user.js
index 1577c9b..a70db33 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -58,11 +58,7 @@ export function resetUserPwd(userId, password) {
}
// 用户状态修改
-export function changeUserStatus(userId, status) {
- const data = {
- userId,
- status
- }
+export function changeUserStatus(data) {
return request({
url: '/system/user/changeStatus',
method: 'put',
diff --git a/src/lang/en/system/dict.js b/src/lang/en/system/dict.js
index 00fc703..c22a196 100644
--- a/src/lang/en/system/dict.js
+++ b/src/lang/en/system/dict.js
@@ -5,5 +5,13 @@ export default {
bq: 'Label',
jz: 'Value',
sort: 'Sort',
- refresh: 'Refresh Cache'
+ refresh: 'Refresh Cache',
+
+ addDict: 'Create Term Book',
+ modifyDict: 'Edit Term Book',
+ deleteDict: 'Remove Term Book',
+
+ addDictData: 'Create Term Book Data',
+ modifyDictData: 'Edit Term Book Data',
+ deleteDictData: 'Remove Term Book Data'
}
diff --git a/src/lang/zh/system/dict.js b/src/lang/zh/system/dict.js
index 7ac77aa..cbe2a56 100644
--- a/src/lang/zh/system/dict.js
+++ b/src/lang/zh/system/dict.js
@@ -5,5 +5,13 @@ export default {
bq: '标签',
jz: '键值',
sort: '排序',
- refresh: '刷新缓存'
+ refresh: '刷新缓存',
+
+ addDict: '新增字典',
+ modifyDict: '编辑字典',
+ deleteDict: '删除字典',
+
+ addDictData: '新增字典数据',
+ modifyDictData: '编辑字典数据',
+ deleteDictData: '删除字典数据'
}
diff --git a/src/lang/zh/system/user.js b/src/lang/zh/system/user.js
index d062f3d..e5be1a1 100644
--- a/src/lang/zh/system/user.js
+++ b/src/lang/zh/system/user.js
@@ -16,8 +16,8 @@ export default {
edit: '编辑',
history: '角色变更历史',
- addUser: '新增角色',
- modifyUser: '编辑角色',
+ addUser: '新增用户',
+ modifyUser: '编辑用户',
phoneError: '请输入正确的手机号码',
bgqjs: '变更前角色',
diff --git a/src/views/index.vue b/src/views/index.vue
index 761a0d7..6c54570 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -34,7 +34,7 @@
-
{{count.studyFinishCount}}
+
{{count.studyWeekCount}}
{{$t('page.business.home.bzxzsy')}}
@@ -43,7 +43,7 @@
-
{{count.studyWeekCount}}
+
{{count.studyFinishCount}}
{{$t('page.business.home.ywcsy')}}
diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue
index 3170ff4..ee47cff 100644
--- a/src/views/system/dict/data.vue
+++ b/src/views/system/dict/data.vue
@@ -192,16 +192,20 @@
{{$t('form.cancel')}}
+
+
\ No newline at end of file
diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue
index 8084d40..7b7adb3 100644
--- a/src/views/system/dict/index.vue
+++ b/src/views/system/dict/index.vue
@@ -189,16 +189,20 @@
{{$t('form.cancel')}}
+
+
\ No newline at end of file
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index fbe0f2a..a3cc425 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -309,7 +309,7 @@
-
+
@@ -416,7 +416,10 @@ export default {
oldIdList:[]
- }
+ },
+
+ operate:'',
+ currRow:{}
}
},
created() {
@@ -482,8 +485,22 @@ export default {
},
// 角色状态修改
handleStatusChange(row) {
- changeRoleStatus(row.roleId, row.status === "0"?'1':'0').then(response => {
+ this.operate = "disable"
+ this.currRow = row
+ this.$refs.signRef.show(
+ row.status === "0"?this.$t('page.system.role.disable'):this.$t('page.system.role.enable'),
+ row.status === "0"?this.$t('page.system.role.disable'):this.$t('page.system.role.enable'),
+ )
+ },
+ // 角色状态修改
+ doHandleStatusChange(sign) {
+ this.$modal.loading()
+ let row = this.currRow
+ changeRoleStatus({role:{roleId:row.roleId, status:row.status === "0"?'1':'0'},sign:sign}).then(response => {
+ this.$refs.signRef.cancel()
this.getList()
+ }).finally(()=>{
+ this.$modal.closeLoading()
})
// let text = row.status === "0" ? "启用" : "停用"
@@ -655,24 +672,42 @@ export default {
this.$modal.loading()
if (this.form.roleId != undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys()
- updateRole(this.form).then(response => {
- this.open = false
- this.getList()
- }).finally(()=>{
- this.$modal.closeLoading()
- })
+ this.operate = "update"
+ this.$refs.signRef.show(
+ this.$t('page.system.role.modifyRole'),
+ this.$t('page.system.role.modifyRole'),
+ )
} else {
this.form.menuIds = this.getMenuAllCheckedKeys()
- addRole(this.form).then(response => {
- this.open = false
- this.getList()
- }).finally(()=>{
- this.$modal.closeLoading()
- })
+ this.operate = "add"
+ this.$refs.signRef.show(
+ this.$t('page.system.role.addRole'),
+ this.$t('page.system.role.addRole'),
+ )
}
}
})
},
+ doAdd(sign){
+ this.$modal.loading()
+ addRole({role:this.form,sign:sign}).then(response => {
+ this.$refs.signRef.cancel()
+ this.open = false
+ this.getList()
+ }).finally(()=>{
+ this.$modal.closeLoading()
+ })
+ },
+ doUpdate(sign){
+ this.$modal.loading()
+ updateRole({role:this.form,sign:sign}).then(response => {
+ this.$refs.signRef.cancel()
+ this.open = false
+ this.getList()
+ }).finally(()=>{
+ this.$modal.closeLoading()
+ })
+ },
/** 提交按钮(数据权限) */
submitDataScope: function() {
if (this.form.roleId != undefined) {
@@ -736,6 +771,7 @@ export default {
}
}
if(update){
+ this.operate = 'allocated'
this.$refs.signRef.show(
this.$t('page.system.role.fpjs'),
this.$t('page.system.role.fpjs'),
@@ -752,7 +788,21 @@ export default {
}).finally(()=>{
this.$modal.closeLoading()
})
- }
+ },
+ doSign(val){
+ if(this.operate==='update'){
+ this.doUpdate(val)
+ }
+ if(this.operate==='add'){
+ this.doAdd(val)
+ }
+ if(this.operate==='disable'){
+ this.doHandleStatusChange(val)
+ }
+ if(this.operate==='allocated'){
+ this.doChangRoleUser(val)
+ }
+ },
}
}
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index ddbf235..e518388 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -260,7 +260,7 @@
-
+
@@ -426,7 +426,10 @@ export default {
total:0,
list:[]
- }
+ },
+
+ operate:'',
+ currRow:{}
}
},
watch: {
@@ -484,8 +487,21 @@ export default {
},
// 用户状态修改
handleStatusChange(row) {
- changeUserStatus(row.userId, row.status === "0"?'1':'0').then(response => {
+ this.operate = "disable"
+ this.currRow = row
+ this.$refs.signRef.show(
+ row.status === "0"?this.$t('page.system.user.disable'):this.$t('page.system.user.enable'),
+ row.status === "0"?this.$t('page.system.user.disable'):this.$t('page.system.user.enable'),
+ )
+ },
+ doHandleStatusChange(sign) {
+ this.$modal.loading()
+ let row = this.currRow
+ changeUserStatus({user:{userId:row.userId,status:row.status === "0"?'1':'0'},sign:sign}).then(response => {
+ this.$refs.signRef.cancel()
this.getList()
+ }).finally(()=>{
+ this.$modal.closeLoading()
})
// let text = row.status === "0" ? "启用" : "停用"
@@ -609,34 +625,31 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.userId != undefined) {
- let updateRole = false;
- if(this.oldRoleIdList.length!==this.form.roleIds.length){
- updateRole = true
- }else{
- for(let i=0;i{return o==this.oldRoleIdList[i]})==-1){
- updateRole = true
- break
- }
- }
- }
- if(updateRole){
- this.$refs.signRef.show(
- this.$t('page.system.role.fpjs'),
- this.$t('page.system.role.fpjs'),
- )
- }else{
- this.doUpdate({})
- }
+ this.operate = "update"
+ this.$refs.signRef.show(
+ this.$t('page.system.user.modifyUser'),
+ this.$t('page.system.user.modifyUser'),
+ )
} else {
- addUser(this.form).then(response => {
- this.open = false
- this.getList()
- })
+ this.operate = "add"
+ this.$refs.signRef.show(
+ this.$t('page.system.user.addUser'),
+ this.$t('page.system.user.addUser'),
+ )
}
}
})
},
+ doAddUser(sign){
+ this.$modal.loading()
+ addUser({user:this.form,sign:sign}).then(response => {
+ this.$refs.signRef.cancel()
+ this.open = false
+ this.getList()
+ }).finally(()=>{
+ this.$modal.closeLoading()
+ })
+ },
doUpdate(sign){
this.$modal.loading()
updateUser({user:this.form,sign:sign}).then(response => {
@@ -723,7 +736,22 @@ export default {
handleExportHistory(){
this.saveSimpleLog({name:'',nameEn:'',jcmc:'角色变更历史导出',jcmcEn:'Role History Export'})
this.download('/system/business/roleChange/export', this.changeDialog.searchForm, `roleHistory_${new Date().getTime()}.xlsx`)
- }
+ },
+
+ doSign(val){
+ if(this.operate==='update'){
+ this.doUpdate(val)
+ }
+ if(this.operate==='add'){
+ this.doAddUser(val)
+ }
+ if(this.operate==='disable'){
+ this.doHandleStatusChange(val)
+ }
+ if(this.operate==='gh'){
+ this.doGh(val)
+ }
+ },
}
}
\ No newline at end of file