Merge pull request '邓洁 : 修改页面细节' (#6) from dengjie into master
Reviewed-on: http://git.feashow.cn/feashow/tunnel-cloud-front/pulls/6
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="text" size="mini">删除</el-button>
|
||||
<el-button :type="btnType" size="mini" v-perm="perm" :disabled="isDisabled" :icon="btnIcon" :plain="isPlain">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
@@ -17,17 +17,40 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
name: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
btnType: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: 'text'
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
btnIcon: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
perm: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
isDisabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isPlain: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
})
|
||||
const emit = defineEmits()
|
||||
const title = ref(`确认删除名称为 "${props.name}" 的${props.type}吗!`)
|
||||
const visible = ref(false)
|
||||
watch(()=>props.name,(newVal)=>{
|
||||
title.value="确认删除名称为"+'"'+props.name+'"'+"的"+props.type+"吗!"
|
||||
})
|
||||
const handleCancel = () => {
|
||||
visible.value = false
|
||||
}
|
||||
|
||||
@@ -30,8 +30,11 @@
|
||||
</el-form>
|
||||
<div class="query-btn">
|
||||
<el-button type="primary" v-perm="['query:adapter:add']" @click="handleAdd" :icon="Plus" plain>新增</el-button>
|
||||
<el-button type="danger" v-perm="['query:adapter:del']" @click="handleDelete" :icon="Delete" plain :disabled="disabled">删除</el-button>
|
||||
<el-button type="warning" v-perm="['query:adapter:export']" @click="handleExport" :icon="Download" plain>导出</el-button>
|
||||
<popover-delete :name="adapterNameList" btn-type="danger" :type="'菜单'" :perm="['query:adapter:del']"
|
||||
:is-disabled="disabled" :is-plain="true" :btn-icon="Delete"
|
||||
@delete="handleDelete(adapterIds)"/>
|
||||
<el-button type="warning" v-perm="['query:adapter:export']" @click="handleExport" :icon="Download" plain>导出
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
@@ -63,9 +66,8 @@
|
||||
<el-button type="text" size="mini"
|
||||
@click="handleDesign(scope.row)">设计
|
||||
</el-button>
|
||||
<el-button type="text" size="mini" v-perm="['query:adapter:del']" @click="handleDelete(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
<popover-delete :name="scope.row.adapterName" :type="'适配器'" :perm="['query:adapter:del']"
|
||||
@delete="handleDelete(scope.row.adapterId)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -118,12 +120,19 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDataAdapterList, getDataAdapterDetails, addDataAdapter, editDataAdapter, delDataAdapter } from "@/api/custom-query/adapter";
|
||||
import {
|
||||
getDataAdapterList,
|
||||
getDataAdapterDetails,
|
||||
addDataAdapter,
|
||||
editDataAdapter,
|
||||
delDataAdapter
|
||||
} from "@/api/custom-query/adapter";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {Search, Refresh, Delete, Plus, Edit, Download} from '@element-plus/icons-vue'
|
||||
import Paging from "@/components/pagination/index.vue";
|
||||
import {useCacheStore} from "@/stores/cache";
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
const router = useRouter()
|
||||
const cacheStore = useCacheStore()
|
||||
const queryParams = reactive({
|
||||
@@ -139,19 +148,22 @@ const pageInfo = reactive({
|
||||
const list = ref([])
|
||||
const queryForm = ref([])
|
||||
const loading = ref(true)
|
||||
const disabled = ref(true)
|
||||
const total = ref()
|
||||
const title = ref('')
|
||||
const isVisited = ref(false)
|
||||
const form = ref()
|
||||
const formInstance = ref()
|
||||
const adapterIds = ref([])
|
||||
const adapterNameList = ref([])
|
||||
//获取数据
|
||||
const getList = async () => {
|
||||
let params = {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
}
|
||||
loading.value = true
|
||||
getDataAdapterList(params).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
total.value = res.data.total
|
||||
@@ -201,13 +213,8 @@ const handleDesign = (row) => {
|
||||
router.push({path: `/custom/query/data/adapter/design/${row.adapterId}`})
|
||||
}
|
||||
//删除
|
||||
const handleDelete = async (row) => {
|
||||
ElMessageBox.confirm(`确认删除名称为${row.adapterName}的适配器吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delDataAdapter(row.adapterId).then(res => {
|
||||
const handleDelete = async (adapterId) => {
|
||||
delDataAdapter(adapterId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
getList()
|
||||
@@ -215,7 +222,16 @@ const handleDelete = async (row) => {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//勾选table数据行事件
|
||||
const handleSelect = async (selection) => {
|
||||
if (selection.length !== 0) {
|
||||
disabled.value = false
|
||||
adapterIds.value = selection.map(item => item.adapterId).join()
|
||||
adapterNameList.value = selection.map(item => item.adapterName).join()
|
||||
} else {
|
||||
disabled.value = true
|
||||
}
|
||||
}
|
||||
//取消
|
||||
const handleCancel = () => {
|
||||
|
||||
@@ -241,6 +241,7 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
}
|
||||
loading.value = true
|
||||
getDataSourceManageList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -40,6 +40,7 @@ const pageInfo = reactive({
|
||||
|
||||
|
||||
const initPage = () => {
|
||||
tableLoading.value = true
|
||||
getPageInfo(queryId,pageInfo).then(res=>{
|
||||
let data = res.data
|
||||
uniColumns.value = data.uniColumns
|
||||
@@ -71,7 +72,6 @@ const getData = () => {
|
||||
}
|
||||
})
|
||||
getPageData(pageInfo,{list:queryData,queryId}).then(res=>{
|
||||
console.log(res)
|
||||
let data = res.data
|
||||
tableData.value = data.rows
|
||||
total.value = data.total
|
||||
|
||||
@@ -178,6 +178,7 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
}
|
||||
loading.value = true
|
||||
getSqlList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -106,6 +106,7 @@ const searchTableSearch = async () => {
|
||||
params.startTime = date[0];
|
||||
params.endTime = date[1];
|
||||
}
|
||||
loading.value = true
|
||||
getDynamicTableList(params).then(res => {
|
||||
console.log('searchTableSearch',res)
|
||||
if (res.code === 1000) {
|
||||
|
||||
@@ -126,6 +126,7 @@ const getList = async () => {
|
||||
params.startTime = date[0];
|
||||
params.endTime = date[1];
|
||||
}
|
||||
loading.value = true
|
||||
getTableInfo(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -179,6 +179,7 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
}
|
||||
loading.value = true
|
||||
getTopoList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -163,6 +163,7 @@ const handleSubmit = async (instance) => {
|
||||
}
|
||||
|
||||
const handlePreview = (json) => {
|
||||
previewLoading.value = true
|
||||
previewTopo({
|
||||
queryId: params.queryId,
|
||||
topJson: json,
|
||||
|
||||
@@ -138,6 +138,7 @@ const getList = async () => {
|
||||
params.startTime = date[0]
|
||||
params.endTime = date[1]
|
||||
}
|
||||
loading.value = true
|
||||
getLoginLogList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -71,6 +71,7 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
}
|
||||
loading.value = true
|
||||
getOnlineList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -239,6 +239,7 @@ const getList = async () => {
|
||||
params.startTime = date[0];
|
||||
params.endTime = date[1];
|
||||
}
|
||||
loading.value = true
|
||||
getOperateLog(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows;
|
||||
|
||||
@@ -99,8 +99,8 @@ const searchTableSearch = async () => {
|
||||
pageNum: pageInfo.pageNum,
|
||||
pageSize: pageInfo.pageSize
|
||||
}
|
||||
loading.value = true
|
||||
getDynamicTable(params).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
total.value = res.data.total
|
||||
|
||||
@@ -198,6 +198,7 @@ const getList = async () => {
|
||||
params.startTime = date[0]
|
||||
params.endTime = date[1]
|
||||
}
|
||||
loading.value = true
|
||||
getTableList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -173,6 +173,7 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
}
|
||||
loading.value = true
|
||||
getRegularList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -223,6 +223,7 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
}
|
||||
loading.value = true
|
||||
getDataSourceList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -171,6 +171,7 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
}
|
||||
loading.value = true
|
||||
getConfigList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows
|
||||
|
||||
@@ -178,6 +178,7 @@ const getEditOption = (deptId) => {
|
||||
});
|
||||
}
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
getDeptList(queryParams).then(res => {
|
||||
list.value = res.data
|
||||
loading.value = false
|
||||
|
||||
@@ -188,6 +188,7 @@ const searchRole = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
};
|
||||
loading.value = true
|
||||
getRoleInfoByMenuId(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows;
|
||||
@@ -205,6 +206,7 @@ const getExcludeRole = async () => {
|
||||
...query,
|
||||
...pageInfo
|
||||
};
|
||||
dialogLoading.value = true;
|
||||
getRoleExcludeMenuId(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
roleList.value = res.data.rows;
|
||||
|
||||
@@ -221,6 +221,7 @@ const getSelectIcon = (val) => {
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
getMenuList(queryParams).then(res => {
|
||||
list.value = res.data
|
||||
loading.value = false
|
||||
|
||||
@@ -101,6 +101,7 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
};
|
||||
loading.value = true
|
||||
getNotifyList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows;
|
||||
|
||||
@@ -322,6 +322,7 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
};
|
||||
loading.value = true
|
||||
getNoticeList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows;
|
||||
|
||||
@@ -174,6 +174,7 @@ const searchUser = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
};
|
||||
loading.value = true
|
||||
getUserInfoByPostId(postId,params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows;
|
||||
@@ -191,6 +192,7 @@ const getExcludeUser = async () => {
|
||||
...query,
|
||||
...pageInfo
|
||||
};
|
||||
dialogLoading.value = true;
|
||||
getUserExcludePostId(postId,params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
userList.value = res.data.rows;
|
||||
|
||||
@@ -135,6 +135,7 @@ const rules = reactive({
|
||||
// ]
|
||||
})
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
getPostList({
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
|
||||
@@ -173,6 +173,7 @@ const searchUser = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
};
|
||||
loading.value = true
|
||||
getUserByRoleId(roleId,params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows;
|
||||
@@ -190,6 +191,7 @@ const getExcludeUser = async () => {
|
||||
...query,
|
||||
...pageInfo
|
||||
};
|
||||
dialogLoading.value = true;
|
||||
getUserExcludeRoleId(roleId,params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
userList.value = res.data.rows;
|
||||
|
||||
@@ -274,6 +274,7 @@ const getList = async () => {
|
||||
params.startTime = date[0]
|
||||
params.endTime = date[1]
|
||||
}
|
||||
loading.value = true
|
||||
getRoleList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
res.data.rows = res.data.rows.sort((a, b) => {
|
||||
|
||||
@@ -375,6 +375,7 @@ const getList = async () => {
|
||||
params.startTime = date[0]
|
||||
params.endTime = date[1]
|
||||
}
|
||||
loading.value = true
|
||||
getUserList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data.rows;
|
||||
|
||||
Reference in New Issue
Block a user