|
@@ -3,7 +3,7 @@
|
|
|
<ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listTaskApi">
|
|
|
<!-- 表格 header 按钮 -->
|
|
|
<template #tableHeader="scope">
|
|
|
- <el-button type="primary" v-auth="['als:task:add']" icon="CirclePlus" @click="openDialog(1, '任务管理新增')"> 新增 </el-button>
|
|
|
+ <el-button type="primary" v-auth="['als:task:add']" icon="CirclePlus" @click="openDialog(1, '任务信息新增')"> 新增 </el-button>
|
|
|
<el-button type="primary" v-auth="['als:task:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>
|
|
|
<el-button
|
|
|
type="danger"
|
|
@@ -18,8 +18,8 @@
|
|
|
</template>
|
|
|
<!-- 表格操作 -->
|
|
|
<template #operation="scope">
|
|
|
- <el-button type="primary" link icon="View" v-auth="['als:task:query']" @click="openDialog(3, '任务管理查看', scope.row)"> 查看 </el-button>
|
|
|
- <el-button type="primary" link icon="EditPen" v-auth="['als:task:edit']" @click="openDialog(2, '任务管理编辑', scope.row)"> 编辑 </el-button>
|
|
|
+ <el-button type="primary" link icon="View" v-auth="['als:task:query']" @click="openDialog(3, '任务信息查看', scope.row)"> 查看 </el-button>
|
|
|
+ <el-button type="primary" link icon="EditPen" v-auth="['als:task:edit']" @click="openDialog(2, '任务信息编辑', scope.row)"> 编辑 </el-button>
|
|
|
<el-button type="primary" link icon="Delete" v-auth="['als:task:remove']" @click="deleteTask(scope.row)"> 删除 </el-button>
|
|
|
</template>
|
|
|
</ProTable>
|
|
@@ -35,33 +35,34 @@ import TaskDialog from '@/components/TaskDialog/index.vue'
|
|
|
import FormDialog from '@/components/FormDialog/index.vue'
|
|
|
import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
|
import { listTaskApi, delTaskApi, addTaskApi, updateTaskApi, exportTaskApi, getTaskApi } from '@/api/modules/als/task'
|
|
|
+const { proxy } = getCurrentInstance() as ComponentInternalInstance
|
|
|
+const { common_type } = toRefs<any>(proxy?.useDict('common_type'))
|
|
|
|
|
|
// ProTable 实例
|
|
|
const proTable = ref<ProTableInstance>()
|
|
|
// 表单model
|
|
|
const model = ref({})
|
|
|
-// 删除任务管理信息
|
|
|
+// 删除任务信息信息
|
|
|
const deleteTask = async (params: any) => {
|
|
|
- await useHandleData(delTaskApi, params.id, '删除【' + params.id + '】任务管理')
|
|
|
+ await useHandleData(delTaskApi, params.id, '删除【' + params.id + '】任务信息')
|
|
|
proTable.value?.getTableList()
|
|
|
}
|
|
|
|
|
|
-// 批量删除任务管理信息
|
|
|
+// 批量删除任务信息信息
|
|
|
const batchDelete = async (ids: string[]) => {
|
|
|
- await useHandleData(delTaskApi, ids, '删除所选任务管理信息')
|
|
|
+ await useHandleData(delTaskApi, ids, '删除所选任务信息信息')
|
|
|
proTable.value?.clearSelection()
|
|
|
proTable.value?.getTableList()
|
|
|
}
|
|
|
|
|
|
const taskDialogRef = ref<InstanceType<typeof TaskDialog> | null>(null)
|
|
|
-// 导出任务管理列表
|
|
|
+// 导出任务信息列表
|
|
|
const downloadFile = async () => {
|
|
|
- ElMessageBox.confirm('确认导出任务管理数据?', '温馨提示', { type: 'warning' }).then(async () => {
|
|
|
+ ElMessageBox.confirm('确认导出任务信息数据?', '温馨提示', { type: 'warning' }).then(async () => {
|
|
|
exportTaskApi(proTable.value?.searchParam)
|
|
|
taskDialogRef.value?.openExportDialog()
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
const formDialogRef = ref<InstanceType<typeof FormDialog> | null>(null)
|
|
|
// 打开弹框的功能
|
|
|
const openDialog = async (type: number, title: string, row?: any) => {
|
|
@@ -85,7 +86,7 @@ const openDialog = async (type: number, title: string, row?: any) => {
|
|
|
// 表格配置项
|
|
|
const columns = reactive<ColumnProps<any>[]>([
|
|
|
{ type: 'selection', fixed: 'left', width: 70 },
|
|
|
- { prop: 'id', label: '任务编号' },
|
|
|
+ { prop: 'id', label: '任务编号', width: 120 },
|
|
|
{
|
|
|
prop: 'name',
|
|
|
label: '任务名称',
|
|
@@ -97,10 +98,11 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
{
|
|
|
prop: 'source',
|
|
|
label: '数据源',
|
|
|
+ tag: true,
|
|
|
+ enum: common_type,
|
|
|
search: {
|
|
|
- el: 'input'
|
|
|
- },
|
|
|
- width: 120
|
|
|
+ el: 'select'
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
prop: 'sortieNo',
|
|
@@ -113,17 +115,31 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
{
|
|
|
prop: 'aircraftId',
|
|
|
label: '机号',
|
|
|
- search: {
|
|
|
- el: 'input'
|
|
|
- },
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
prop: 'dataId',
|
|
|
label: '数据编号',
|
|
|
- search: {
|
|
|
- el: 'input'
|
|
|
- },
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'preId',
|
|
|
+ label: '预处理编号',
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'falseAlarmId',
|
|
|
+ label: '虚警编号',
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'faultId',
|
|
|
+ label: '故障诊断编号',
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'decisionId',
|
|
|
+ label: '决策编号',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
@@ -164,7 +180,9 @@ const setItemsOptions = () => {
|
|
|
label: '数据源',
|
|
|
prop: 'source',
|
|
|
compOptions: {
|
|
|
- placeholder: '请输入数据源'
|
|
|
+ elTagName: 'select',
|
|
|
+ enum: common_type.value,
|
|
|
+ placeholder: '请选择数据源'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
@@ -187,6 +205,34 @@ const setItemsOptions = () => {
|
|
|
compOptions: {
|
|
|
placeholder: '请输入数据编号'
|
|
|
}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '预处理编号',
|
|
|
+ prop: 'preId',
|
|
|
+ compOptions: {
|
|
|
+ placeholder: '请输入预处理编号'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '虚警编号',
|
|
|
+ prop: 'falseAlarmId',
|
|
|
+ compOptions: {
|
|
|
+ placeholder: '请输入虚警编号'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '故障诊断编号',
|
|
|
+ prop: 'faultId',
|
|
|
+ compOptions: {
|
|
|
+ placeholder: '请输入故障诊断编号'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '决策编号',
|
|
|
+ prop: 'decisionId',
|
|
|
+ compOptions: {
|
|
|
+ placeholder: '请输入决策编号'
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
}
|