|
@@ -37,8 +37,9 @@
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{mi}:{s}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" class-name="small-padding fixed-width" align="left" width="180">
|
|
|
+ <el-table-column label="操作" class-name="small-padding fixed-width" align="left" >
|
|
|
<template #default="scope">
|
|
|
+ <el-button link type="primary" icon="Edit" @click="handleHealthSet(scope.row)">健康度配置</el-button>
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['hl:bm:edit']">修改</el-button>
|
|
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['hl:bm:remove']">删除</el-button>
|
|
|
</template>
|
|
@@ -55,7 +56,8 @@
|
|
|
|
|
|
<!-- 添加或修改业务模型对话框 -->
|
|
|
<el-dialog :title="title" v-model="open" width="800px" append-to-body>
|
|
|
- <add-bm-info ref="bmRef" @success="getList"/>
|
|
|
+ <add-bm-info ref="bmRef" @cancel="open = false" @success="getList" v-if="dialogType==='add'"/>
|
|
|
+ <health-setting v-if="dialogType==='health'" :modelId="modelId"/>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -64,6 +66,7 @@
|
|
|
|
|
|
import { listBm, getBm, delBm, addBm, updateBm } from "@/api/hl/bm";
|
|
|
import addBmInfo from "./component/addBm.vue"
|
|
|
+import healthSetting from "./component/healthSetting.vue"
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
const bmList = ref([]);
|
|
@@ -75,6 +78,8 @@ const single = ref(true);
|
|
|
const multiple = ref(true);
|
|
|
const total = ref(0);
|
|
|
const title = ref("");
|
|
|
+const dialogType = ref("add")
|
|
|
+const modelId = ref(0)
|
|
|
|
|
|
const data = reactive({
|
|
|
form: {},
|
|
@@ -97,6 +102,13 @@ const data = reactive({
|
|
|
|
|
|
const { queryParams, form, rules } = toRefs(data);
|
|
|
|
|
|
+function handleHealthSet(row){
|
|
|
+ modelId.value = row.modelId
|
|
|
+ dialogType.value = "health"
|
|
|
+ open.value = true
|
|
|
+ title.value = "健康度配置"
|
|
|
+}
|
|
|
+
|
|
|
/** 查询业务模型列表 */
|
|
|
function getList() {
|
|
|
loading.value = true;
|
|
@@ -152,6 +164,7 @@ function handleSelectionChange(selection) {
|
|
|
/** 新增按钮操作 */
|
|
|
function handleAdd() {
|
|
|
reset();
|
|
|
+ dialogType.value ="add"
|
|
|
open.value = true;
|
|
|
title.value = "添加业务模型";
|
|
|
proxy.$nextTick(() => {
|
|
@@ -161,16 +174,12 @@ function handleAdd() {
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
function handleUpdate(row) {
|
|
|
- // reset();
|
|
|
- // const _modelId = row.modelId || ids.value
|
|
|
- // getBm(_modelId).then(response => {
|
|
|
- // form.value = response.data;
|
|
|
+ dialogType.value ="add"
|
|
|
open.value = true;
|
|
|
title.value = "修改业务模型";
|
|
|
proxy.$nextTick(() => {
|
|
|
proxy.$refs["bmRef"].editRow(row)
|
|
|
})
|
|
|
- // });
|
|
|
}
|
|
|
|
|
|
/** 提交按钮 */
|