|
@@ -0,0 +1,99 @@
|
|
|
+<template>
|
|
|
+ <zz-table
|
|
|
+ :cols="cols"
|
|
|
+ :settings="{ showIndex: true, stripe: true }"
|
|
|
+ :loading="mixins_onQuery"
|
|
|
+ :data="mixins_list"
|
|
|
+ :pageset="mixins_pageset"
|
|
|
+ @page-change="pageChange"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ >
|
|
|
+ <!-- <template slot-scope="scope" slot="opt">
|
|
|
+ <div class="opt">
|
|
|
+ <el-tooltip effect="light" placement="bottom" content="详情">
|
|
|
+ <i class="zoniot_font zoniot-icon-xiangqing" @click="lookDetail(scope.row)"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip effect="light" placement="bottom" content="终止">
|
|
|
+ <i class="zoniot_font zoniot-icon-zhongzhi redText" v-if="scope.row.adStatus !== 3" @click="Scrap(scope.row.id)"></i>
|
|
|
+ <i v-else class="zoniot_font zoniot-icon-zhongzhi ashText"></i>
|
|
|
+ </el-tooltip>
|
|
|
+
|
|
|
+ <el-tooltip effect="light" placement="bottom" content="删除">
|
|
|
+ <i class="zoniot_font zoniot-icon-shanchu redText" @click="deluserbyidFn(scope.row.id)"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template> -->
|
|
|
+ </zz-table>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ props: ['params'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ formData: {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getData() {
|
|
|
+ this.$http
|
|
|
+ .get('/sc-energy/device/detail', { deviceId: this.params.row.deviceId })
|
|
|
+ .then(({ status, data, msg }) => {
|
|
|
+ if (status == 0) {
|
|
|
+ this.formData = data;
|
|
|
+ console.log(data);
|
|
|
+ } else {
|
|
|
+ this.$message.error(msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ typeStatus(val) {
|
|
|
+ switch (val) {
|
|
|
+ case 1:
|
|
|
+ return '正常';
|
|
|
+ case 2:
|
|
|
+ return '告警';
|
|
|
+ case 3:
|
|
|
+ return '离线';
|
|
|
+ case 4:
|
|
|
+ return '未启用';
|
|
|
+ case 5:
|
|
|
+ return '报废';
|
|
|
+ default:
|
|
|
+ return '--';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getData();
|
|
|
+ // console.log(this.params.row);
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.diyTable {
|
|
|
+ border: 1px solid #ffffff29;
|
|
|
+ border-radius: 6px;
|
|
|
+ font-size: 12px;
|
|
|
+ .list {
|
|
|
+ line-height: 40px;
|
|
|
+ display: flex;
|
|
|
+ border-bottom: 1px solid #ffffff29;
|
|
|
+ &:last-child {
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+ &-title {
|
|
|
+ width: 90px;
|
|
|
+ text-align: center;
|
|
|
+ border-right: 1px solid #ffffff29;
|
|
|
+ }
|
|
|
+ &-text {
|
|
|
+ width: calc(100% - 90px);
|
|
|
+ padding-left: 20px;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|