fix: bug#17556、17555
* fix: bug#17299 * fix: bug#17148 * fix: bug#17392 * fix: bug#17416 * fix: bug#17417 * fix: bug#17418 * fix: bug#17421 * fix: bug#17510 * fix: bug#17510 * fix: bug#17299 * fix: 修改tree样式 * fix: 修改样式 * fix: bug#17425 * fix: 跳转bug * fix: bug#17556、17555
This commit is contained in:
parent
6eeed06171
commit
5970fa368f
|
@ -10,6 +10,11 @@ export const getProductList = (parmas?:any) => server.get('/device/product/_qu
|
|||
*/
|
||||
export const getDeviceList = (parmas?:any) => server.get('/device-instance/_query/no-paging?paging=false',parmas);
|
||||
|
||||
/**
|
||||
* 获取有设备的告警的产品名称
|
||||
*/
|
||||
export const getAlarmProduct = (parmas:any) => server.post('/device-instance/_query',parmas)
|
||||
|
||||
/**
|
||||
* 获取组织列表
|
||||
*/
|
||||
|
|
|
@ -166,7 +166,9 @@
|
|||
<div class="card-item-content-text">
|
||||
平台对接
|
||||
</div>
|
||||
<Ellipsis style="width: calc(100% - 20px)">
|
||||
<div>{{ slotProps.platformConfigName }}</div>
|
||||
</Ellipsis>
|
||||
</j-col>
|
||||
<j-col :span="6">
|
||||
<div class="card-item-content-text">类型</div>
|
||||
|
|
|
@ -676,8 +676,10 @@ const saveData = () => {
|
|||
onlyMessage('操作成功', 'success');
|
||||
if (route.query.save) {
|
||||
// @ts-ignore
|
||||
window?.onTabSaveSuccess(resp);
|
||||
if((window as any).onTabSaveSuccess){
|
||||
(window as any).onTabSaveSuccess(resp);
|
||||
setTimeout(() => window.close(), 300);
|
||||
}
|
||||
} else {
|
||||
history.back();
|
||||
}
|
||||
|
|
|
@ -124,8 +124,10 @@ const onFinish = async (values: any) => {
|
|||
|
||||
if (route.query.save) {
|
||||
// @ts-ignore
|
||||
window?.onTabSaveSuccess(resp.result);
|
||||
setTimeout(() => window.close(), 300);
|
||||
if((window as any).onTabSaveSuccess){
|
||||
(window as any).onTabSaveSuccess(resp.result);
|
||||
setTimeout(() => window.close(), 300);
|
||||
}
|
||||
} else {
|
||||
history.back();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
</j-spin>
|
||||
</template>
|
||||
m
|
||||
|
||||
<script lang="ts" setup name="Cpu">
|
||||
import { dashboard } from '@/api/link/dashboard';
|
||||
import dayjs from 'dayjs';
|
||||
|
@ -95,6 +95,9 @@ const serverData = reactive({
|
|||
|
||||
const pickerTimeChange = () => {
|
||||
data.value.type = undefined;
|
||||
if(props.isNoCommunity){
|
||||
getCPUEcharts(data.value)
|
||||
}
|
||||
};
|
||||
|
||||
const echartsOptions = computed(() => {
|
||||
|
|
|
@ -95,6 +95,9 @@ const serverData = reactive({
|
|||
|
||||
const pickerTimeChange = () => {
|
||||
data.value.type = undefined;
|
||||
if(props.isNoCommunity){
|
||||
getJVMEcharts(data.value)
|
||||
}
|
||||
};
|
||||
|
||||
const getJVMEcharts = async (val: any) => {
|
||||
|
|
|
@ -560,8 +560,10 @@ const handleSubmit = () => {
|
|||
onlyMessage('保存成功');
|
||||
if (route.query?.notifyType) {
|
||||
// @ts-ignore
|
||||
window?.onTabSaveSuccess(res.result);
|
||||
setTimeout(() => window.close(), 300);
|
||||
if((window as any).onTabSaveSuccess){
|
||||
(window as any).onTabSaveSuccess(res.result);
|
||||
setTimeout(() => window.close(), 300);
|
||||
}
|
||||
} else {
|
||||
router.back();
|
||||
}
|
||||
|
@ -587,8 +589,10 @@ const handleSubmit = () => {
|
|||
onlyMessage('保存成功');
|
||||
if (route.query?.notifyType) {
|
||||
// @ts-ignore
|
||||
window?.onTabSaveSuccess(res.result);
|
||||
setTimeout(() => window.close(), 300);
|
||||
if((window as any).onTabSaveSuccess){
|
||||
(window as any).onTabSaveSuccess(res.result);
|
||||
setTimeout(() => window.close(), 300);
|
||||
}
|
||||
} else {
|
||||
router.back();
|
||||
}
|
||||
|
|
|
@ -1261,8 +1261,10 @@ const handleSubmit = () => {
|
|||
onlyMessage('保存成功');
|
||||
if (route.query?.notifyType) {
|
||||
// @ts-ignore
|
||||
window?.onTabSaveSuccess(res.result);
|
||||
setTimeout(() => window.close(), 300);
|
||||
if((window as any).onTabSaveSuccess){
|
||||
(window as any).onTabSaveSuccess(res.result);
|
||||
setTimeout(() => window.close(), 300);
|
||||
}
|
||||
} else {
|
||||
router.back();
|
||||
}
|
||||
|
|
|
@ -133,6 +133,7 @@ import {
|
|||
getDeviceList,
|
||||
getOrgList,
|
||||
query,
|
||||
getAlarmProduct
|
||||
} from '@/api/rule-engine/log';
|
||||
import { queryLevel } from '@/api/rule-engine/config';
|
||||
import Search from '@/components/Search';
|
||||
|
@ -294,24 +295,18 @@ const newColumns = computed(() => {
|
|||
type: 'select',
|
||||
options: async () => {
|
||||
const termType = [
|
||||
{
|
||||
{
|
||||
column:"id$alarm-record",
|
||||
value:[
|
||||
{
|
||||
column: "targetType",
|
||||
termType: "eq",
|
||||
type: "and",
|
||||
value: "product",
|
||||
value: "device",
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
if (props.id) {
|
||||
termType.push({
|
||||
termType: 'eq',
|
||||
column: 'alarmConfigId',
|
||||
value: props.id,
|
||||
type: 'and',
|
||||
},)
|
||||
}
|
||||
|
||||
const resp: any = await handleSearch({
|
||||
const resp: any = await getAlarmProduct({
|
||||
sorts: [{ name: 'alarmTime', order: 'desc' }],
|
||||
terms: termType
|
||||
});
|
||||
|
@ -319,15 +314,14 @@ const newColumns = computed(() => {
|
|||
|
||||
if (resp.status === 200) {
|
||||
resp.result.data.forEach(item => {
|
||||
if (item.targetId) {
|
||||
listMap.set(item.targetId, {
|
||||
label: item.targetName,
|
||||
value: item.targetId,
|
||||
if (item.productId) {
|
||||
listMap.set(item.productId, {
|
||||
label: item.productName,
|
||||
value: item.productId,
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
return [...listMap.values()]
|
||||
|
||||
}
|
||||
|
@ -412,8 +406,6 @@ const search = (data: any) => {
|
|||
data?.terms[0]?.terms[0]
|
||||
]
|
||||
}]
|
||||
// delete params.value.terms
|
||||
console.log(params.value)
|
||||
}
|
||||
if (props.id) {
|
||||
params.value.terms.push({
|
||||
|
|
|
@ -243,7 +243,7 @@ const deleteScene = async (id: string) => {
|
|||
|
||||
const deleteModal = (id: string) => {
|
||||
Modal.confirm({
|
||||
title: '改场景已绑定告警,确定删除?',
|
||||
title: '该场景已绑定告警,确定删除?',
|
||||
onOk: async () => {
|
||||
await deleteScene(id)
|
||||
}
|
||||
|
|
|
@ -155,6 +155,7 @@ const search = debounce(() => {
|
|||
treeArray.set(item.id, item);
|
||||
}
|
||||
});
|
||||
expandedKeys.value = []
|
||||
dig(searchTree);
|
||||
treeData.value = ArrayToTree(cloneDeep([...treeArray.values()]));
|
||||
} else {
|
||||
|
@ -172,6 +173,9 @@ const search = debounce(() => {
|
|||
pIds.push(_item.parentId);
|
||||
treeArray.set(item, _item);
|
||||
expandedKeys.value.push(_item.id)
|
||||
if(pIds.length > 0){
|
||||
dig(pIds)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -196,8 +200,10 @@ function delDepartment(id: string) {
|
|||
}
|
||||
function refresh(id: string) {
|
||||
// @ts-ignore
|
||||
window?.onTabSaveSuccess && window.onTabSaveSuccess(id);
|
||||
setTimeout(() => window.close(), 300);
|
||||
if(window?.onTabSaveSuccess){
|
||||
window.onTabSaveSuccess(id);
|
||||
setTimeout(() => window.close(), 300);
|
||||
}
|
||||
getTree();
|
||||
}
|
||||
|
||||
|
|
|
@ -253,6 +253,7 @@
|
|||
<ChooseIconDialog
|
||||
v-if="dialogVisible"
|
||||
v-model:visible="dialogVisible"
|
||||
:icon="form.data.icon"
|
||||
@confirm="(typeStr:string)=>choseIcon(typeStr)"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -235,7 +235,6 @@ const filterMenus = (menus: any[]) => {
|
|||
item.children = filterMenus(item.children);
|
||||
}
|
||||
if (!filterProtocolList.length && item.code == 'link/DataCollect') {
|
||||
debugger
|
||||
return false;
|
||||
}
|
||||
return item
|
||||
|
|
|
@ -24,6 +24,10 @@ import iconKeys from './fields';
|
|||
const emits = defineEmits(['confirm', 'update:visible']);
|
||||
const props = defineProps<{
|
||||
visible: boolean;
|
||||
icon:{
|
||||
type:string,
|
||||
default:''
|
||||
}
|
||||
}>();
|
||||
|
||||
const confirm = () => {
|
||||
|
@ -31,7 +35,13 @@ const confirm = () => {
|
|||
emits('update:visible', false);
|
||||
};
|
||||
|
||||
|
||||
const selected = ref<string>('');
|
||||
|
||||
onMounted(()=>{
|
||||
console.log(props)
|
||||
props?.icon ? selected.value = props.icon : ''
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
hasPermission="system/Platforms/Setting:update"
|
||||
@click="save"
|
||||
v-if="props.mode !== 'home'"
|
||||
style="margin-left: 20px;"
|
||||
>
|
||||
保存
|
||||
</PermissionButton>
|
||||
|
|
|
@ -157,7 +157,7 @@ const filterPath = (path: object, filterArr: string[]) => {
|
|||
.ant-tree-list {
|
||||
.ant-tree-list-holder-inner {
|
||||
.ant-tree-switcher-noop {
|
||||
display: none !important;
|
||||
// display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<div class="top">
|
||||
<slot name="top" />
|
||||
</div>
|
||||
<j-row :gutter="24" class="content">
|
||||
<j-row class="content" :style="{padding:'24px'}" >
|
||||
<j-col
|
||||
:span="24"
|
||||
v-if="props.showTitle"
|
||||
style="font-size: 16px; margin-bottom: 48px"
|
||||
style="font-size: 16px;margin-bottom: 48px;"
|
||||
>
|
||||
API文档
|
||||
</j-col>
|
||||
|
@ -180,7 +180,6 @@ watch(
|
|||
.api-page-container {
|
||||
.content {
|
||||
background-color: #fff;
|
||||
padding: 24px;
|
||||
margin: 0 !important;
|
||||
.tree-content {
|
||||
padding-bottom: 30px;
|
||||
|
|
|
@ -64,8 +64,10 @@ const confirm = () => {
|
|||
|
||||
if (route.query.save) {
|
||||
// @ts-ignore
|
||||
window?.onTabSaveSuccess(resp.result.id);
|
||||
setTimeout(() => window.close(), 300);
|
||||
if((window as any).onTabSaveSuccess){
|
||||
(window as any).onTabSaveSuccess(resp.result.id);
|
||||
setTimeout(() => window.close(), 300);
|
||||
}
|
||||
} else jumpPage(`system/Role/Detail`, { id: resp.result.id });
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue