123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354 |
- <template>
- <div class="siteManage-main variableList">
- <!-- 筛选start -->
- <div class="filter-container mb-20">
- <div class="left">
- <div>
- <a class="" style="margin-right: 30px">【测试站点1】站点的所有变量</a>
- <el-button icon="el-icon-plus" type="success" @click="addItem()"
- >新增</el-button
- >
- <el-button icon="el-icon-refresh" type="primary"
- >同步配置到采集器</el-button
- >
- </div>
- <div style="margin-top: 20px">
- <el-button @click="select=1" :type="select==1 ? 'primary' : ''" >模拟量</el-button>
- <el-button @click="select=2" :type="select==2 ? 'primary' : ''">状态量</el-button>
- <el-button @click="select=3" :type="select==3 ? 'primary' : ''">参数量</el-button>
- <el-input
- placeholder="搜索变量或编码"
- style="width: 200px"
- ></el-input>
- <el-button type="primary" icon="el-icon-search" class="search-button"
- >搜索</el-button
- >
- </div>
- <!-- <el-radio-group v-model="tabPosition" style="margin-top: 20px">
- <el-radio-button label="one">模拟量</el-radio-button>
- <el-radio-button label="two">状态量</el-radio-button>
- <el-radio-button label="three">参数量</el-radio-button>
- </el-radio-group> -->
- </div>
- <div class="right">
- <el-button type="primary">导入</el-button>
- <el-button type="primary">导出</el-button>
- </div>
- </div>
- <!-- 筛选end -->
- <!-- 表格start -->
- <el-table :data="tableData" border stripe :header-cell-style="headClass" :default-sort="{prop: 'date', order: 'descending'}">
- <el-table-column
- fixed
- prop="watchStatus"
- label="状态"
- width="50"
- align="center"
- >
- <template #default >
- <el-avatar class="status"></el-avatar>
- </template>
- </el-table-column>
- <el-table-column prop="watchName" label="序号" width="" sortable>
- </el-table-column>
- <el-table-column prop="watchCode" label="变量名" width="" sortable>
- </el-table-column>
- <el-table-column prop="ratedVoltage" label="变量编号" width="" sortable>
- </el-table-column>
- <el-table-column prop="ratedCurrent" label="监控设备" width="">
- </el-table-column>
- <el-table-column prop="fzlMx" label="通信设备" width="">
- </el-table-column>
- <el-table-column prop="powerAnalysis" label="数据地址" width="">
- </el-table-column>
- <el-table-column prop="watchAddress" label="数据类型" width="">
- </el-table-column>
- <el-table-column prop="watchAddress" label="系数" width="">
- </el-table-column>
- <el-table-column prop="watchAddress" label="存盘周期" width="">
- </el-table-column>
- <el-table-column fixed="right" label="操作" width="180">
- <template #default="scope">
- <el-button
- type="text"
- size="small"
- @click.prevent="editRow(scope.row)"
- >修改</el-button
- >
- <el-button
- @click="handleDelete(scope.$index, scope.row)"
- type="text"
- size="small"
- class="delete-text"
- >删除</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <!-- 表格end -->
- <!-- 分页start -->
- <div class="paginationBlock">
- <el-pagination
-
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage4"
- :page-sizes="[100, 200, 300, 400]"
- :page-size="100"
- layout="total, sizes, prev, pager, next, jumper"
- :total="400"
- >
- </el-pagination>
- </div>
- <!-- 分页end -->
- <!--弹框组件开始-----------------------start-->
- <dialog-component
- v-if="showDialog"
- ref="dialogComponent"
- :dialog-title="dialogTitle"
- :item-info="tableItem"
- @closeDialog="closeDialog"
- ></dialog-component>
- <!--弹框组件开始-----------------------end-->
- </div>
- </template>
- <script>
- import DialogComponent from "./dialogComponent";
- export default {
- name: "VariableList",
- components: { DialogComponent },
- data() {
- return {
- select:1,
- currentPage4: 4,
- showDialog: false,
- tabPosition: "one",
- input: "请输入状态",
- tableData: [
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- {
- ratedVoltage: "10KV",
- watchName: "测试设备1",
- watchCode: "cssb1",
- ratedCurrent: "58A",
- fzlMx: "80%",
- powerAnalysis: "开启",
- watchAddress: "1",
- },
- ],
- };
- },
- methods: {
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- },
- handleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- },
- // 表头样式设置
- goVariableList() {
- // 跳转至订单列表页面传参
- this.$router.push({
- path: "../siteManage/variableList/index.vue",
- });
- // this.$router.push({ name:'variableList'})
- },
- headClass() {
- return "background:#FAFAFA;";
- },
- // 添加操作
- addItem() {
- this.tableItem = {
- id: "",
- stationName: "",
- watchName: "",
- watchCode: "",
- siteList: [],
- done: "",
- guaZai: "",
- checked: true,
- };
- this.dialogTitle = "新增";
- this.showDialog = true;
- this.$nextTick(() => {
- this.$refs["dialogComponent"].showDialog = true;
- });
- },
- // 编辑操作
- editRow(row) {
- console.log(row);
- this.tableItem = row;
- this.dialogTitle = "编辑";
- this.showDialog = true;
- this.$nextTick(() => {
- this.$refs["dialogComponent"].showDialog = true;
- });
- },
- // 关闭操作
- closeDialog(flag) {
- if (flag) {
- // 重新刷新表格内容
- this.fetchData();
- }
- this.showDialog = false;
- },
- //删除操作
- handleDelete(index, row) {
- console.log(index, row);
- alert(index);
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- </style>
|