|
@@ -0,0 +1,94 @@
|
|
|
+<template>
|
|
|
+ <div class="cqcy-content">
|
|
|
+ <div style="margin-bottom: 10px;">
|
|
|
+ <el-select v-model="chooseGroupId" disabled size="mini">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in groupDataList"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.groupName"
|
|
|
+ :value="dict.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-checkbox v-model="groupRunStatus" size="mini" style="margin-left: 20px;" @change="groupRunCheckboxEvent">运行</el-checkbox>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :data="itemDataList"
|
|
|
+ border
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column label="序号" align="center" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="itemName" label="数据项名称" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="val" label="数据项值" align="center" width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="dataSourceName" label="数据源名称" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="runState" label="运行状态" align="center" width="100">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="time" label="运行时间" align="center" width="120">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+
|
|
|
+import {getItemGroupById} from "@/api/datasource";
|
|
|
+import {showLoading} from "@/utils/cqcy";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "index",
|
|
|
+ components: {
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ itemDataList: [],
|
|
|
+ groupDataList: [],
|
|
|
+ chooseGroup: null,
|
|
|
+ chooseGroupId: null,
|
|
|
+ groupRunStatus: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ '$route'(to, from) {
|
|
|
+ this.readParams()
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 读取参数 */
|
|
|
+ readParams() {
|
|
|
+ let groupListStorage = sessionStorage.getItem('GROUP_LIST') ? sessionStorage.getItem('GROUP_LIST') : '[]'
|
|
|
+ this.groupDataList = JSON.parse(groupListStorage)
|
|
|
+ let groupId = sessionStorage.getItem('GROUP_ID') ? sessionStorage.getItem('GROUP_ID') : '-1'
|
|
|
+ this.chooseGroupId = parseInt(groupId)
|
|
|
+ this.getGroupById(this.chooseGroupId)
|
|
|
+ },
|
|
|
+ /** 运行状态值 */
|
|
|
+ groupRunCheckboxEvent(val) {
|
|
|
+ console.log(val)
|
|
|
+ console.log(this.chooseGroup)
|
|
|
+ },
|
|
|
+ /** 获取组详细信息 */
|
|
|
+ getGroupById(id) {
|
|
|
+ if (!id) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const loading = showLoading(this, '加载中,请稍候···')
|
|
|
+ getItemGroupById(id).then(res => {
|
|
|
+ loading.close()
|
|
|
+ this.chooseGroup = res.data
|
|
|
+ this.itemDataList = this.chooseGroup.itemList
|
|
|
+ }).catch((e) => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|