Commit 4aa8f32f by 周海峰

no message

parent c39e40ff
...@@ -40,3 +40,12 @@ export function add(data) { ...@@ -40,3 +40,12 @@ export function add(data) {
data: data data: data
}) })
} }
export function remove(data) {
return request({
url: '/console/user/del',
method: 'post',
data: data
})
}
\ No newline at end of file
...@@ -150,7 +150,7 @@ const removeProjectConfig = (index) => { ...@@ -150,7 +150,7 @@ const removeProjectConfig = (index) => {
// 下载网关插件 // 下载网关插件
const downloadGatewayPlugin = () => { const downloadGatewayPlugin = () => {
window.open(gatewayConfig.value.url + `/core/encryptionconfig/download?appProjectName='加密网关平台'&projectid=${props.projectId}&gatewayUrl=${gatewayConfig.value.url}&gatewayPort=${gatewayConfig.value.port}&appUrl=''&appPort=''`) window.open(`${gatewayConfig.value.url}:${gatewayConfig.value.port}/core/encryptionconfig/download?appProjectName='加密网关平台'&projectid=${props.projectId}&gatewayUrl=${gatewayConfig.value.url}&gatewayPort=${gatewayConfig.value.port}&appUrl=''&appPort=''`)
// 实际项目中实现下载逻辑 // 实际项目中实现下载逻辑
} }
...@@ -162,7 +162,7 @@ const downloadProjectPlugin = (item,index) => { ...@@ -162,7 +162,7 @@ const downloadProjectPlugin = (item,index) => {
return return
} }
window.open(gatewayConfig.value.url + `/core/encryptionconfig/download?appProjectName=${item.name}&projectid=${props.projectId}&gatewayUrl=${gatewayConfig.value.url}&gatewayPort=${gatewayConfig.value.port}&appUrl=${item.url}&appPort=${item.port}`) window.open(`${gatewayConfig.value.url}:${gatewayConfig.value.port}/core/encryptionconfig/download?appProjectName=${item.name}&projectid=${props.projectId}&gatewayUrl=${gatewayConfig.value.url}&gatewayPort=${gatewayConfig.value.port}&appUrl=${item.url}&appPort=${item.port}`)
} }
// 确认操作 // 确认操作
......
...@@ -98,7 +98,7 @@ import { ref, reactive, onMounted, getCurrentInstance } from 'vue' ...@@ -98,7 +98,7 @@ import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { User, Delete, Edit } from '@element-plus/icons-vue' import { User, Delete, Edit } from '@element-plus/icons-vue'
import UserEdit from './edit.vue' import UserEdit from './edit.vue'
import { query } from '@/api/safetyManagement/userConfig.js' import { query, remove } from '@/api/safetyManagement/userConfig.js'
// 定义组件名称 // 定义组件名称
defineOptions({ defineOptions({
...@@ -160,12 +160,14 @@ const handlePageChange = (page) => { ...@@ -160,12 +160,14 @@ const handlePageChange = (page) => {
} }
// 删除用户 // 删除用户
const handleDelete = (row) => { const handleDelete = async (row) => {
ElMessageBox.confirm('确认删除该用户吗?', '提示', { ElMessageBox.confirm('确认删除该用户吗?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then( async () => {
// 调用删除接口 // 调用删除接口
console.log('删除用户', row) console.log('删除用户', row)
await remove({id: row.id})
getList()
}).catch(() => {}) }).catch(() => {})
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论