|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
<template> |
|
|
|
|
|
|
|
|
|
<div class="container"> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :span="4"> |
|
|
|
|
@ -45,7 +46,7 @@
|
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
<div class="flex between mb-20"> |
|
|
|
|
<el-button type="primary" @click="show = true" |
|
|
|
|
<el-button type="primary" @click="handleAdd" |
|
|
|
|
>添加模型</el-button |
|
|
|
|
> |
|
|
|
|
<div> |
|
|
|
|
@ -95,19 +96,7 @@
|
|
|
|
|
) |
|
|
|
|
}}</span> |
|
|
|
|
</div> |
|
|
|
|
<div |
|
|
|
|
class="col col-12" |
|
|
|
|
v-if=" |
|
|
|
|
item.windingNumber |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
<label>下发条数</label> |
|
|
|
|
<span |
|
|
|
|
>{{ |
|
|
|
|
item.windingNumber |
|
|
|
|
}}条</span |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<div class="col"> |
|
|
|
|
<label>最近活跃时间</label> |
|
|
|
|
@ -142,8 +131,29 @@
|
|
|
|
|
</el-row> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-dialog title="添加模型" v-model="show" top="5vh"> |
|
|
|
|
<el-dialog |
|
|
|
|
:title="mode === 'add' ? '添加模型' : '编辑模型'" |
|
|
|
|
v-model="show" |
|
|
|
|
top="5vh" |
|
|
|
|
> |
|
|
|
|
<el-form label-width="120" ref="formRef" :model="form"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="模型类型" |
|
|
|
|
prop="classId" |
|
|
|
|
:rules="{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请选择模型类型', |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<el-select v-model="form.classId" style="width: 340px"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in classes" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="模型名称" |
|
|
|
|
prop="modelName" |
|
|
|
|
@ -159,20 +169,21 @@
|
|
|
|
|
v-model="form.modelName" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
label="模型类型" |
|
|
|
|
prop="classId" |
|
|
|
|
label="建模方式" |
|
|
|
|
prop="modelingMethod" |
|
|
|
|
:rules="{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请选择模型类型', |
|
|
|
|
message: '请选择建模方式', |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<el-select v-model="form.classId" style="width: 340px"> |
|
|
|
|
<el-select v-model="form.modelingMethod" style="width: 340px"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in classes" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
|
v-for="item in dict.modelingMethod" |
|
|
|
|
:key="item.dictValue" |
|
|
|
|
:label="item.dictLabel" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
@ -186,6 +197,24 @@
|
|
|
|
|
> |
|
|
|
|
<model-icon-picker v-model="form.icon" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="数据类型" |
|
|
|
|
prop="modelDataType" |
|
|
|
|
:rules="{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请选择数据类型', |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<el-radio-group v-model="form.modelDataType" class="block"> |
|
|
|
|
<el-radio |
|
|
|
|
v-for="item in dict.modelDataType" |
|
|
|
|
:key="item.dictCode" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
>{{ item.dictLabel |
|
|
|
|
}}{{ item.remark ? `(${item.remark})` : "" }}</el-radio |
|
|
|
|
> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="分发方式" |
|
|
|
|
prop="distributionMethod" |
|
|
|
|
@ -204,8 +233,18 @@
|
|
|
|
|
> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
<template v-if="form.distributionMethod === DistributionMethod.AUTO"> |
|
|
|
|
<el-form-item label="分发周期" prop="distributionCycle"> |
|
|
|
|
|
|
|
|
|
<template |
|
|
|
|
v-if="form.distributionMethod === DistributionMethod.NEGATIVE_DISTRIBUTE" |
|
|
|
|
> |
|
|
|
|
<el-form-item |
|
|
|
|
label="分发周期" |
|
|
|
|
prop="distributionCycle" |
|
|
|
|
:rules="{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请选择分发周期', |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<el-radio-group |
|
|
|
|
v-model="form.distributionCycle" |
|
|
|
|
class="block" |
|
|
|
|
@ -220,6 +259,33 @@
|
|
|
|
|
}}</el-radio |
|
|
|
|
> |
|
|
|
|
</el-radio-group> |
|
|
|
|
<div class="flex ml-20" v-if="form.distributionCycle"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="周" |
|
|
|
|
prop="" |
|
|
|
|
label-width="80" |
|
|
|
|
:rules="{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请选择', |
|
|
|
|
}" |
|
|
|
|
v-if="form.distributionCycle === DistributionCycle.WEEKLY" |
|
|
|
|
> |
|
|
|
|
<el-select style="width: 120px" clearable> |
|
|
|
|
<el-option v-for="(item, index) in WEEKS" :key="index" :label="`周${item}`" :value="index" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="时间" |
|
|
|
|
prop="distributionCycleTime" |
|
|
|
|
label-width="80" |
|
|
|
|
:rules="{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请选择', |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
<el-time-picker v-model="form.distributionCycleTime" placeholder="请选择" style="width: 120px" value-format="HH:mm:ss" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="办理时限" |
|
|
|
|
@ -308,9 +374,9 @@
|
|
|
|
|
</el-form> |
|
|
|
|
<footer class="flex end"> |
|
|
|
|
<el-button @click="show = false" size="large">取消</el-button> |
|
|
|
|
<el-button type="primary" size="large" @click="handleSubmit" |
|
|
|
|
>添加模型</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" size="large" @click="handleSubmit">{{ |
|
|
|
|
mode === "add" ? "添加模型" : "确认" |
|
|
|
|
}}</el-button> |
|
|
|
|
</footer> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
@ -331,6 +397,15 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="row"> |
|
|
|
|
<div class="col col-8"> |
|
|
|
|
<label>建模方式</label> |
|
|
|
|
<span>{{ |
|
|
|
|
getDictLable( |
|
|
|
|
dict.modelingMethod, |
|
|
|
|
activeModel.modelingMethod |
|
|
|
|
) |
|
|
|
|
}}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-8"> |
|
|
|
|
<label>分发方式</label> |
|
|
|
|
<span>{{ |
|
|
|
|
@ -340,6 +415,15 @@
|
|
|
|
|
) |
|
|
|
|
}}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-8"> |
|
|
|
|
<label>数据类型</label> |
|
|
|
|
<span>{{ |
|
|
|
|
getDictLable( |
|
|
|
|
dict.modelDataType, |
|
|
|
|
activeModel.modelDataType |
|
|
|
|
) |
|
|
|
|
}}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-8"> |
|
|
|
|
<label>分发周期</label> |
|
|
|
|
<span>{{ |
|
|
|
|
@ -385,10 +469,7 @@
|
|
|
|
|
<label>最近活跃时间</label> |
|
|
|
|
<span>{{ activeModel.updateTime }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-8"> |
|
|
|
|
<label>下发条数</label> |
|
|
|
|
<span>{{ activeModel.windingNumber }}</span> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<div class="row mb-20"> |
|
|
|
|
<div class="col col-24"> |
|
|
|
|
@ -396,38 +477,48 @@
|
|
|
|
|
<span>{{ activeModel.remarks }}</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex end mb-20"> |
|
|
|
|
<el-button type="primary">查看预警线索</el-button> |
|
|
|
|
<el-button type="primary">预警模型设计</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex end mb-20"></div> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<div> |
|
|
|
|
<div class="mb-10"> |
|
|
|
|
<h4 style="margin: 10px 0" class="text-primary">预警记录</h4> |
|
|
|
|
<el-table :data="tableData" size="small"> |
|
|
|
|
<el-table-column label="同步时间" prop="time" /> |
|
|
|
|
<el-table-column label="预警条数" prop="number" /> |
|
|
|
|
<el-table-column label="分发状态" prop="state" /> |
|
|
|
|
</el-table> |
|
|
|
|
<div style="min-height: 300px"> |
|
|
|
|
<div class="table-container"> |
|
|
|
|
<el-table :data="tableData" size="small"> |
|
|
|
|
<el-table-column label="同步时间" prop="createTime" /> |
|
|
|
|
<el-table-column label="预警条数" prop="size" /> |
|
|
|
|
<el-table-column label="分发状态" prop="state" /> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<footer class="flex end"> |
|
|
|
|
<el-button @click="show = false" type="primary" plain size="large" |
|
|
|
|
<el-button @click="handleEdit" type="primary" plain size="large" |
|
|
|
|
>编辑模型</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="danger" plain @click="submit" size="large" |
|
|
|
|
<el-button type="danger" plain @click="handleDel" size="large" |
|
|
|
|
>删除模型</el-button |
|
|
|
|
> |
|
|
|
|
</footer> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
<script setup> |
|
|
|
|
import { DistributionMethod } from '@/enums/dictEnums' |
|
|
|
|
import { DistributionMethod, DistributionCycle } from "@/enums/dictEnums"; |
|
|
|
|
import { WEEKS } from "@/enums/appEnums"; |
|
|
|
|
import { listModelClass } from "@/api/sensitivePerception/modelClass"; |
|
|
|
|
import { addModel, listModel } from "@/api/sensitivePerception/model"; |
|
|
|
|
import { |
|
|
|
|
addModel, |
|
|
|
|
updateModel, |
|
|
|
|
delModel, |
|
|
|
|
listModel, |
|
|
|
|
} from "@/api/sensitivePerception/model"; |
|
|
|
|
import { listTopModelClueRecords } from "@/api/sensitivePerception/modelClue"; |
|
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
|
import { getDictLable } from "@/utils/util"; |
|
|
|
|
import feedback from "@/utils/feedback"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const catchStore = useCatchStore(); |
|
|
|
|
const dict = catchStore.getDicts([ |
|
|
|
|
"distributionMethod", |
|
|
|
|
@ -435,6 +526,8 @@ const dict = catchStore.getDicts([
|
|
|
|
|
"distributionFlow", |
|
|
|
|
"timeLimit", |
|
|
|
|
"approvalFlow", |
|
|
|
|
"modelingMethod", |
|
|
|
|
"modelDataType", |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
const query = ref({ |
|
|
|
|
@ -473,69 +566,65 @@ function handleChangeClass(id) {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const show = ref(false); |
|
|
|
|
const mode = ref("add"); |
|
|
|
|
const form = ref({ |
|
|
|
|
distributionMethod: "1", |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
watch(mode, (val) => { |
|
|
|
|
if (val === "add") { |
|
|
|
|
initForm(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function initForm() { |
|
|
|
|
form.value = { distributionMethod: "1" }; |
|
|
|
|
} |
|
|
|
|
const formRef = ref(null); |
|
|
|
|
|
|
|
|
|
function handleAdd() { |
|
|
|
|
show.value = true; |
|
|
|
|
mode.value = "add"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleEdit() { |
|
|
|
|
show.value = true; |
|
|
|
|
mode.value = "edit"; |
|
|
|
|
form.value = { ...activeModel.value }; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function handleSubmit() { |
|
|
|
|
await formRef.value.validate(); |
|
|
|
|
await addModel(form.value); |
|
|
|
|
if (mode.value === "add") { |
|
|
|
|
await addModel(form.value); |
|
|
|
|
} else { |
|
|
|
|
activeModel.value = await updateModel(form.value); |
|
|
|
|
} |
|
|
|
|
getList(); |
|
|
|
|
form.value = { distributionMethod: "1" }; |
|
|
|
|
initForm(); |
|
|
|
|
show.value = false; |
|
|
|
|
feedback.msgSuccess("模型添加成功"); |
|
|
|
|
feedback.msgSuccess("操作成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function handleDel() { |
|
|
|
|
await feedback.confirm("确定删除该模型?"); |
|
|
|
|
await delModel(activeModel.value.id); |
|
|
|
|
feedback.msgSuccess("操作成功"); |
|
|
|
|
getList(); |
|
|
|
|
detailShow.value = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const detailShow = ref(false); |
|
|
|
|
const activeModel = ref({}); |
|
|
|
|
const tableData = ref([ |
|
|
|
|
{ |
|
|
|
|
time: "2024-09-20 11:00:00", |
|
|
|
|
number: 122, |
|
|
|
|
state: "已分发", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
time: "2024-09-20 11:00:00", |
|
|
|
|
number: 122, |
|
|
|
|
state: "已分发", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
time: "2024-09-20 11:00:00", |
|
|
|
|
number: 122, |
|
|
|
|
state: "已分发", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
time: "2024-09-20 11:00:00", |
|
|
|
|
number: 122, |
|
|
|
|
state: "已分发", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
time: "2024-09-20 11:00:00", |
|
|
|
|
number: 122, |
|
|
|
|
state: "已分发", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
time: "2024-09-20 11:00:00", |
|
|
|
|
number: 122, |
|
|
|
|
state: "已分发", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
time: "2024-09-20 11:00:00", |
|
|
|
|
number: 122, |
|
|
|
|
state: "已分发", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
time: "2024-09-20 11:00:00", |
|
|
|
|
number: 122, |
|
|
|
|
state: "已分发", |
|
|
|
|
}, |
|
|
|
|
]); |
|
|
|
|
const tableData = ref([]); |
|
|
|
|
|
|
|
|
|
function openDetail(item) { |
|
|
|
|
detailShow.value = true; |
|
|
|
|
async function openDetail(item) { |
|
|
|
|
activeModel.value = item; |
|
|
|
|
tableData.value = await listTopModelClueRecords(item.id); |
|
|
|
|
detailShow.value = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.menu { |
|
|
|
|
|