| | |
| | | <template> |
| | | <Dialog v-model="dialogVisible" :title="dialogTitle" width="50%"> |
| | | <Dialog v-model="dialogVisible" :title="dialogTitle" width="60%"> |
| | | <el-form |
| | | ref="formRef" |
| | | v-loading="formLoading" |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="编号" prop="mmPredictItem.itemno"> |
| | | <el-input v-model="dataForm.mmPredictItem.itemno" placeholder="编号" maxlength="50" readonly/> |
| | | <el-input v-model="dataForm.mmPredictItem.itemno" placeholder="编号" maxlength="50" |
| | | readonly/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | :data="dataForm.mmItemOutputList" |
| | | border |
| | | style="width: 100%; margin-top: 5px;"> |
| | | <el-table-column prop="outputorder" label="排序" align="center" width="80px" /> |
| | | <el-table-column label="结果" align="center" width="150px"> |
| | | <el-table-column prop="outputorder" label="排序" align="center" width="80px"/> |
| | | <el-table-column label="结果KEY" align="center" width="150px"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.resultstr" placeholder="请输入"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="结果数据类型" align="center" width="150px"> |
| | | <el-table-column label="结果类型" align="center" width="150px"> |
| | | <template #default="scope"> |
| | | <el-select |
| | | v-model="scope.row.resultType" |
| | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="索引" align="center" width="120px"> |
| | | <el-table-column label="索引" align="center" width="100px"> |
| | | <template #default="scope"> |
| | | <el-input-number style="width:100%;hight:100%" :disabled="scope.row.resultType !== 2" v-model="scope.row.resultIndex" :min="0" step-strictly controls-position="right"/> |
| | | <el-input-number style="width:100%;hight:100%" :disabled="scope.row.resultType !== 2" |
| | | v-model="scope.row.resultIndex" :min="0" step-strictly |
| | | controls-position="right"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="结果名称" align="center" width="150px"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.resultName" placeholder="请输入"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="数据点" align="center"> |
| | |
| | | <el-table-column prop="key" label="键" align="center" min-width="150"/> |
| | | <el-table-column prop="name" label="名称" align="center" min-width="150"/> |
| | | <el-table-column prop="valuetype" label="类型" align="center" min-width="150"/> |
| | | <el-table-column prop="" label="值" align="center" min-width="150"> |
| | | <el-table-column prop="" label="值" align="center" min-width="200"> |
| | | <template #default="scope"> |
| | | <el-input size="mini" v-model="scope.row.value" maxlength="256" |
| | | style="width:100%;height:100%"/> |
| | |
| | | <el-table-column prop="modelparamorder" label="序号" width="60" align="center"/> |
| | | <el-table-column prop="" label="类型" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-select v-model="scope.row.modelparamtype" placeholder="请选择"> |
| | | <el-select v-model="scope.row.modelparamtype" |
| | | @change="changeModelparamtype(scope.row)" |
| | | placeholder="请选择"> |
| | | <el-option |
| | | v-for="dict in getStrDictOptions(DICT_TYPE.MODEL_PARAM_TYPE)" |
| | | :key="dict.value" |
| | |
| | | import * as MmPredictItem from '@/api/model/pre/item' |
| | | import * as MmItemType from '@/api/model/pre/type' |
| | | import * as DmModule from '@/api/model/pre/dm' |
| | | import * as MmResultTable from '@/api/model/pre/result' |
| | | import * as ProjectApi from '@/api/model/mpk/project' |
| | | import * as DaPoint from '@/api/data/da/point' |
| | | import {useUpload} from '@/api/model/pre/item' |
| | | import * as ScheduleModelApi from '@/api/model/sche/model' |
| | | import request from "@/config/axios"; |
| | | |
| | | const {uploadUrl, httpRequest} = useUpload() |
| | | |
| | |
| | | const itemTypeList = ref([]) |
| | | const itemTypeMap = ref({}) |
| | | const moduleList = ref([]) |
| | | const resultstridList = ref([]) |
| | | const mpkProjectList = ref([]) |
| | | const pointNoList = ref([]) |
| | | const pointList = ref([]) |
| | |
| | | |
| | | // 获取管网列表 |
| | | moduleList.value = await DmModule.getModuleList() |
| | | |
| | | // 获取结果字符串列表 |
| | | resultstridList.value = await MmResultTable.getResultstridList() |
| | | |
| | | // 获取mpk项目列表 |
| | | mpkProjectList.value = await ProjectApi.list() |
| | |
| | | dataForm.value.itemtypename = itemTypeMap[value] |
| | | } |
| | | |
| | | function changeModelparamtype(value, row) { |
| | | function changeModelparamtype(row) { |
| | | row.modelparamid = '' |
| | | } |
| | | |
| | | function changeOutputPoint(value,row) { |
| | | function changeOutputPoint(value, row) { |
| | | row.tagname = pointMap[value] |
| | | } |
| | | |
| | |
| | | rows.splice(index, 0, row) |
| | | orderRow(rows) |
| | | } |
| | | |
| | | function addItemOutput(list) { |
| | | list.push({}) |
| | | orderItemOutput(list) |
| | | } |
| | | |
| | | function deleteItemOutput(index: string, rows) { |
| | | if (!rows || rows.length === 1) { |
| | | message.error('不能全部删除!') |
| | |
| | | rows.splice(index, 1) |
| | | orderItemOutput(rows) |
| | | } |
| | | |
| | | function orderItemOutput(list) { |
| | | list.sort((a, b) => a.outputorder - b.outputorder); |
| | | let outputorder = 1 |
| | |
| | | function resultTypeChange(value, row) { |
| | | if (value === 1) { |
| | | row.resultIndex = undefined |
| | | }else if (value === 2) { |
| | | } else if (value === 2) { |
| | | row.resultIndex = 0 |
| | | } |
| | | } |