|
|
@@ -112,14 +112,24 @@
|
|
|
<el-row>
|
|
|
<el-col :span="16">
|
|
|
<el-form-item label="报警类型" prop="alarmType">
|
|
|
- <el-select v-model="form.alarmType" placeholder="请选择报警类型" style="width: 370px">
|
|
|
- <el-option
|
|
|
- v-for="alarmType in alarmTypeList"
|
|
|
- :key="alarmType.alarmType"
|
|
|
- :label="alarmType.alarmTypeName"
|
|
|
- :value="alarmType.alarmType"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
+ <CustomSelect
|
|
|
+ v-if="open"
|
|
|
+ v-model="form.alarmType"
|
|
|
+ :options="alarmTypeList"
|
|
|
+ placeholder="请选择报警类型"
|
|
|
+ value-key="alarmType"
|
|
|
+ label-key="alarmTypeName"
|
|
|
+ :filterable="true"
|
|
|
+ @change="handleSearch"
|
|
|
+ />
|
|
|
+ <!--<el-select v-model="form.alarmType" placeholder="请选择报警类型" style="width: 370px">-->
|
|
|
+ <!--<el-option-->
|
|
|
+ <!--v-for="alarmType in alarmTypeList"-->
|
|
|
+ <!--:key="alarmType.alarmType"-->
|
|
|
+ <!--:label="alarmType.alarmTypeName"-->
|
|
|
+ <!--:value="alarmType.alarmType"-->
|
|
|
+ <!--></el-option>-->
|
|
|
+ <!--</el-select>-->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -150,8 +160,10 @@
|
|
|
<script>
|
|
|
import { listAlgorithm, getAlgorithm, delAlgorithm, addAlgorithm, updateAlgorithm, syncAlgorithm, syncAlgorithmDH } from "@/api/business/ai/algorithm";
|
|
|
import { listAlarmType, genPromptWord } from "@/api/business/ai/alarmanalysis";
|
|
|
+import CustomSelect from './CustomSelect.vue'
|
|
|
|
|
|
export default {
|
|
|
+ components: { CustomSelect },
|
|
|
name: "Algorithm",
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -201,6 +213,11 @@ export default {
|
|
|
this.getAlarmTypeList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleSearch(alarmType) {
|
|
|
+ console.log('alarmType:', alarmType );
|
|
|
+ this.form.alarmType = alarmType;
|
|
|
+ console.log('this.form.alarmType:', this.form.alarmType );
|
|
|
+ },
|
|
|
/** 查询算法列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|