| | |
| | | class="!w-200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="测点类型" prop="pointType"> |
| | | <el-select |
| | | v-model="queryParams.pointType" |
| | | placeholder="请选择" |
| | | clearable |
| | | class="!w-240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in getStrDictOptions(DICT_TYPE.DATA_POINT_TYPE)" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="测点Tag" prop="tagNo"> |
| | | <el-input |
| | | v-model="queryParams.tagNo" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="操作" align="center" min-width="130" fixed="right" width="120"> |
| | | <el-table-column label="操作" align="center" min-width="130" fixed="right" width="140"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | link |
| | |
| | | > |
| | | 编辑 |
| | | </el-button> |
| | | <el-button link size="mini" type="primary" @click="chartHandle(scope.row)">数据</el-button> |
| | | <el-button link size="mini" type="primary" @click="chartHandle(scope.row)">历史值</el-button> |
| | | <el-button |
| | | link |
| | | size="mini" |
| | |
| | | > |
| | | 删除 |
| | | </el-button> |
| | | <el-button link size="mini" type="primary" @click="pointValueHandle(scope.row)">当前值</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <!-- 表单弹窗:添加/修改 --> |
| | | <DaPointForm ref="formRef" @success="getList" /> |
| | | |
| | | <!-- 历史值 --> |
| | | <DaPointChart ref="chartView" /> |
| | | |
| | | <!-- 用户导入对话框 --> |
| | | <!-- 当前值 --> |
| | | <DaPointValue ref="pointValue" /> |
| | | |
| | | <!-- 测点导入对话框 --> |
| | | <PointImportForm ref="importFormRef" @success="getList" /> |
| | | </template> |
| | | <script lang="ts" setup> |
| | |
| | | import {DICT_TYPE, getDictOptions, getIntDictOptions, getStrDictOptions} from "@/utils/dict"; |
| | | import DaPointForm from './DaPointForm.vue' |
| | | import DaPointChart from './DaPointChart.vue' |
| | | import * as UserApi from "@/api/system/user"; |
| | | import DaPointValue from './DaPointValue.vue' |
| | | import PointImportForm from './PointImportForm.vue' |
| | | |
| | | defineOptions({name: 'DataPoint'}) |
| | |
| | | pageSize: 10, |
| | | pointNo: undefined, |
| | | pointName: undefined, |
| | | pointType: undefined, |
| | | tagNo: undefined, |
| | | collectQuality: undefined, |
| | | }) |
| | |
| | | getList() |
| | | } |
| | | |
| | | /** 查看数据操作 */ |
| | | /** 查看历史值操作 */ |
| | | const chartView = ref() |
| | | const chartHandle = (raw: object) => { |
| | | chartView.value.open(raw) |
| | | } |
| | | |
| | | /** 查看当前值操作 */ |
| | | const pointValue = ref() |
| | | const pointValueHandle = (raw: object) => { |
| | | pointValue.value.open(raw) |
| | | } |
| | | |
| | | /** 重置按钮操作 */ |
| | | const resetQuery = () => { |
| | | queryFormRef.value.resetFields() |