Commit 193604ea authored by wenju-zhu's avatar wenju-zhu

编辑删除功能&编辑弹窗数据展示

parent 2c2ae74b
<template>
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="name" label="名称" width="150">
</el-table-column>
<el-table-column prop="description" label="说明" width="120"> </el-table-column>
<el-table-column prop="httpMethod" label="消息类型" width="120"></el-table-column>
<el-table-column prop="uri" label="端点uri" width="120"></el-table-column>
<el-table-column prop="encoding" label="字符编码" width="120"></el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button
@click="handleClick(scope.row)"
type="text"
size="small"
>查看</el-button
>
<el-button type="text" size="small">编辑</el-button>
</template>
</el-table-column>
</el-table>
</template>
<script>
export default {
methods: {
handleClick(row) {
console.log(row)
}
},
props: {
showDailogData: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
tableData: [this.showDailogData]
}
}
}
</script>
<style lang="scss" scoped></style>
...@@ -74,24 +74,6 @@ export default { ...@@ -74,24 +74,6 @@ export default {
]), ]),
// 登录事件 // 登录事件
loginClick(formName) { loginClick(formName) {
/* this.$refs[formName].validate((valid) => {
if (valid) {
const formData = new FormData()
formData.append('username', this.form.name)
formData.append('password', this.form.password)
getLoginMessage(formData).then(
(data) => {
// 得到数据,将用户数据存储在vuex中
this.setUserInfo(data)
// 获取导航权限,将路由动态注入到路由表中
this.getNavigationMenu()
},
(err) => {
console.log(err)
}
)
}
}) */
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.load = true this.load = true
...@@ -106,9 +88,10 @@ export default { ...@@ -106,9 +88,10 @@ export default {
id: this.form.name, id: this.form.name,
displayname: this.form.name displayname: this.form.name
} }
// 将用户信息存储再vuex中
this.setUserInfo(data) this.setUserInfo(data)
// 获取导航权限
this.getNavigationMenu() this.getNavigationMenu()
// this.$router.push({ path: '/' })
this.load = false this.load = false
} else if (rt.status === '401') { } else if (rt.status === '401') {
this.$message.error('用户名密码错误') this.$message.error('用户名密码错误')
...@@ -124,11 +107,11 @@ export default { ...@@ -124,11 +107,11 @@ export default {
// 获取导航权限 // 获取导航权限
getNavigationMenu() { getNavigationMenu() {
var that = this var that = this
console.log(111)
getAllGroups2().then((res) => { getAllGroups2().then((res) => {
if (!res) return false if (!res) return false
getNavAll3(res.data[0].id).then((rt) => { getNavAll3(res.data[0].id).then((rt) => {
that.servemenuList = rt.data that.servemenuList = rt.data
// 跳转至首页
that.$router.push({ path: '/' }) that.$router.push({ path: '/' })
}) })
}) })
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment