ming 3 jaren geleden
bovenliggende
commit
d844cb02cb

+ 2 - 1
public/static/config.js

@@ -4,7 +4,8 @@ var PLATFROM_CONFIG = {};
 // PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/"  //超博本地
 
 PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
-// PLATFROM_CONFIG.fileUrl = "https://wx.ewoogi.com/file/" //xlsx文件访问路径
+PLATFROM_CONFIG.images = "https://qhome.usky.cn/file/" //线上图片
+PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
 
 // 本地json文件请求路径
 PLATFROM_CONFIG.Interface = "/vuefiv/InterfaceReturn.json"

+ 18 - 0
src/api/alarmManage/index.js

@@ -7,4 +7,22 @@ export function alarmGradeCount(params) {
         method: 'GET',
         params,
     })
+}
+
+//巡检管理-巡检计划-计划列表详情
+export function alarmGradeList(params) {
+    return request({
+        url: '/alarmPower/alarmGradeList',
+        method: 'GET',
+        params,
+    })
+}
+
+//巡检管理-巡检计划-计划列表详情
+export function alarmPower(params) {
+    return request({
+        url: '/alarmPower/',
+        method: 'PUT',
+        data: params,
+    })
 }

+ 30 - 0
src/api/deviceManage/powerEquip/communicateEquip.js

@@ -36,6 +36,36 @@ export function correspondDeviceDel(params) {
     })
 }
 
+//设备管理-通信设备-克隆
+export function variableCloning(params) {
+    return request({
+        url: '/device/variableCloning',
+        method: 'GET',
+        params,
+    })
+}
+
+//通信设备--通信设备-克隆-设备下拉框查询
+export function deviceList(params) {
+    return request({
+        url: '/device/deviceList',
+        method: 'GET',
+        params,
+    })
+}
+
+
+//站点管理-通信设备-导出
+export function deviceExport(params) {
+    return request({
+        url: '/device/correspondDeviceExport',
+        method: 'GET',
+        params,
+    })
+}
+
+
+
 
 
 

+ 4 - 0
src/main.js

@@ -40,5 +40,9 @@ app
   .use(Antd)
   .mount('#app')
 
+
+/**
+ * @需添加路由拦截 --登录后执行
+ */
 store.commit("publicSiteList");
 store.commit('publicDeviceList')

+ 143 - 125
src/views/alarmManage/alarmTotal.vue

@@ -3,7 +3,17 @@
     <!-- 返回start -->
     <div class="siteTitle">
       <el-button class="goBack" @click="goBack">返回</el-button>
-      站点【上海新时达电气股份有限公司】{{ alarmTit == 1 ? '一级告警' : '' }}
+      站点【上海新时达电气股份有限公司】{{
+        alarmGradeList.type == 0
+          ? '总数'
+          : alarmGradeList.type == 1
+          ? '一级告警'
+          : alarmGradeList.type == 2
+          ? '二级告警'
+          : alarmGradeList.type == 3
+          ? '其它'
+          : ''
+      }}
     </div>
     <!-- 返回end -->
 
@@ -17,18 +27,18 @@
     >
       <el-table-column
         fixed
-        prop="happenTime"
+        prop="soeTime"
         label="发生时间"
         width=""
       ></el-table-column>
       <el-table-column
-        prop="alarmDes"
-        label="告警描述"
+        prop="measDesc"
+        label="测点描述"
         width=""
       ></el-table-column>
       <el-table-column
-        prop="deviceName"
-        label="设备"
+        prop="alarmName"
+        label="告警名称"
         width=""
       ></el-table-column>
       <el-table-column
@@ -38,7 +48,7 @@
       ></el-table-column>
       <el-table-column prop="check" label="详情" width="">
         <template #default="scope">
-          <span @click="addItem()">{{ scope.row.check }}</span>
+          <span @click="checkItem_addItem(scope.row)">查看</span>
         </template>
       </el-table-column>
       <el-table-column prop="eddl" label="状态" width="">
@@ -46,14 +56,24 @@
           <span
             :style="{
               color:
-                scope.row.eddl == '已确认-admin'
+                scope.row.handlingStatus == 1
                   ? '#8DCF6E'
-                  : scope.row.eddl == '未确认'
+                  : scope.row.handlingStatus == 2
                   ? '#FF747B'
                   : '#5c88fa',
             }"
           >
-            {{ scope.row.eddl }}
+            {{
+              scope.row.handlingStatus == 0
+                ? '未处理'
+                : scope.row.handlingStatus == 1
+                ? '已处理'
+                : scope.row.handlingStatus == 2
+                ? '待确认'
+                : scope.row.handlingStatus == 3
+                ? '自动恢复'
+                : '过期失效'
+            }}
           </span>
         </template>
       </el-table-column>
@@ -65,150 +85,148 @@
       <el-pagination
         @size-change="handleSizeChange"
         @current-change="handleCurrentChange"
-        :current-page="currentPage4"
-        :page-sizes="[100, 200, 300, 400]"
-        :page-size="100"
+        :current-page="currentPage"
+        :page-sizes="[15, 20, 25, 30]"
+        :page-size="pageSize"
         layout="total, sizes, prev, pager, next, jumper"
-        :total="400"
+        :total="total"
       ></el-pagination>
     </div>
     <!-- 分页end -->
 
     <!--弹框组件开始-----------------------start-->
     <dialog-component
-      v-if="showDialog"
-      ref="dialogComponent"
+      :show_Dialog="showDialog"
       :dialog-title="dialogTitle"
       :item-info="tableItem"
       @closeDialog="closeDialog"
+      @listSelect="listSelect"
     ></dialog-component>
     <!--弹框组件开始-----------------------end-->
   </div>
 </template>
 
 <script>
-import DialogComponent from './dialogComponent'
-export default {
-  name: 'AlarmTotal',
-  // computed: {
-  //   ...mapGetters(['name']),
-  // },
-  props: ['pageShow'],
-  components: { DialogComponent },
-  data() {
-    return {
-      showDialog: false,
+import dialogComponent from './dialogComponent'
+import { useStore } from 'vuex'
+import { defineComponent, onMounted, ref } from 'vue'
+import * as api from '@/api/alarmManage/index'
+import { ElMessage } from 'element-plus'
 
-      input: '请输入发生时间',
-      tableData: [
-        {
-          happenTime: '2021-09-14 14:23:21',
-          alarmDes: '【母线带电】SEO状态变为ON',
-          deviceName: '电压测试',
-          alarmType: '故障',
-          check: '查看',
-          eddl: '自动恢复',
-        },
-        {
-          happenTime: '2021-09-14 14:23:21',
-          alarmDes: '【母线带电】SEO状态变为ON',
-          deviceName: '小会议室测试151',
-          alarmType: '故障',
-          check: '查看',
-          eddl: '已确认-admin',
-        },
-        {
-          happenTime: '2021-09-14 14:23:21',
-          alarmDes: '【母线带电】SEO状态变为ON',
-          deviceName: '电压测试',
-          alarmType: 'spjcsdb1',
-          check: '查看',
-          eddl: '未确认',
-        },
-        {
-          happenTime: '2021-09-14 14:23:21',
-          alarmDes: '【母线带电】SEO状态变为ON',
-          deviceName: '小会议室测试151',
-          alarmType: '故障',
-          check: '查看',
-          eddl: '自动恢复',
-        },
-      ],
-    }
-  },
-  computed: {
-    alarmTit: function () {
-      return this.$route.query.type
-      // if(this.$route.query.id==1){
-      //   alert(1)
-      //   return '一级告警'
-      // }
-    },
+export default defineComponent({
+  name: 'AlarmTotal',
+  props: {
+    pageShow: Boolean,
+    alarmGradeList: Object,
   },
-  methods: {
+  components: { dialogComponent },
+  setup(props, { emit }) {
+    const store = useStore()
+
+    const total = ref(0)
+    const pageSize = ref(15)
+    const currentPage = ref(1)
+    const tableData = ref([])
+    const showDialog = ref(false)
 
-    goBack() {
-      this.$emit('func')
-    },
+    const dialogTitle = ref('')
+    const tableItem = ref([])
+
+    //查询
+    function listSelect() {
+      api
+        .alarmGradeList({
+          siteId: store.state.siteId,
+          startTime: props.alarmGradeList.startTime,
+          endTime: props.alarmGradeList.endTime,
+          size: pageSize.value,
+          current: currentPage.value,
+          type: props.alarmGradeList.type,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            total.value = requset.data.total
+            tableData.value = requset.data.records
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
 
     // 查看操作
-    checkItem() {
-      this.tableItem = {
-        id: '',
-        stationName: '',
-        stationCode: '',
-        stationAddress: '',
-        siteList: [],
-        done: '',
-        guaZai: '',
-      }
-      this.dialogTitle = '告警详情'
-      this.showDialog = true
-      this.$nextTick(() => {
-        this.$refs['dialogComponent'].showDialog = true
-      })
-    },
-
- 
-    // 表头样式设置
-    headClass() {
-      return 'background:#FAFAFA;'
-    },
+    const checkItem_addItem = (row) => {
+      tableItem.value = row
+      dialogTitle.value = '告警详情'
+      showDialog.value = true
+    }
+
+    //查看///添加操作
+    const handleClick = (row) => {
+      alert('查看对应站点(页面跳转)')
+      console.log(row)
+    }
+
+    onMounted(() => {
+      listSelect()
+    })
 
+    //关闭弹窗
+    const closeDialog = (flag) => {
+      showDialog.value = flag
+    }
+    
+    //返回
+    const goBack = () => {
+      emit('func')
+    }
+    //条数
+    const handleSizeChange = (val) => {
+      pageSize.value = val
+      listSelect()
+    }
+    //页数
+    const handleCurrentChange = (val) => {
+      currentPage.value = val
+      listSelect()
+    }
     //自定义列样式
-    cellStyle({ row, column, rowIndex, columnIndex }) {
-      console.log(row, column, rowIndex)
+    const cellStyle = ({ row, column, rowIndex, columnIndex }) => {
+      row, column, rowIndex
+      // console.log(row, column, rowIndex)
       if (columnIndex === 4) {
         return `color:#1187FF;cursor:pointer`
       } else {
         return ''
       }
-    },
-    //查看
-    handleClick(row) {
-      alert('查看对应站点(页面跳转)')
-      console.log(row)
-    },
-
-    // 添加操作
-    addItem() {
-      this.tableItem = {
-        id: '',
-        happenTime: '',
-        alarmDes: '',
-        deviceName: '',
-        siteList: [],
-        done: '',
-        guaZai: '',
-      }
-      this.dialogTitle = '告警详情'
-      this.showDialog = true
-      this.$nextTick(() => {
-        this.$refs['dialogComponent'].showDialog = true
-      })
-    },
+    }
+    // 表头样式设置
+    const headClass = () => {
+      return 'background:#FAFAFA;'
+    }
+    return {
+      handleSizeChange,
+      handleCurrentChange,
+      goBack,
+      checkItem_addItem,
+      headClass,
+      cellStyle,
+      handleClick,
+      listSelect,
+      closeDialog,
+
+      showDialog,
+      input: '请输入发生时间',
+
+      total,
+      pageSize,
+      currentPage,
+      tableData,
+
+      dialogTitle,
+      tableItem,
+    }
   },
-}
+})
 </script>
 
 <style lang='scss' scoped>

+ 259 - 188
src/views/alarmManage/dialogComponent.vue

@@ -1,228 +1,299 @@
 <template>
-  <transition name="dialog-fade">
-    <el-dialog
-      v-if="showDialog"
-      :title="dialogTitle"
-      class="dialog-component"
-      v-model="showDialog"
-      width="640px"
-      @close="closeDialog(0)"
+  <el-dialog
+    :title="dialogTitle"
+    v-model="showDialog"
+    width="640px"
+    @close="closeDialog"
+  >
+    <el-form
+      ref="formInfo"
+      :model="form"
+      class="demo-form-inline alarmStatusDialog"
+      label-width="100px"
     >
-      <el-form
-        ref="formInfo"
-        :model="formInfo"
-        class="demo-form-inline alarmStatusDialog"
-        label-width="100px"
-        :rules="rules"
-      >
-        <div class="topInfo underline">
-          <el-form-item label="卡号:" prop="stationName">
-            2021-09-14 14:53:28
-          </el-form-item>
-          <el-form-item label="告警历时:" prop="stationCode">
-            3分钟
-          </el-form-item>
-          <el-form-item label="关联告警:" prop="stationAddress">
-            2021-09-14 14:54:59
-          </el-form-item>
-          <div class="deviceTit">【测试站点主线】设备低压 复归:</div>
-           <el-button type="success" class="lubo">故障录播</el-button>
-           <div class="handleStatus">未处理</div>
+      <div class="topInfo underline">
+        <el-form-item label="告警时间:" prop="soeTime">
+          {{ itemInfo.soeTime }}
+        </el-form-item>
+        <el-form-item label="告警历时:" prop="stationCode">3分钟</el-form-item>
+        <el-form-item label="关联告警:" prop="stationAddress">
+          2021-09-14 14:54:59
+        </el-form-item>
+        <div class="deviceTit"></div>
+        <el-button type="success" class="lubo">
+          {{ itemInfo.measDesc }}
+        </el-button>
+        <div
+          class="handleStatus"
+          :style="{
+            color:
+              itemInfo.handlingStatus == 1
+                ? '#8DCF6E'
+                : itemInfo.handlingStatus == 2
+                ? '#FF747B'
+                : '#5c88fa',
+          }"
+        >
+          {{
+            itemInfo.handlingStatus == 0
+              ? '未处理'
+              : itemInfo.handlingStatus == 1
+              ? '已处理'
+              : itemInfo.handlingStatus == 2
+              ? '待确认'
+              : itemInfo.handlingStatus == 3
+              ? '自动恢复'
+              : '过期失效'
+          }}
         </div>
+      </div>
 
-        <div class="basicTit">基本信息</div>
+      <div class="basicTit">基本信息</div>
 
-        <el-form-item label="站点名称:" prop="pointNum">
-          测试站点1
-        </el-form-item>
-        <el-form-item label="台区展示:" prop="deviceNum">
-          测试台区1
-        </el-form-item>
-        <el-form-item label="线路:" prop="deviceNum"> 进线二 </el-form-item>
-        <el-form-item label="告警信息:" prop="deviceNum"> 低压 </el-form-item>
-        <el-form-item label="告警状态:" prop="deviceNum"> 动作 </el-form-item>
-        <el-form-item label="采集终端:" prop="deviceNum">
-          DA00013433
-        </el-form-item>
-        <el-form-item label="站点地址:" prop="deviceNum">
-          沪太路8786弄155号
-        </el-form-item>
-        <el-form-item label="联系人:" prop="deviceNum"> 张三 </el-form-item>
-        <el-form-item label="联系方式:" prop="deviceNum">
-          12345675223
-        </el-form-item>
+      <el-form-item label="站点名称:" prop="pointNum">测试站点1</el-form-item>
+      <el-form-item label="台区展示:" prop="deviceNum">测试台区1</el-form-item>
+      <el-form-item label="线路:" prop="deviceNum">进线二</el-form-item>
+      <el-form-item label="告警信息:" prop="deviceNum">
+        {{ itemInfo.measDesc.split(itemInfo.measDesc.slice(-2))[0] }}
+      </el-form-item>
+      <el-form-item label="告警状态:" prop="deviceNum">
+        {{ itemInfo.measDesc.slice(-2) }}
+      </el-form-item>
+      <el-form-item label="采集终端:" prop="deviceNum">
+        {{ itemInfo.deviceCode }}
+      </el-form-item>
+      <el-form-item label="站点地址:" prop="deviceNum">
+        沪太路8786弄155号
+      </el-form-item>
+      <el-form-item label="联系人:" prop="deviceNum">张三</el-form-item>
+      <el-form-item label="联系方式:" prop="deviceNum">
+        {{ itemInfo.handlerPhone }}
+      </el-form-item>
 
-        <div class="basicTit">处理信息</div>
+      <div class="basicTit">处理信息</div>
 
-        <el-form-item label="处理内容" prop="handleCont" style="margin-bottom:20px">
-          <el-input
-            v-model="textarea"
-            :rows="2"
-            type="textarea"
-            placeholder="Please input"
-          />
-        </el-form-item>
+      <el-form-item
+        label="处理内容:"
+        prop="handlingContent"
+        style="margin-bottom: 20px"
+      >
+        <el-input
+          v-model="textarea"
+          :rows="2"
+          type="textarea"
+          placeholder="Please input"
+          v-if="itemInfo.handlingStatus != 1"
+        />
+        <span v-if="itemInfo.handlingStatus == 1">
+          {{
+            itemInfo.handlingContent === '' ? '无' : itemInfo.handlingContent
+          }}
+        </span>
+      </el-form-item>
 
-        <el-form-item label="现场照片" prop="deviceNum">
-          <el-upload
-                  action="#"
-                  list-type="picture-card"
-                  :auto-upload="false"
-                  :limit="3"
-                >
-                <!-- slot="default" -->
-                  <i  class="el-icon-plus"></i>
-                  <!-- :default-slot="{ file }" -->
-                  <div  >
-                    <!-- <img
-                      class="el-upload-list__item-thumbnail"
-                      :src="file.url"
-                      alt=""
-                    /> -->
-                    <span class="el-upload-list__item-actions">
-                      <span
-                        class="el-upload-list__item-preview"
-                        @click="handlePictureCardPreview(file)"
-                      >
-                        <!-- <i class="el-icon-zoom-in"></i> -->
-                      </span>
-                      <span
-                        v-if="!disabled"
-                        class="el-upload-list__item-delete"
-                        @click="handleRemove(file)"
-                      >
-                        <i class="el-icon-delete"></i>
-                      </span>
-                    </span>
-                  </div>
-                </el-upload>
-                <el-dialog v-model="dialogVisible">
-                  <img width="100%" :src="dialogImageUrl" alt="" />
-                </el-dialog>
-        </el-form-item>
-        <br />
-        <br />
-        <br />
-        <div style="text-align: right">
-          <el-button @click="closeDialog(0)">取消</el-button>
-          <el-button type="primary" @click="submitForm('formInfo')"
-            >确定</el-button
-          >
-        </div>
-      </el-form>
-    </el-dialog>
-  </transition>
+      <el-form-item label="现场照片:" prop="deviceNum">
+        <el-upload
+          :action="uploadUrl"
+          :on-success="handleUpAvatar"
+          :on-remove="handleRemove"
+          :show-file-list="true"
+          list-type="picture-card"
+          :limit="3"
+          :on-preview="handlePictureCardPreview"
+          :headers="{ accessToken: [accessToken] }"
+          v-if="itemInfo.handlingStatus != 1"
+        >
+          <i class="el-icon-plus"></i>
+        </el-upload>
+        <el-dialog title="查看图片" v-model="dialogVisible" width="400px">
+          <img
+            style="width: 100%"
+            :src="
+              itemInfo.handlingStatus == 1
+                ? fileImages + 'chart3-1.png'
+                : dialogImageUrl
+            "
+            alt=""
+          />
+        </el-dialog>
+        <img
+          @click="handlePictureCardPreview"
+          v-if="itemInfo.handlingStatus == 1"
+          style="width: 90px"
+          :src="fileImages + 'chart3-1.png'"
+          alt=""
+        />
+      </el-form-item>
+      <br />
+      <br />
+      <br />
+      <div style="text-align: right" v-if="itemInfo.handlingStatus != 1">
+        <el-button @click="closeDialog()">取消</el-button>
+        <el-button type="primary" @click="submitForm()">确定</el-button>
+      </div>
+    </el-form>
+  </el-dialog>
 </template>
 
 <script>
-export default {
-  name: "DialogComponent",
+import { useStore } from 'vuex'
+import { defineComponent, ref, watchEffect, reactive, toRefs } from 'vue'
+import * as api from '@/api/alarmManage/index'
+import { ElMessage } from 'element-plus'
+
+export default defineComponent({
+  name: 'DialogComponent',
+  emits: ['closeDialog', 'listSelect'],
   props: {
+    show_Dialog: Boolean,
     dialogTitle: {
       type: String,
-      default: "告警详情",
+      default: '告警详情',
     },
     itemInfo: {
       type: Object,
       default: function () {
-        return {};
+        return {}
       },
     },
   },
-  data() {
-    return {
-       disabled: false,
-      textarea: "请输入",
-      showDialog: false,
-      formInfo: JSON.parse(JSON.stringify(this.itemInfo)),
-      options: [
-        {
-          value: "选项1",
-          label: "站点一",
-        },
-        {
-          value: "选项2",
-          label: "站点二",
-        },
-        {
-          value: "选项3",
-          label: "站点三",
-        },
-        {
-          value: "选项4",
-          label: "站点四",
-        },
-        {
-          value: "选项5",
-          label: "站点五",
-        },
-      ],
+  setup(props, { emit }) {
+    const store = useStore()
+    const showDialog = ref(false)
+    const formInfo = ref(null)
+    const form = JSON.parse(JSON.stringify(props.itemInfo))
+    const textarea = ref('')
+    const dialogVisible = ref(false)
+    const accessToken = ref(store.state.user.accessToken)
+    const dialogImageUrl = ref('')
+    const fileImages = ref(window.PLATFROM_CONFIG.images)
+    const image = ref('')
 
-      rules: {
-      
-        handleCont: [
-          { required: true, message: "请输入处理内容", trigger: "blur" },
-          { trigger: "blur" },
-        ],
-        unloadImg: [
-          { required: true, message: "请上传图片", trigger: "blur" },
-          { trigger: "blur" },
-        ],
-      },
-    };
-  },
-  methods: {
+    const dataSet = reactive({
+      uploadUrl:
+        window.PLATFROM_CONFIG.baseUrl +
+        '/patrolInspectionDevice/pictureUpload',
+      fileList: [],
+    })
 
-     handleRemove(file) {
-      console.log(file);
-    },
-    handlePictureCardPreview(file) {
-      this.dialogImageUrl = file.url;
-      this.dialogVisible = true;
-    },
+    //删除照片
+    function handleRemove(res) {
+      Array.prototype.indexOf = function (val) {
+        for (var i = 0; i < this.length; i++) {
+          if (this[i] == val) return i
+        }
+        return -1
+      }
+      Array.prototype.remove = function (val) {
+        var index = this.indexOf(val)
+        if (index > -1) {
+          this.splice(index, 1)
+        }
+      }
+      dataSet.fileList.remove(res.name)
+    }
 
-    resetForm(formName) {
-      this.$refs[formName].resetFields();
-    },
+    const handleUpAvatar = (res, file) => {
+      // console.log(res, file)
+      file
+      image.value = res.data
+    }
+
+    const handlePictureCardPreview = (file) => {
+      dialogImageUrl.value = file.url
+      dialogVisible.value = true
+    }
 
+    const resetForm = () => {
+      formInfo.value.resetFields()
+    }
 
-    roleValid(rule, value, callback) {
+    const roleValid = (rule, value, callback) => {
       if (value.length === 0) {
-        callback(new Error("角色不能为空"));
+        callback(new Error('角色不能为空'))
       } else {
-        callback();
+        callback()
       }
-    },
+    }
 
     // onSelectedDrug(event) {
     //   this.siteList = event;
     //   console.log(this.siteList);
     // },
     // 保存操作
-    submitForm(formName) {
-      const params = Object.assign(this.formInfo, {});
-      console.log(params)
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          // 走保存请求
-          this.$message({
-            message: "操作成功!",
-            type: "success",
-          });
-          this.closeDialog(1);
-        } else {
-          return false;
-        }
-      });
-    },
+    const submitForm = () => {
+      api
+        .alarmPower({ id: props.itemInfo.id, handlingContent: textarea.value })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            ElMessage({
+              message: '操作成功!',
+              type: 'success',
+            })
+            closeDialog()
+            emit('listSelect')
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
     // 关闭弹框
-    closeDialog(flag) {
-      this.$refs["formInfo"].resetFields();
-      this.showDialog = false;
-      this.$emit("closeDialog", flag);
-    },
+    const closeDialog = () => {
+      showDialog.value = false
+      emit('closeDialog', false)
+    }
+
+    watchEffect((fn, options) => {
+      fn, options
+      showDialog.value = props.show_Dialog
+    })
+
+    return {
+      handleUpAvatar,
+      handleRemove,
+      handlePictureCardPreview,
+      resetForm,
+      roleValid,
+      submitForm,
+      closeDialog,
+
+      ...toRefs(dataSet),
+      accessToken,
+      dialogImageUrl,
+      fileImages,
+      image,
+      disabled: false,
+      dialogVisible,
+      textarea,
+      showDialog,
+      form,
+      formInfo,
+      options: [
+        {
+          value: '选项1',
+          label: '站点一',
+        },
+        {
+          value: '选项2',
+          label: '站点二',
+        },
+        {
+          value: '选项3',
+          label: '站点三',
+        },
+        {
+          value: '选项4',
+          label: '站点四',
+        },
+        {
+          value: '选项5',
+          label: '站点五',
+        },
+      ],
+    }
   },
-};
+})
 </script>
  
 <style scoped lang="scss">

+ 39 - 25
src/views/alarmManage/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container alarmingManage" v-if="this.pageShow">
+  <div class="app-container alarmingManage" v-if="pageShow">
     <!-- 筛选start -->
     <div class="filter-container mb-10">
       <div class="left">
@@ -29,6 +29,7 @@
               start-placeholder="开始日期"
               end-placeholder="结束日期"
               style="width: auto"
+              @change="listSelect()"
             ></el-date-picker>
           </div>
           <el-button class="search-button">重置</el-button>
@@ -63,7 +64,7 @@
               width:
                 (scope.row.totalGrade / allMaxData.totalNumMax) * 100 + '%',
             }"
-            @click="goAlarmTotal"
+            @click="goAlarmTotal(0)"
           >
             {{ scope.row.totalGrade }}
           </span>
@@ -78,7 +79,7 @@
               width:
                 (scope.row.oneGrade / allMaxData.oneAlarmingMax) * 100 + '%',
             }"
-            @click="goAlarmTotal"
+            @click="goAlarmTotal(1)"
           >
             {{ scope.row.oneGrade }}
           </span>
@@ -93,7 +94,7 @@
               width:
                 (scope.row.twoGrade / allMaxData.twoAlarmingMax) * 100 + '%',
             }"
-            @click="goAlarmTotal"
+            @click="goAlarmTotal(2)"
           >
             {{ scope.row.twoGrade }}
           </span>
@@ -108,7 +109,7 @@
             :style="{
               width: (scope.row.otherGrade / allMaxData.otherMax) * 100 + '%',
             }"
-            @click="goAlarmTotal"
+            @click="goAlarmTotal(3)"
           >
             {{ scope.row.otherGrade }}
           </span>
@@ -135,7 +136,12 @@
     <!-- {{ totalNumMax }}
       {{ oneAlarmingMax }} -->
   </div>
-  <alarm-total v-else :pageShow="pageShow" @func="getMsgFormSon"></alarm-total>
+  <alarm-total
+    v-else
+    :pageShow="pageShow"
+    @func="goAlarmTotal"
+    :alarmGradeList="alarmGradeList"
+  ></alarm-total>
 </template>
 
 <script>
@@ -153,27 +159,27 @@ export default defineComponent({
     const router = useRouter()
 
     const pageShow = ref(true)
-    const dateValue = ref([
-      new Date(2021, 10, 10, 10, 10),
-      new Date(2021, 10, 11, 10, 10),
-    ])
+    const alarmGradeList = ref({})
+    const dateValue = ref([new Date(2020, 10, 10, 10, 10), new Date()])
 
-    const total = ref(400)
+    const total = ref(0)
     const pageSize = ref(15)
     const currentPage = ref(1)
     const tableData = ref([])
 
     //查询
     function listSelect() {
+      store.commit('TimeAll_function', dateValue.value)
       api
         .alarmGradeCount({
+          startTime: store.state.Time_Data[0],
+          endTime: store.state.Time_Data[1],
           siteId: store.state.siteId,
           size: pageSize.value,
           current: currentPage.value,
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
-            console.log(requset.data.records)
             total.value = requset.data.total
             tableData.value = requset.data.records
           } else {
@@ -188,14 +194,6 @@ export default defineComponent({
       console.log(row)
     }
 
-    const handleSizeChange = (val) => {
-      console.log(`每页 ${val} 条`)
-    }
-
-    const handleCurrentChange = (val) => {
-      console.log(`当前页: ${val}`)
-    }
-
     const goVariableList = () => {
       // 跳转至订单列表页面传参
       router.push({
@@ -204,17 +202,33 @@ export default defineComponent({
       // this.$router.push({ name:'variableList'})
     }
 
-    const getMsgFormSon = () => {
-      pageShow.value = !pageShow.value
-    }
-    const goAlarmTotal = () => {
+    const goAlarmTotal = (val) => {
       pageShow.value = !pageShow.value
+      store.commit('TimeAll_function', dateValue.value)
+      if (val != undefined) {
+        alarmGradeList.value = {
+          startTime: store.state.Time_Data[0],
+          endTime: store.state.Time_Data[1],
+          type: val,
+        }
+      }
     }
 
     onMounted(() => {
       listSelect()
     })
 
+    //条数
+    const handleSizeChange = (val) => {
+      pageSize.value = val
+      listSelect()
+    }
+    //页数
+    const handleCurrentChange = (val) => {
+      currentPage.value = val
+      listSelect()
+    }
+
     const allMaxData = computed(() => {
       var allMaxData = {}
 
@@ -263,7 +277,6 @@ export default defineComponent({
       cellStyle,
       handleClick,
       goAlarmTotal,
-      getMsgFormSon,
       listSelect,
 
       store,
@@ -274,6 +287,7 @@ export default defineComponent({
       pageSize,
       currentPage,
       tableData,
+      alarmGradeList,
 
       showDialog: false,
       tabPosition: 'one',

+ 147 - 75
src/views/deviceManage/powerEquip/communicateEquip/dialog/cloneDialog.vue

@@ -8,34 +8,54 @@
     @open="open"
   >
     <div class="dialogOne">
-      <div>
-        克隆设备对象:
-        <span>{{ DialogArray.deviceCode }}</span>
-      </div>
-      <div class="content">
-        <span>*</span>
-        变量克隆至:
-        <el-radio v-model="cloneRadio" label="1">新设备</el-radio>
-        <el-radio v-model="cloneRadio" label="2">已有设备</el-radio>
-      </div>
-      <div class="content">
-        <span>*</span>
-        设备名:
-        <el-input
-          class="inputer"
-          v-model="cloneInputName"
-          placeholder="请输入设备名"
-          clearable
-        />
-        设备编号:
-        <el-input
-          class="inputer"
-          v-model="cloneInputCode"
-          placeholder="请输入设备编号"
-          clearable
-        />
-      </div>
-      <div class="content">
+      <el-form
+        :model="form"
+        :rules="rules"
+        ref="ruleForm"
+        label-width="150px"
+        class="demo-ruleForm"
+      >
+        <el-form-item label="克隆设备对象:" prop="deviceCode">
+          <span>{{ DialogArray.deviceCode }}</span>
+        </el-form-item>
+        <el-form-item label="变量克隆至:" prop="cloneRadio">
+          <el-radio-group v-model="form.type" size="medium">
+            <el-radio :label="1">新设备</el-radio>
+            <el-radio :label="2">已有设备</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item
+          label="设备名:"
+          prop="cloneInputName"
+          v-if="form.type == 1"
+        >
+          <el-input
+            v-model="form.cloneInputName"
+            placeholder="请输入设备名"
+            clearable
+          />
+        </el-form-item>
+        <el-form-item
+          label="设备编号:"
+          prop="cloneInputCode"
+          v-if="form.type == 1"
+        >
+          <el-input
+            v-model="form.cloneInputCode"
+            placeholder="请输入设备编号"
+            clearable
+          />
+        </el-form-item>
+        <el-form-item label="选择设备:" v-if="form.type != 1">
+          <el-select
+            v-model="from.oldDeviceCode"
+            placeholder="请选择所需克隆设备(可输入)"
+          >
+            <el-option label="区域一" value="shanghai"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <!-- <div class="content">
         <span>*</span>
         模拟量:
         <el-input
@@ -51,17 +71,17 @@
           placeholder="请输入状态量"
           clearable
         />
-      </div>
+      </div> -->
     </div>
     <template #footer>
       <span class="dialog-footer">
-        <el-checkbox
+        <!-- <el-checkbox
           v-model="cloneChecked"
           label="连续克隆模式"
           style="margin-right: 10px"
-        ></el-checkbox>
+        ></el-checkbox> -->
         <el-button @click="cloneDialog = false">取消</el-button>
-        <el-button type="primary" @click="cloneDialog = false">确定</el-button>
+        <el-button type="primary" @click="clone()">确定</el-button>
       </span>
     </template>
   </el-dialog>
@@ -69,8 +89,8 @@
 
 <script>
 import { useStore } from 'vuex'
-import { defineComponent, onMounted, ref, watchEffect } from 'vue'
-import * as api from '@/api/deviceManage/powerEquip/deviceAttribute'
+import { defineComponent, ref, watchEffect } from 'vue'
+import * as api from '@/api/deviceManage/powerEquip/communicateEquip'
 import { ElMessage } from 'element-plus'
 
 export default defineComponent({
@@ -83,19 +103,58 @@ export default defineComponent({
   },
   setup(props, context) {
     const store = useStore()
-    store, api, ElMessage
+    store
+
+    const form = ref({
+      type: 1,
+      cloneInputName: '',
+      cloneInputCode: '',
+      oldDeviceCode: '',
+    })
 
     const cloneDialog = ref(false) //克隆弹窗控制
     const cloneChecked = ref(false) //克隆复选框控制
-    const cloneRadio = ref('1') //克隆单选框控制
-    const cloneInputName = ref('') //克隆input名
-    const cloneInputCode = ref('') //克隆input编号
     const cloneInputModel = ref('') //克隆input模拟量
     const cloneInputState = ref('') //克隆input状态量
+    const ruleForm = ref(null)
+    const deviceList = ref([])
+
+    const clone = () => {
+      let list = {}
+      if (form.value.cloneInputCode == 1) {
+        list = {
+          type: form.value.type,
+          newDeviceCode: form.value.cloneInputCode,
+          deviceName: form.value.cloneInputName,
+        }
+      } else {
+        list = {
+          type: form.value.type,
+          oldDeviceCode: form.value.oldDeviceCode,
+        }
+      }
+      ruleForm.value.validate((valid) => {
+        if (valid) {
+          api.variableCloning(list).then((requset) => {
+            if (requset.status === 'SUCCESS') {
+              ElMessage.success({
+                message: '克隆成功',
+                type: 'success',
+              })
+            } else {
+              ElMessage.error(requset.msg)
+            }
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    }
 
-    // open(): Dialog弹窗打开之前做的事
+    //open
     const open = () => {
-      console.log('')
+      select_deviceList()
     }
 
     // close(): Dialog弹窗关闭之后做的事
@@ -104,53 +163,66 @@ export default defineComponent({
       cloneDialog.value = false
     }
 
+    function select_deviceList() {
+      api
+        .deviceList({
+          siteId: 0,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            console.log(requset.data)
+            // deviceList.value =
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
     watchEffect((fn, options) => {
       fn, options
       cloneDialog.value = props.clone_Dialog
     })
 
-    onMounted(() => {
-      console.log('')
-    })
-
     return {
       open,
       close,
+      clone,
+      form,
+      deviceList,
       cloneDialog,
       cloneChecked,
-      cloneRadio,
-      cloneInputName,
-      cloneInputCode,
       cloneInputModel,
       cloneInputState,
+      ruleForm,
+      rules: {
+        cloneInputCode: [
+          {
+            required: true,
+            message: '设备名不能为空',
+            trigger: 'blur',
+          },
+          {
+            min: 5,
+            max: 25,
+            message: '设备名长度不能小于5大于25',
+            trigger: 'blur',
+          },
+        ],
+        cloneInputName: [
+          {
+            required: true,
+            message: '设备编号不能为空',
+            trigger: 'blur',
+          },
+          {
+            min: 5,
+            max: 25,
+            message: '设备编号长度不能小于5大于25',
+            trigger: 'blur',
+          },
+        ],
+      },
     }
   },
 })
-</script>
-
-<style lang="scss" scoped>
-//弹出框内容样式
-.dialogOne {
-  div:nth-child(1) {
-    margin-bottom: 30px;
-  }
-  .content {
-    margin-bottom: 20px;
-    span:nth-child(1) {
-      color: red;
-    }
-    .inputer {
-      width: 150px;
-    }
-  }
-}
-.listPagination {
-  margin-top: 15px;
-  margin-bottom: -30px;
-  float: right;
-}
-.listPagination1 {
-  margin-top: 15px;
-  float: right;
-}
-</style>
+</script>

+ 31 - 12
src/views/deviceManage/powerEquip/communicateEquip/index.vue

@@ -6,6 +6,7 @@
           placeholder="搜索设备或编号"
           v-model="filterText"
           class="comTopLeftInput"
+          @input="Select()"
         >
           <template #suffix>
             <i class="el-icon-search el-input__icon"></i>
@@ -23,26 +24,18 @@
 
       <div class="comRight">
         <el-button type="primary">导入</el-button>
-        <el-button type="primary">导出</el-button>
+        <el-button type="primary" @click="DataReportExport()">导出</el-button>
       </div>
     </div>
 
     <div class="comContent">
       <el-table
-        :data="
-          tableData.filter(
-            (data) =>
-              !filterText ||
-              data.deviceName
-                .toLowerCase()
-                .includes(filterText.toLowerCase()) ||
-              data.deviceCode.toLowerCase().includes(filterText.toLowerCase())
-          )
-        "
+        :data="tableData"
         border
         stripe
         :header-cell-style="headClass"
         :height="Height"
+        v-loading="loading"
       >
         <el-table-column
           prop="deviceStatus"
@@ -75,7 +68,7 @@
           width=""
         ></el-table-column>
         <el-table-column
-          prop="siteId"
+          prop="siteName"
           label="所属站点"
           align="center"
           width=""
@@ -199,10 +192,30 @@ export default defineComponent({
     const dialogBool = ref(false)
     const dialogTitle = ref('')
     const dataList = ref({})
+    const loading = ref(true)
 
     const cloneDialogBool = ref(false)
     const DialogArray = ref([])
 
+    //导出
+    const DataReportExport = () => {
+      api
+        .deviceExport({
+          deviceName: filterText.value,
+        })
+        .then((requset) => {
+          if (requset.status === 'SUCCESS') {
+            window.location.href = window.PLATFROM_CONFIG.fileUrl + requset.data
+            ElMessage.success({
+              message: '导出成功',
+              type: 'success',
+            })
+          } else {
+            ElMessage.error(requset.msg)
+          }
+        })
+    }
+
     //克隆
     const clone = (row) => {
       DialogArray.value = row
@@ -215,15 +228,18 @@ export default defineComponent({
 
     //查询
     function Select() {
+      loading.value = true
       api
         .correspondDeviceList({
           size: pageSize.value,
           current: currentPage.value,
+          deviceName: filterText.value,
         })
         .then((requset) => {
           if (requset.status === 'SUCCESS') {
             total.value = requset.data.total
             tableData.value = requset.data.records
+            loading.value = false
           } else {
             ElMessage.error(requset.msg)
           }
@@ -310,9 +326,11 @@ export default defineComponent({
 
       clone, //克隆按钮事件
       closeNo, //克隆弹窗关闭事件
+      DataReportExport, //导出
       Insert,
       Update,
       Delete,
+      Select,
       confirmEvent,
       cancelEvent,
       showValue,
@@ -330,6 +348,7 @@ export default defineComponent({
       dialogBool,
       dialogTitle,
       dataList,
+      loading,
     }
   },
 })

+ 0 - 1
src/views/deviceManage/powerEquip/index.vue

@@ -246,7 +246,6 @@ export default defineComponent({
           if (requset.status === 'SUCCESS') {
             tableData.value = requset.data.records
             total.value = requset.data.total
-            store.state.siteList = tableData
           } else {
             ElMessage.error(requset.msg)
           }

+ 6 - 4
src/views/powerQuality/harmonicReport/index.vue

@@ -76,7 +76,9 @@
             </el-button> -->
           </div>
 
-          <el-button type="primary" class="search-button">搜索</el-button>
+          <el-button type="primary" class="search-button" @click="listSelect()">
+            搜索
+          </el-button>
         </div>
       </div>
     </div>
@@ -175,14 +177,14 @@ export default defineComponent({
         list = {
           deviceCode: deviceCode.value,
           startTime: store.state.dateList + ' ' + '00:00:00',
-          endTime: store.state.dateList + ' ' + '24:00:00',
+          endTime: store.state.dateList + ' ' + '23:59:59',
         }
       } else {
         store.commit('getCurrentMonthLast', dateTime.value)
         list = {
           deviceCode: deviceCode.value,
-          startTime: store.state.monthList[0],
-          endTime: store.state.monthList[1],
+          startTime: store.state.monthList[0] + ' ' + '00:00:00',
+          endTime: store.state.monthList[1] + ' ' + '23:59:59',
         }
       }
 

+ 90 - 86
src/views/siteManage/basicInfo/index.vue

@@ -65,15 +65,15 @@
             </el-form-item>
 
             <el-form-item label="所属台区:" prop="stationAreaId">
-             <el-select v-model="ruleForm.stationAreaId" placeholder="请选择">
-              <el-option
-                v-for="(item, index) in platFormData"
-                :key="index"
-                :label="item.platformAreaName"
-                :value="item.id"
-              ></el-option>
-            </el-select>
-          </el-form-item>
+              <el-select v-model="ruleForm.stationAreaId" placeholder="请选择">
+                <el-option
+                  v-for="(item, index) in platFormData"
+                  :key="index"
+                  :label="item.platformAreaName"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
 
             <el-form-item label="站点坐标:" prop="longitude">
               <el-input v-model="ruleForm.longitude" placeholder="请输入经度">
@@ -115,7 +115,7 @@
             <el-input v-model="ruleForm.rheologicalChange"></el-input>
           </el-form-item>
           <el-form-item label="所属线路" prop="routeId">
-             <el-select v-model="ruleForm.routeId" placeholder="请选择">
+            <el-select v-model="ruleForm.routeId" placeholder="请选择">
               <el-option
                 v-for="(item, index) in dropData"
                 :key="index"
@@ -244,8 +244,7 @@ export default defineComponent({
     const dialogImageUrl = ref('')
     const dialogVisible = ref(false)
     const disabled = ref(false)
-    const accessToken = ref('eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjI5ZTdlODM2LTFjMDAtNGRmYS1iMjRmLTg1NzU2MGZkNDlhMSJ9.Uu__ruYZVzmXzbtplcwdNXnI4rPkIthljy4ymfor9k3rhRzr27wJBMs9YLlJyODzYeSEEfQIGf-2sF0etsawiA'
-    )
+    const accessToken = ref(store.state.user.accessToken)
     const dropData = ref([])
     const dropData2 = ref([])
     const platFormData = ref([])
@@ -262,12 +261,12 @@ export default defineComponent({
       longitude: '',
       latitude: '',
       region: '1',
-      stationAreaId:'',
+      stationAreaId: '',
 
       demolitionStandardCoal1: '',
       demolitionStandardCoal: '1',
-      rheologicalChange:'',
-      routeId:'',
+      rheologicalChange: '',
+      routeId: '',
 
       faultStatus: '',
       realTimeLoad: '',
@@ -279,9 +278,9 @@ export default defineComponent({
       spareUserName: '',
       sparePhone: '',
 
-      sitePictureOne:'',
-      sitePictureTwo:'',
-      sitePictureThree:''
+      sitePictureOne: '',
+      sitePictureTwo: '',
+      sitePictureThree: '',
     })
 
     function handlePictureCardPreview(file) {
@@ -293,7 +292,8 @@ export default defineComponent({
 
     const dataSet = reactive({
       uploadUrl:
-        'http://172.16.1.196:8010/patrolInspectionDevice/pictureUpload',
+        window.PLATFROM_CONFIG.baseUrl +
+        '/patrolInspectionDevice/pictureUpload',
       // uploadUrl:'https://wx.ewoogi.com/USKYOF/USKYOF.php/Home/MonitoringReporting/setUpload',
       fileList: [],
     })
@@ -329,12 +329,20 @@ export default defineComponent({
 
     //表单提交
     function submitForm() {
-      ruleForm.value.sitePictureOne =  dataSet.fileList[0]
-      ruleForm.value.sitePictureTwo =  dataSet.fileList[1]
-      ruleForm.value.sitePictureThree =  dataSet.fileList[2]
-     
-      ruleForm.value.operationTime?ruleForm.value.operationTime = parseTime(ruleForm.value.operationTime):''
-      ruleForm.value.serviceDeadline?ruleForm.value.serviceDeadline = parseTime(ruleForm.value.serviceDeadline):''
+      ruleForm.value.sitePictureOne = dataSet.fileList[0]
+      ruleForm.value.sitePictureTwo = dataSet.fileList[1]
+      ruleForm.value.sitePictureThree = dataSet.fileList[2]
+
+      ruleForm.value.operationTime
+        ? (ruleForm.value.operationTime = parseTime(
+            ruleForm.value.operationTime
+          ))
+        : ''
+      ruleForm.value.serviceDeadline
+        ? (ruleForm.value.serviceDeadline = parseTime(
+            ruleForm.value.serviceDeadline
+          ))
+        : ''
 
       formInfo.value.validate((valid) => {
         if (valid) {
@@ -344,63 +352,63 @@ export default defineComponent({
           // ruleForm.value.operationTime = time[0]
           // ruleForm.value.serviceDeadline = time[1]
 
-          api.siteAdd(
-            {
-              site:{
-                "siteName":ruleForm.value.siteName,
-                "installedCapacity":ruleForm.value.installedCapacity,
-                "siteAddress":ruleForm.value.siteAddress,
-                "region":ruleForm.value.region,  
-                "stationAreaId":ruleForm.value.stationAreaId,
-                "longitude":ruleForm.value.longitude,
-                "latitude":ruleForm.value.latitude,
-                "userName":ruleForm.value.userName,
-                "phone":ruleForm.value.phone,
-                "spareUserName":ruleForm.value.spareUserName,
-                "sparePhone":ruleForm.value.sparePhone,
-                "rheologicalChange":ruleForm.value.rheologicalChange,
-                "routeId":ruleForm.value.routeId,
-                "groupingId":'1'   //字段值待写活
+          api
+            .siteAdd({
+              site: {
+                siteName: ruleForm.value.siteName,
+                installedCapacity: ruleForm.value.installedCapacity,
+                siteAddress: ruleForm.value.siteAddress,
+                region: ruleForm.value.region,
+                stationAreaId: ruleForm.value.stationAreaId,
+                longitude: ruleForm.value.longitude,
+                latitude: ruleForm.value.latitude,
+                userName: ruleForm.value.userName,
+                phone: ruleForm.value.phone,
+                spareUserName: ruleForm.value.spareUserName,
+                sparePhone: ruleForm.value.sparePhone,
+                rheologicalChange: ruleForm.value.rheologicalChange,
+                routeId: ruleForm.value.routeId,
+                groupingId: '1', //字段值待写活
+              },
+              siteDynamicProperties: {
+                siteType: ruleForm.value.siteType,
+                userCompany: ruleForm.value.userCompany,
+                operationTime: ruleForm.value.operationTime,
+                serviceDeadline: ruleForm.value.serviceDeadline,
+                powerSupplyType: ruleForm.value.powerSupplyType,
+                voltageLevel: ruleForm.value.voltageLevel,
+                demolitionStandardCoal: ruleForm.value.demolitionStandardCoal,
+                demolitionStandardCoal1: ruleForm.value.demolitionStandardCoal1,
+                faultStatus: ruleForm.value.faultStatus,
+                realTimeLoad: ruleForm.value.realTimeLoad,
+                totalElectricity: ruleForm.value.totalElectricity,
+                powerFactor: ruleForm.value.powerFactor,
+                sitePictureOne: ruleForm.value.sitePictureOne,
+                sitePictureTwo: ruleForm.value.sitePictureTwo,
+                sitePictureThree: ruleForm.value.sitePictureThree,
+              },
+            })
+            .then((requset) => {
+              if (requset.status === 'SUCCESS') {
+                ElMessage.success({
+                  message: '新增成功',
+                  type: 'success',
+                })
+                // if (props.dialogTitle === '新增') {
+                //   ElMessage.success({
+                //     message: '新增成功',
+                //     type: 'success',
+                //   })
+                // } else {
+                //   ElMessage.success({
+                //     message: '修改成功',
+                //     type: 'success',
+                //   })
+                // }
+              } else {
+                ElMessage.error(requset.msg)
               }
-              ,
-              siteDynamicProperties:{
-                "siteType":ruleForm.value.siteType,
-                "userCompany":ruleForm.value.userCompany,
-                "operationTime":ruleForm.value.operationTime,
-                "serviceDeadline":ruleForm.value.serviceDeadline,
-                "powerSupplyType":ruleForm.value.powerSupplyType,
-                "voltageLevel":ruleForm.value.voltageLevel,
-                "demolitionStandardCoal":ruleForm.value.demolitionStandardCoal,
-                "demolitionStandardCoal1":ruleForm.value.demolitionStandardCoal1,
-                "faultStatus":ruleForm.value.faultStatus,
-                "realTimeLoad":ruleForm.value.realTimeLoad,
-                "totalElectricity":ruleForm.value.totalElectricity,
-                "powerFactor":ruleForm.value.powerFactor,
-                "sitePictureOne":ruleForm.value.sitePictureOne,
-                "sitePictureTwo":ruleForm.value.sitePictureTwo,
-                "sitePictureThree":ruleForm.value.sitePictureThree,
-              }
-            }).then((requset) => {
-            if (requset.status === 'SUCCESS') {
-              ElMessage.success({
-                message: '新增成功',
-                type: 'success',
-              })
-              // if (props.dialogTitle === '新增') {
-              //   ElMessage.success({
-              //     message: '新增成功',
-              //     type: 'success',
-              //   })
-              // } else {
-              //   ElMessage.success({
-              //     message: '修改成功',
-              //     type: 'success',
-              //   })
-              // }
-            } else {
-              ElMessage.error(requset.msg)
-            }
-          })
+            })
         } else {
           console.log('error submit!!')
           return false
@@ -451,10 +459,6 @@ export default defineComponent({
       })
     }
 
-
-
-
-
     onMounted(() => {
       platformList()
       dynamicPropertiesDroplist(2)
@@ -523,7 +527,7 @@ export default defineComponent({
             trigger: 'blur',
           },
         ],
-        stationAreaId:[
+        stationAreaId: [
           { required: true, message: '请选择所属台区', trigger: 'change' },
         ],
         longitude: [{ required: true, message: '请输入经度', trigger: 'blur' }],