去除部门树接口
This commit is contained in:
@@ -51,11 +51,11 @@ onBeforeMount(() => {
|
||||
})
|
||||
|
||||
const init = async () => {
|
||||
await Promise.all([getAreaList(), dictDataCache(), getUserById(), areaSelect(),getAllUserSimpleList()]).then(res => {
|
||||
dictData.state.area = res[0].data
|
||||
dictData.state.basic = res[1].data
|
||||
await Promise.all([ dictDataCache(), getUserById(), areaSelect(),getAllUserSimpleList()]).then(res => {
|
||||
// dictData.state.area = res[0].data
|
||||
dictData.state.basic = res[0].data
|
||||
// dictData.state.userList=res[4].data
|
||||
adminInfo.dataFill(res[2].data)
|
||||
adminInfo.dataFill(res[1].data)
|
||||
// dictData.state.areaTree = res[3].data
|
||||
})
|
||||
/**
|
||||
|
||||
@@ -386,6 +386,7 @@ const saveIndicator = () => {
|
||||
.then((res: any) => {
|
||||
ElMessage.success(`保存成功`)
|
||||
loading.value = false
|
||||
tableStore.index()
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
|
||||
@@ -2710,7 +2710,7 @@ const volGradeChange = (e, row) => {
|
||||
capacity = 750
|
||||
break
|
||||
case '35':
|
||||
capacity = 259
|
||||
capacity = 250
|
||||
break
|
||||
case '10':
|
||||
capacity = 100
|
||||
@@ -2730,9 +2730,7 @@ const volGradeChange = (e, row) => {
|
||||
case '750':
|
||||
capacity = 7000
|
||||
break
|
||||
case '800':
|
||||
capacity = 7000
|
||||
break
|
||||
|
||||
case '1000':
|
||||
capacity = 9000
|
||||
break
|
||||
|
||||
@@ -182,7 +182,7 @@ const tableStore: any = new TableStore({
|
||||
icon: 'el-icon-Check',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !(props.deviceType === '2' && row.wavePath) || row.showName === '未知'
|
||||
return !(props.deviceType == '2' && row.wavePath == null)
|
||||
},
|
||||
click: row => {
|
||||
getFileByEventId(row.id).then(res => {
|
||||
@@ -219,6 +219,8 @@ const handleBack = async () => {
|
||||
}
|
||||
defineExpose({ getTableParams })
|
||||
onMounted(() => {
|
||||
console.log('🚀 ~ props.deviceType:', props.deviceType)
|
||||
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,12 @@
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input v-model.trim="tableStore.table.params.searchValue" style="width: 200px" clearable
|
||||
placeholder="请输入设备名称/网络设备ID" />
|
||||
<el-input
|
||||
v-model.trim="tableStore.table.params.searchValue"
|
||||
style="width: 200px"
|
||||
clearable
|
||||
placeholder="请输入设备名称/网络设备ID"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="流程阶段">
|
||||
<el-select v-model.trim="tableStore.table.params.process" clearable placeholder="请选择状态">
|
||||
@@ -14,7 +18,11 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="物联状态">
|
||||
<el-select v-model.trim="tableStore.table.params.connectStatus" clearable placeholder="请选择物联状态">
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.connectStatus"
|
||||
clearable
|
||||
placeholder="请选择物联状态"
|
||||
>
|
||||
<el-option label="已连接" :value="1"></el-option>
|
||||
<el-option label="未连接" :value="0"></el-option>
|
||||
</el-select>
|
||||
@@ -77,40 +85,77 @@
|
||||
<el-button type="primary" @click="downLoadFile1" class="ml10" icon="el-icon-Download">
|
||||
模版下载
|
||||
</el-button>
|
||||
<el-upload style="display: inline-block" action="" accept=".xlsx" class="upload-demo"
|
||||
:show-file-list="false" :auto-upload="false" :on-change="bulkImport">
|
||||
<el-upload
|
||||
style="display: inline-block"
|
||||
action=""
|
||||
accept=".xlsx"
|
||||
class="upload-demo"
|
||||
:show-file-list="false"
|
||||
:auto-upload="false"
|
||||
:on-change="bulkImport"
|
||||
>
|
||||
<el-button type="primary" class="ml10" icon="el-icon-Tickets">批量导入</el-button>
|
||||
</el-upload>
|
||||
<el-button type="primary" class="ml10" @click="add" icon="el-icon-Plus">新增设备</el-button>
|
||||
<el-button type="primary" class="ml10" icon="el-icon-Download" @click="downLoadQrCode"
|
||||
:disabled="!showQrCode">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="ml10"
|
||||
icon="el-icon-Download"
|
||||
@click="downLoadQrCode"
|
||||
:disabled="!showQrCode"
|
||||
>
|
||||
批量下载二维码
|
||||
</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" :key="tableKey" @sort-change="handleSortChange"></Table>
|
||||
|
||||
<el-dialog :title="dialogTitle" v-model.trim="dialogFormVisible" :close-on-click-modal="false"
|
||||
:before-close="resetForm" draggable width="800px">
|
||||
<el-dialog
|
||||
:title="dialogTitle"
|
||||
v-model.trim="dialogFormVisible"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="resetForm"
|
||||
draggable
|
||||
width="800px"
|
||||
>
|
||||
<el-form :model="form" label-width="auto" :rules="rules" ref="ruleFormRef" class="form-two">
|
||||
<el-form-item label="设备名称:" prop="name">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="form.name" autocomplete="off" clearable
|
||||
placeholder="请输入(项目名称+设备名称)"></el-input>
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
v-model.trim="form.name"
|
||||
autocomplete="off"
|
||||
clearable
|
||||
placeholder="请输入(项目名称+设备名称)"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="网络设备ID:" prop="ndid" class="top">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="form.ndid" autocomplete="off"
|
||||
placeholder="请输入"></el-input>
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
v-model.trim="form.ndid"
|
||||
autocomplete="off"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型:" prop="devType" class="top">
|
||||
<el-select v-model.trim="form.devType" placeholder="请选择" @change="formDevTypeChange" clearable>
|
||||
<el-option v-for="item in formDevTypeOptions" :key="item.value" :label="item.label || item.name"
|
||||
:value="item.value || item.id"></el-option>
|
||||
<el-option
|
||||
v-for="item in formDevTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label || item.name"
|
||||
:value="item.value || item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备型号:" prop="devModel" class="top">
|
||||
<el-select v-model.trim="form.devModel" filterable placeholder="请选择" clearable>
|
||||
<el-option v-for="item in formDevModelOptionsFilter" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
<el-option
|
||||
v-for="item in formDevModelOptionsFilter"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="通讯协议:" prop="devAccessMethod" class="top">
|
||||
@@ -120,8 +165,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联项目:" class="top">
|
||||
<el-cascader v-model.trim="form.association" filterable :options="engineeringList" :props="props"
|
||||
clearable />
|
||||
<el-cascader
|
||||
v-model.trim="form.association"
|
||||
filterable
|
||||
:options="engineeringList"
|
||||
:props="props"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序:" class="top" prop="sort">
|
||||
<el-input maxlength="32" show-word-limit-number v-model.trim="form.sort" :min="0" />
|
||||
@@ -728,11 +778,17 @@ const tableStore = new TableStore({
|
||||
render: 'basicButton',
|
||||
|
||||
click: async row => {
|
||||
resetFactory({
|
||||
nDid: row.ndid
|
||||
}).then(res => {
|
||||
ElMessage.success('重置成功!')
|
||||
tableStore.onTableAction('search', {})
|
||||
ElMessageBox.confirm('确定重置该设备吗?', '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
resetFactory({
|
||||
nDid: row.ndid
|
||||
}).then(res => {
|
||||
ElMessage.success('重置成功!')
|
||||
tableStore.onTableAction('search', {})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -754,7 +810,7 @@ const tableStore = new TableStore({
|
||||
tableStore.onTableAction('search', {})
|
||||
})
|
||||
})
|
||||
.catch(e => { })
|
||||
.catch(e => {})
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -985,10 +1041,10 @@ onMounted(() => {
|
||||
})
|
||||
})
|
||||
|
||||
setTimeout(() => { }, 100)
|
||||
setTimeout(() => {}, 100)
|
||||
})
|
||||
|
||||
const addMenu = () => { }
|
||||
const addMenu = () => {}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.qrcode-label {
|
||||
|
||||
@@ -16,9 +16,8 @@ import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { Setting } from '@element-plus/icons-vue'
|
||||
import { eventRecall, fileRecall, logRecall } from '@/api/cs-device-boot/recall'
|
||||
import { eventRecall, fileRecall, } from '@/api/cs-device-boot/recall'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { el } from 'element-plus/es/locale'
|
||||
|
||||
const props = defineProps({
|
||||
checkedNodes: {
|
||||
@@ -147,9 +146,11 @@ const recall1 = async () => {
|
||||
await eventRecall({
|
||||
startTime: tableStore.table.params.startTime,
|
||||
endTime: tableStore.table.params.endTime,
|
||||
lineList: props.checkedNodes.map((node: any) => node.id)
|
||||
lineList: props.checkedNodes.map((node: any) => node.id),
|
||||
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('补召事件成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import Table from '@/components/table/index.vue'
|
||||
import { ElMessage, ElTree } from 'element-plus'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { Setting } from '@element-plus/icons-vue'
|
||||
|
||||
import { eventRecall, fileRecall } from '@/api/cs-device-boot/recall'
|
||||
const props = defineProps({
|
||||
checkedNodes: {
|
||||
type: Array,
|
||||
@@ -68,23 +68,23 @@ const tableStore: any = new TableStore({
|
||||
2: '解析失败',
|
||||
3: '文件不存在'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: '100',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
}
|
||||
]
|
||||
}
|
||||
// {
|
||||
// title: '操作',
|
||||
// fixed: 'right',
|
||||
// width: '100',
|
||||
// render: 'buttons',
|
||||
// buttons: [
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '详情',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-EditPen',
|
||||
// render: 'basicButton',
|
||||
// click: row => {}
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
],
|
||||
beforeSearchFun: () => {},
|
||||
loadCallback: () => {}
|
||||
@@ -92,8 +92,22 @@ const tableStore: any = new TableStore({
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const exportTab = () => {
|
||||
ElMessage.info('稳态补召功能暂未开发!')
|
||||
const exportTab = async () => {
|
||||
// ElMessage.info('稳态补召功能暂未开发!')
|
||||
if (!props.checkedNodes || props.checkedNodes.length === 0) {
|
||||
ElMessage.warning('请先勾选监测点')
|
||||
return
|
||||
}
|
||||
|
||||
await eventRecall({
|
||||
startTime: tableStore.table.params.startTime,
|
||||
endTime: tableStore.table.params.endTime,
|
||||
lineList: props.checkedNodes.map((node: any) => node.id),
|
||||
bzType: 0
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('补召成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
//获取请求参数
|
||||
const getTableParams = (val: any) => {
|
||||
|
||||
Reference in New Issue
Block a user