Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
Support
提交反馈
为 GitLab 提交贡献
登录
切换导航
D
dutyManagement
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
刘英杰
dutyManagement
提交
d0c1d499
提交
d0c1d499
编写于
12月 01, 2023
作者:
刘英杰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化loading、弹窗显示等方式
上级
4b83d67b
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
152 行增加
和
136 行删除
+152
-136
index.js
src/hooks/index.js
+6
-0
main.js
src/main.js
+3
-0
index.vue
src/pages/dutyArrangement/index.vue
+1
-3
actionLog.vue
src/pages/systemConfiguration/actionLog.vue
+13
-16
messageLog.vue
src/pages/systemConfiguration/messageLog.vue
+25
-24
peopleList.vue
src/pages/systemConfiguration/peopleList.vue
+71
-61
permissionSettings.vue
src/pages/systemConfiguration/permissionSettings.vue
+33
-32
未找到文件。
src/hooks/index.js
浏览文件 @
d0c1d499
import
{
Message
,
Modal
,
Spin
}
from
"
view-design
"
;
import
{
Message
,
Modal
,
Spin
}
from
"
view-design
"
;
import
Cookies
from
"
js-cookie
"
;
import
Cookies
from
"
js-cookie
"
;
import
Vue
from
"
vue
"
;
let
vm
=
new
Vue
()
export
function
publicConfirm
(
publicFunction
)
{
export
function
publicConfirm
(
publicFunction
)
{
// 公共弹窗删除
// 公共弹窗删除
...
@@ -78,6 +81,7 @@ export async function myEncapsulationFunction(fun) {
...
@@ -78,6 +81,7 @@ export async function myEncapsulationFunction(fun) {
export
function
getInitListRequest
(
fun
)
{
export
function
getInitListRequest
(
fun
)
{
try
{
try
{
vm
.
prototypeLoading
=
true
fun
()
fun
()
return
false
return
false
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -86,6 +90,8 @@ export function getInitListRequest(fun) {
...
@@ -86,6 +90,8 @@ export function getInitListRequest(fun) {
content
:
e
content
:
e
})
})
return
false
return
false
}
finally
{
}
}
}
}
...
...
src/main.js
浏览文件 @
d0c1d499
...
@@ -43,7 +43,10 @@ import './styles/index.less';
...
@@ -43,7 +43,10 @@ import './styles/index.less';
import
'
./libs/iview-pro/iview-pro.css
'
;
import
'
./libs/iview-pro/iview-pro.css
'
;
if
(
window
)
window
.
$t
=
(
key
,
value
)
=>
i18n
.
t
(
key
,
value
);
if
(
window
)
window
.
$t
=
(
key
,
value
)
=>
i18n
.
t
(
key
,
value
);
import
*
as
hooks
from
'
@/hooks/index
'
Vue
.
prototype
.
hooks
=
hooks
;
Vue
.
prototype
.
prototypeLoading
=
false
;
Vue
.
use
(
plugins
);
Vue
.
use
(
plugins
);
Vue
.
use
(
ViewUI
,
{
Vue
.
use
(
ViewUI
,
{
...
...
src/pages/dutyArrangement/index.vue
浏览文件 @
d0c1d499
...
@@ -471,7 +471,7 @@
...
@@ -471,7 +471,7 @@
{
{
title
:
"
联系方式
"
,
title
:
"
联系方式
"
,
key
:
'
mobile
'
,
key
:
'
mobile
'
,
minWidth
:
1
0
0
,
minWidth
:
1
2
0
,
},
},
{
{
title
:
"
值班要求
"
,
title
:
"
值班要求
"
,
...
@@ -911,12 +911,10 @@
...
@@ -911,12 +911,10 @@
})
})
},
},
currentPage
(
e
)
{
currentPage
(
e
)
{
console
.
log
(
e
)
this
.
page_index
=
e
this
.
page_index
=
e
this
.
getWatchList
()
this
.
getWatchList
()
},
},
currentPageCount
(
e
)
{
currentPageCount
(
e
)
{
console
.
log
(
e
,
'
currentPageCount
'
)
this
.
page_size
=
e
this
.
page_size
=
e
this
.
getWatchList
()
this
.
getWatchList
()
},
},
...
...
src/pages/systemConfiguration/actionLog.vue
浏览文件 @
d0c1d499
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<!-- </template>-->
<Table
:columns=
"columns"
:data=
"data"
>
<Table
:columns=
"columns"
:data=
"data"
:loading=
"loading"
>
<!-- <template #role_name="{row}">-->
<!-- <template #role_name="{row}">-->
<!-- <span v-for="(item,index) in row.role_name" :key="index" style="margin-left: 5px"> <Tag color="success">{{item}}</Tag></span>-->
<!-- <span v-for="(item,index) in row.role_name" :key="index" style="margin-left: 5px"> <Tag color="success">{{item}}</Tag></span>-->
...
@@ -73,7 +73,6 @@
...
@@ -73,7 +73,6 @@
//例如:import 《组件名称》 from '《组件路径》';
//例如:import 《组件名称》 from '《组件路径》';
import
*
as
api
from
'
../../api/lezRequest
'
import
*
as
api
from
'
../../api/lezRequest
'
import
Vue
from
"
vue
"
;
import
Vue
from
"
vue
"
;
import
*
as
hooks
from
'
@/hooks/index
'
export
default
{
export
default
{
//import引入的组件需要注入到对象中才能使用",
//import引入的组件需要注入到对象中才能使用",
...
@@ -81,7 +80,7 @@
...
@@ -81,7 +80,7 @@
data
()
{
data
()
{
//这里存放数据",
//这里存放数据",
return
{
return
{
loading
:
false
,
total
:
null
,
total
:
null
,
page_size
:
10
,
page_size
:
10
,
page_index
:
1
,
page_index
:
1
,
...
@@ -172,20 +171,18 @@
...
@@ -172,20 +171,18 @@
}
}
},
},
async
GetLogAll
()
{
async
GetLogAll
()
{
this
.
$Spin
.
show
()
this
.
hooks
.
getInitListRequest
(
async
()
=>
{
let
data
=
{
this
.
loading
=
true
page_index
:
this
.
page_index
,
let
data
=
{
page_size
:
this
.
page_size
,
page_index
:
this
.
page_index
,
}
page_size
:
this
.
page_size
,
}
const
res
=
await
api
.
GetLogAll
(
data
)
const
res
=
await
api
.
GetLogAll
(
data
)
this
.
total
=
res
.
response
.
data_count
this
.
total
=
res
.
response
.
data_count
this
.
data
=
res
.
response
.
data
this
.
data
=
res
.
response
.
data
this
.
publicMessage
(
res
)
this
.
loading
=
false
this
.
$Spin
.
hide
(
)
}
)
}
}
},
},
//生命周期 - 创建之前",数据模型未加载,方法未加载,html模板未加载
//生命周期 - 创建之前",数据模型未加载,方法未加载,html模板未加载
beforeCreate
()
{
beforeCreate
()
{
...
...
src/pages/systemConfiguration/messageLog.vue
浏览文件 @
d0c1d499
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</div>
</div>
</div>
</div>
<!--
<div
style=
"border:none;height: 2px;background-color: #f4efea;"
></div>
-->
<!--
<div
style=
"border:none;height: 2px;background-color: #f4efea;"
></div>
-->
<Table
ref=
"selection"
:border=
"false"
:columns=
"columns"
:data=
"data"
class=
"table"
>
<Table
ref=
"selection"
:border=
"false"
:
loading=
"loading"
:
columns=
"columns"
:data=
"data"
class=
"table"
>
<template
#messageinfo
="
{ row }">
<template
#messageinfo
="
{ row }">
...
@@ -114,12 +114,12 @@
...
@@ -114,12 +114,12 @@
<
script
>
<
script
>
import
*
as
api
from
'
../../api/lezRequest
'
import
*
as
api
from
'
../../api/lezRequest
'
import
*
as
hooks
from
'
@/hooks/index
'
export
default
{
export
default
{
name
:
'
numberLimit
'
,
name
:
'
numberLimit
'
,
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
send_state
:
''
,
send_state
:
''
,
is_succeed
:
''
,
is_succeed
:
''
,
send_stateSearch
:
''
,
send_stateSearch
:
''
,
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
messageReset
(
row
)
{
messageReset
(
row
)
{
this
.
messageModal
=
true
this
.
messageModal
=
true
this
.
messageResetObject
=
row
this
.
messageResetObject
=
row
console
.
log
(
"
🚀🚀🚀,
"
,
row
)
},
},
OfficeArraySort
()
{
OfficeArraySort
()
{
console
.
log
(
this
.
SelectValue
);
console
.
log
(
this
.
SelectValue
);
...
@@ -253,7 +253,6 @@
...
@@ -253,7 +253,6 @@
background
:
true
,
background
:
true
,
content
:
'
查询成功!
'
content
:
'
查询成功!
'
});
});
// this.GetMessageimeListEvent()
// this.GetMessageimeListEvent()
},
},
searchTimeValue
(
searchTimeValue
)
{
searchTimeValue
(
searchTimeValue
)
{
...
@@ -268,27 +267,29 @@
...
@@ -268,27 +267,29 @@
this
.
GetMessageimeListEvent
()
this
.
GetMessageimeListEvent
()
},
},
async
GetMessageimeListEvent
()
{
// 初始化日期列表
async
GetMessageimeListEvent
()
{
// 初始化日期列表
this
.
$Spin
.
show
()
this
.
hooks
.
getInitListRequest
(
async
()
=>
{
this
.
data
=
[]
this
.
loading
=
true
let
data
=
{
// this.data = []
send_state
:
this
.
send_stateSearch
,
let
data
=
{
is_succeed
:
this
.
is_succeedSearch
,
send_state
:
this
.
send_stateSearch
,
page_index
:
this
.
page_index
,
is_succeed
:
this
.
is_succeedSearch
,
page_size
:
this
.
page_size
page_index
:
this
.
page_index
,
}
page_size
:
this
.
page_size
const
res
=
await
api
.
GetMessageList
(
data
)
}
res
.
response
.
data
.
map
((
curent
,
index
)
=>
{
const
res
=
await
api
.
GetMessageList
(
data
)
this
.
data
.
push
(
curent
)
this
.
loading
=
false
// res.response.data.map((curent, index) => {
// this.data.push(curent)
// })
this
.
data
=
res
.
response
.
data
if
(
this
.
data
.
length
===
0
&&
this
.
page_index
!==
1
)
{
// 输入分页数据未空 则改变页数 为 1 且保持当前页面的数据条数
// this.page_index = this.page_index - 1
this
.
page_index
=
1
this
.
currentPage
(
this
.
page_index
)
}
this
.
total
=
res
.
response
.
data_count
})
})
if
(
this
.
data
.
length
===
0
&&
this
.
page_index
!==
1
)
{
// 输入分页数据未空 则改变页数 为 1 且保持当前页面的数据条数
// this.page_index = this.page_index - 1
this
.
page_index
=
1
this
.
currentPage
(
this
.
page_index
)
}
this
.
total
=
res
.
response
.
data_count
console
.
log
(
res
);
this
.
$Spin
.
hide
()
},
},
},
},
mounted
()
{
mounted
()
{
...
...
src/pages/systemConfiguration/peopleList.vue
浏览文件 @
d0c1d499
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</div>
</div>
</
template
>
</
template
>
<Table
:columns=
"columns"
:data=
"data"
>
<Table
:columns=
"columns"
:data=
"data"
:loading=
"loading"
>
<
template
#role_name
="{
row
}"
>
<
template
#role_name
="{
row
}"
>
<span
v-for=
"(item,index) in row.role_name"
:key=
"index"
style=
"margin-left: 5px"
>
<Tag
<span
v-for=
"(item,index) in row.role_name"
:key=
"index"
style=
"margin-left: 5px"
>
<Tag
color=
"success"
>
{{
item
}}
</Tag></span>
color=
"success"
>
{{
item
}}
</Tag></span>
...
@@ -110,10 +110,10 @@
...
@@ -110,10 +110,10 @@
</div>
</div>
</div>
</div>
<Table
:columns=
"modalSelect.column"
:data=
"modalSelect.tList"
@
on-select-all=
"modalTableSelectAll"
<Table
:loading=
"loading3"
:columns=
"modalSelect.column"
:data=
"modalSelect.tList"
@
on-select-all=
"modalTableSelectAll"
@
on-select-all-cancel=
"modalTableSelectAllCancel"
@
on-select=
"modalTableSelect"
@
on-select-all-cancel=
"modalTableSelectAllCancel"
@
on-select=
"modalTableSelect"
@
on-select-cancel=
"modalTableSelectCancel"
>
@
on-select-cancel=
"modalTableSelectCancel"
>
</Table>
</Table>
<div
style=
"height: 30px;margin-top: 20px"
>
<div
style=
"height: 30px;margin-top: 20px"
>
<Page
show-total
<Page
show-total
...
@@ -130,7 +130,6 @@
...
@@ -130,7 +130,6 @@
<
template
#footer
>
<
template
#footer
>
<Button
type=
"text"
@
click=
"modalSelect.modal = false"
style=
"margin-left: 10px;"
>
取消
</Button>
<Button
type=
"text"
@
click=
"modalSelect.modal = false"
style=
"margin-left: 10px;"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"teacherListOk"
style=
"margin-left: 10px;"
>
确认权限
</Button>
<Button
type=
"primary"
@
click=
"teacherListOk"
style=
"margin-left: 10px;"
>
确认权限
</Button>
</
template
>
</
template
>
</Modal>
</Modal>
...
@@ -168,6 +167,7 @@
...
@@ -168,6 +167,7 @@
import
*
as
api
from
'
../../api/lezRequest
'
import
*
as
api
from
'
../../api/lezRequest
'
import
Vue
from
"
vue
"
;
import
Vue
from
"
vue
"
;
import
*
as
hooks
from
'
@/hooks/index
'
import
*
as
hooks
from
'
@/hooks/index
'
import
{
getInitListRequest
}
from
"
@/hooks/index
"
;
export
default
{
export
default
{
//import引入的组件需要注入到对象中才能使用",
//import引入的组件需要注入到对象中才能使用",
...
@@ -234,6 +234,8 @@
...
@@ -234,6 +234,8 @@
roleCreateTime
:
''
,
roleCreateTime
:
''
,
},
},
modal
:
false
,
// 触发modal
modal
:
false
,
// 触发modal
loading
:
false
,
loading3
:
false
,
columns
:
[
columns
:
[
{
{
title
:
'
序号
'
,
title
:
'
序号
'
,
...
@@ -336,23 +338,24 @@
...
@@ -336,23 +338,24 @@
this
.
modalSelect
.
modal
=
true
this
.
modalSelect
.
modal
=
true
},
},
async
teacherListOk
()
{
teacherListOk
()
{
if
(
!!
this
.
modalSelect
.
checkboxValue
.
length
)
{
this
.
hooks
.
myEncapsulationFunction
(
async
()
=>
{
this
.
$Spin
.
show
()
if
(
!!
this
.
modalSelect
.
checkboxValue
.
length
)
{
let
data
=
{
let
data
=
{
tid
:
this
.
modalSelect
.
tid
,
tid
:
this
.
modalSelect
.
tid
,
role
:
this
.
modalSelect
.
checkboxValue
,
role
:
this
.
modalSelect
.
checkboxValue
,
dept_id
:
this
.
modalSelect
.
deptSlcList
,
dept_id
:
this
.
modalSelect
.
deptSlcList
,
}
const
res
=
await
api
.
UserInfoSave
(
data
)
this
.
modalSelect
.
modal
=
false
this
.
modalSelect
.
checkboxValue
=
[]
this
.
GetUserList
()
this
.
getTorR
()
return
res
}
else
{
this
.
$Message
.
error
(
'
请选择权限
'
)
}
}
const
res
=
await
api
.
UserInfoSave
(
data
)
})
this
.
modalSelect
.
modal
=
false
this
.
modalSelect
.
checkboxValue
=
[]
await
this
.
GetUserList
()
await
this
.
getTorR
()
}
else
{
this
.
$Message
.
error
(
'
请选择权限
'
)
}
},
},
modalTableSelectCancel
(
selection
,
row
)
{
modalTableSelectCancel
(
selection
,
row
)
{
this
.
modalSelect
.
tid
=
[]
this
.
modalSelect
.
tid
=
[]
...
@@ -429,10 +432,13 @@
...
@@ -429,10 +432,13 @@
});
});
}
}
},
},
async
roleDeleteEvent
()
{
roleDeleteEvent
()
{
let
data
=
{
"
id
"
:
this
.
formTop
.
roleId
}
this
.
hooks
.
myEncapsulationFunction
(
async
()
=>
{
const
res
=
await
api
.
UserInfoDel
(
data
)
let
data
=
{
"
id
"
:
this
.
formTop
.
roleId
}
await
this
.
GetUserList
()
const
res
=
await
api
.
UserInfoDel
(
data
)
this
.
GetUserList
()
return
res
})
},
},
// 编辑用户
// 编辑用户
roleUpdate
(
row
)
{
roleUpdate
(
row
)
{
...
@@ -516,47 +522,51 @@
...
@@ -516,47 +522,51 @@
// }
// }
// })
// })
},
},
async
getTorR
()
{
getTorR
()
{
let
teacherData
=
{
this
.
hooks
.
getInitListRequest
(
async
()
=>
{
condition
:
this
.
modalSelect
.
search
,
this
.
loading3
=
true
page_index
:
this
.
modalSelect
.
page_index
,
let
teacherData
=
{
page_size
:
this
.
modalSelect
.
page_size
,
condition
:
this
.
modalSelect
.
search
,
}
page_index
:
this
.
modalSelect
.
page_index
,
this
.
$Spin
.
show
()
page_size
:
this
.
modalSelect
.
page_size
,
//获取 两类 下拉框 初始值
}
const
teacherRes
=
await
api
.
GetTeacher
(
teacherData
)
// this.$Spin.show()
this
.
modalSelect
.
tList
=
teacherRes
.
response
.
data
//获取 两类 下拉框 初始值
this
.
modalSelect
.
total
=
teacherRes
.
response
.
data_count
const
teacherRes
=
await
api
.
GetTeacher
(
teacherData
)
const
roleRes
=
await
api
.
UserRoleSelect
()
this
.
modalSelect
.
tList
=
teacherRes
.
response
.
data
this
.
modalSelect
.
rList
=
roleRes
.
response
this
.
modalSelect
.
total
=
teacherRes
.
response
.
data_count
this
.
$Spin
.
hide
()
this
.
loading3
=
false
const
roleRes
=
await
api
.
UserRoleSelect
()
this
.
modalSelect
.
rList
=
roleRes
.
response
// this.$Spin.hide()
})
},
},
async
GetUserList
()
{
async
GetUserList
()
{
this
.
$Spin
.
show
();
this
.
hooks
.
getInitListRequest
(
async
()
=>
{
// 获取初始话列表
this
.
loading
=
true
let
data
=
{
// 获取初始话列表
"
page_index
"
:
this
.
page_index
,
let
data
=
{
"
page_size
"
:
this
.
page_size
,
"
page_index
"
:
this
.
page_index
,
"
name
"
:
this
.
searchValu
e
,
"
page_size
"
:
this
.
page_siz
e
,
}
"
name
"
:
this
.
searchValue
,
const
res
=
await
api
.
GetUserList
(
data
)
}
this
.
data
=
[]
const
res
=
await
api
.
GetUserList
(
data
)
this
.
data
=
res
.
response
.
data
this
.
data
=
[]
this
.
total
=
res
.
response
.
data_count
this
.
data
=
res
.
response
.
data
this
.
publicMessage
(
res
)
this
.
total
=
res
.
response
.
data_count
this
.
loading
=
false
let
teacherData
=
{
let
teacherData
=
{
condition
:
''
condition
:
''
}
}
//获取 两类 下拉框 初始值
//获取 两类 下拉框 初始值
const
teacherRes
=
await
api
.
GetTeacher
(
teacherData
)
const
teacherRes
=
await
api
.
GetTeacher
(
teacherData
)
this
.
cityTeacherList
=
teacherRes
.
response
this
.
cityTeacherList
=
teacherRes
.
response
const
roleRes
=
await
api
.
UserRoleSelect
()
const
roleRes
=
await
api
.
UserRoleSelect
()
this
.
cityRoleList
=
roleRes
.
response
this
.
cityRoleList
=
roleRes
.
response
})
}
}
},
},
//生命周期 - 创建之前",数据模型未加载,方法未加载,html模板未加载
//生命周期 - 创建之前",数据模型未加载,方法未加载,html模板未加载
beforeCreate
()
{
beforeCreate
()
{
...
...
src/pages/systemConfiguration/permissionSettings.vue
浏览文件 @
d0c1d499
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<Input
v-model=
"searchValue"
placeholder=
"请输入权限名称进行查找..."
></Input>
<Input
v-model=
"searchValue"
placeholder=
"请输入权限名称进行查找..."
></Input>
<Button
type=
"primary"
:disabled=
"searchValue === ''"
@
click=
"searchEvent"
style=
"margin-left: 10px;"
>
查找
<Button
type=
"primary"
:disabled=
"searchValue === ''"
@
click=
"searchEvent"
style=
"margin-left: 10px;"
>
查找
</Button>
</Button>
<
Button
type=
"primary"
@
click=
"addRoleClass"
style=
"margin-left: 10px;"
>
增添权限类型
</Button
>
<
!--
<Button
type=
"primary"
@
click=
"addRoleClass"
style=
"margin-left: 10px;"
>
增添权限类型
</Button>
--
>
</div>
</div>
</
template
>
</
template
>
...
@@ -20,24 +20,7 @@
...
@@ -20,24 +20,7 @@
<
template
#action
="{
row
}"
>
<
template
#action
="{
row
}"
>
<Button
type=
"primary"
size=
"small"
@
click=
"update(row)"
>
修改
</Button>
<Button
type=
"primary"
size=
"small"
@
click=
"update(row)"
>
修改
</Button>
<Button
type=
"error"
size=
"small"
@
click=
"roleDelete(row)"
style=
"margin-left: 10px;"
>
删除
</Button>
<Button
type=
"error"
size=
"small"
@
click=
"roleDelete(row)"
style=
"margin-left: 10px;"
>
删除
</Button>
<Modal
v-model=
"modal"
:title=
"`$
{ModalTitleValue}`"
@on-ok="modalOk(row)"
cancel-text="取消"
ok-text="确认"
:mask-closable="false"
>
<Form
:model=
"formTop"
:label-width=
"80"
ref=
"updateRoleValue"
>
<!-- :rules="ruleValidate"-->
<FormItem
label=
"权限名称"
prop=
"input1"
>
<Input
v-model=
"formTop.input1"
></Input>
</FormItem>
<FormItem
label=
"备注"
prop=
"input2"
>
<Input
v-model=
"formTop.input2"
></Input>
</FormItem>
</Form>
</Modal>
</
template
>
</
template
>
</Table>
</Table>
<div
style=
"width: 100%;height: 70px;display: flex;align-items: center;"
>
<div
style=
"width: 100%;height: 70px;display: flex;align-items: center;"
>
...
@@ -54,7 +37,24 @@
...
@@ -54,7 +37,24 @@
</div>
</div>
</Card>
</Card>
<Modal
v-model=
"modal"
:title=
"`${ModalTitleValue}`"
@
on-ok=
"modalOk"
cancel-text=
"取消"
ok-text=
"确认"
:mask-closable=
"false"
>
<Form
:model=
"formTop"
:label-width=
"80"
ref=
"updateRoleValue"
>
<!-- :rules="ruleValidate"-->
<FormItem
label=
"权限名称"
prop=
"input1"
>
<Input
v-model=
"formTop.input1"
></Input>
</FormItem>
<FormItem
label=
"备注"
prop=
"input2"
>
<Input
v-model=
"formTop.input2"
></Input>
</FormItem>
</Form>
</Modal>
</div>
</div>
</template>
</template>
...
@@ -132,7 +132,6 @@
...
@@ -132,7 +132,6 @@
//监控data中的数据变化",
//监控data中的数据变化",
watch
:
{
watch
:
{
'
formTop.input1
'
(
newValue
,
oldValue
)
{
'
formTop.input1
'
(
newValue
,
oldValue
)
{
console
.
log
(
newValue
)
},
},
// searchValue(newValue,oldValue){
// searchValue(newValue,oldValue){
// if(newValue === ''){
// if(newValue === ''){
...
@@ -145,16 +144,13 @@
...
@@ -145,16 +144,13 @@
searchEvent
()
{
searchEvent
()
{
// 搜索按钮事件
// 搜索按钮事件
this
.
page_index
=
1
this
.
page_index
=
1
this
.
GetUserRoleList
()
this
.
GetUserRoleList
()
},
},
currentPage
(
e
)
{
currentPage
(
e
)
{
console
.
log
(
e
)
this
.
page_index
=
e
this
.
page_index
=
e
this
.
GetUserRoleList
()
this
.
GetUserRoleList
()
},
},
currentPageCount
(
e
)
{
currentPageCount
(
e
)
{
console
.
log
(
e
,
'
currentPageCount
'
)
this
.
page_size
=
e
this
.
page_size
=
e
this
.
GetUserRoleList
()
this
.
GetUserRoleList
()
},
},
...
@@ -178,7 +174,6 @@
...
@@ -178,7 +174,6 @@
this
.
$Message
[
'
warning
'
]({
this
.
$Message
[
'
warning
'
]({
background
:
true
,
background
:
true
,
content
:
'
操作异常
'
content
:
'
操作异常
'
});
});
}
else
{
}
else
{
this
.
$Spin
.
hide
();
this
.
$Spin
.
hide
();
...
@@ -190,9 +185,12 @@
...
@@ -190,9 +185,12 @@
}
}
},
},
async
roleDeleteEvent
()
{
async
roleDeleteEvent
()
{
let
data
=
{
"
id
"
:
this
.
formTop
.
roleId
}
hooks
.
myEncapsulationFunction
(
async
()
=>
{
const
res
=
await
api
.
UserRoleDel
(
data
)
let
data
=
{
"
id
"
:
this
.
formTop
.
roleId
}
await
this
.
GetUserRoleList
()
const
res
=
await
api
.
UserRoleDel
(
data
)
await
this
.
GetUserRoleList
()
return
res
})
},
},
async
roleDelete
(
e
)
{
async
roleDelete
(
e
)
{
//删除权限类型
//删除权限类型
...
@@ -239,13 +237,16 @@
...
@@ -239,13 +237,16 @@
}
}
return
data
return
data
},
},
async
modalOk
(
e
)
{
async
modalOk
()
{
//修改弹窗 确认事件
//修改弹窗 确认事件
// this.$refs['updateRoleValue'].validate(async (validateValue) => {
// this.$refs['updateRoleValue'].validate(async (validateValue) => {
// if(validateValue){
// if(validateValue){
const
data
=
this
.
modalOkDataAction
(
e
)
hooks
.
myEncapsulationFunction
(
async
()
=>
{
const
res
=
await
api
.
UserRoleSave
(
data
)
const
data
=
this
.
modalOkDataAction
(
this
.
formTop
)
await
this
.
GetUserRoleList
()
const
res
=
await
api
.
UserRoleSave
(
data
)
await
this
.
GetUserRoleList
()
return
res
})
// }
// }
// })
// })
},
},
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录