jiangping
2024-08-19 83b658e79f3494b67158a1485a848fc77727d1c7
admin/src/views/platform/platform.vue
@@ -25,21 +25,40 @@
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="name" label="月台名称" min-width="100px"></el-table-column>
        <el-table-column prop="hkId" label="月台编码" min-width="100px"></el-table-column>
        <el-table-column prop="groupName" label="所属月台组" min-width="100px"></el-table-column>
        <el-table-column prop="workingNum" label="同时叫号车辆数" min-width="100px"></el-table-column>
        <el-table-column prop="alermTime" label="停留超时报警时间(分钟)" min-width="100px">
          <template scope="{row}">{{row.alermTime?(row.alermTime/60):'-'}}</template>
        <el-table-column prop="name" label="月台名称" fixed min-width="100px"></el-table-column>
        <el-table-column prop="code" label="月台编码" fixed min-width="100px"></el-table-column>
        <el-table-column prop="groupName" label="所属月台组" fixed min-width="100px"></el-table-column>
        <el-table-column prop="workingNum" label="同时叫号车辆数" min-width="120px"></el-table-column>
        <el-table-column prop="stayTmeoutAlermTime" label="停留超时报警时间(分钟)" min-width="180px">
          <template scope="{row}">{{row.stayTmeoutAlermTime?(row.stayTmeoutAlermTime):'-'}}</template>
        </el-table-column>
        <el-table-column prop="waitCallTime" label="作业超时报警时间(分钟)" min-width="100px">
          <template scope="{row}"> {{row.waitCallTime?(row.alermTime/60):'-'}}</template>
        <el-table-column prop="workTimeoutAlermTime" label="作业超时报警时间(分钟)" min-width="180px">
          <template scope="{row}"> {{row.workTimeoutAlermTime?(row.workTimeoutAlermTime):'-'}}</template>
        </el-table-column>
        <el-table-column prop="workRate" label="月台作业效率(万只/小时)" min-width="100px"></el-table-column>
        <el-table-column prop="status" label="状态" min-width="100px"></el-table-column>
        <el-table-column prop="broadcastName" label="关联广播" min-width="100px"></el-table-column>
        <el-table-column prop="ledName" label="关联LED" min-width="100px"></el-table-column>
        <el-table-column prop="hkDate" label="同步时间" min-width="100px"></el-table-column>
        <el-table-column prop="workRate" label="月台作业效率(万只/小时)" min-width="180px"></el-table-column>
          <el-table-column label="是否园区入口">
            <template slot-scope="{row}">
              <el-switch
                  @change="changeStatus($event, row)"
                  v-model="row.status"
                  active-color="#13ce66"
                  inactive-color="#ff4949"
                  :active-value="0"
                  :inactive-value="1">
              </el-switch>
            </template>
          </el-table-column>
        <el-table-column prop="platformStatus" label="月台状态" min-width="100px">
          <template scope="{row}">
            <span v-if="row.platformStatus == 0">无车</span>
            <span v-if="row.platformStatus == 1">有车</span>
            <span v-if="row.platformStatus == 2">超时停靠</span>
            <span v-if="row.platformStatus == 3">错误停靠</span>
          </template>
        </el-table-column>
        <el-table-column prop="broadcastNames" label="关联广播" min-width="100px"></el-table-column>
        <el-table-column prop="ledNames" label="关联LED" min-width="100px"></el-table-column>
        <el-table-column prop="hkDate" label="同步时间" min-width="140px"></el-table-column>
        <el-table-column
          v-if="containPermissions(['business:platform:update', 'business:platform:delete'])"
          label="操作"
@@ -70,8 +89,6 @@
import SearchFormCollapse from '@/components/common/SearchFormCollapse'
import Pagination from '@/components/common/Pagination'
import OperaPlatformWindow from '@/components/business/OperaPlatformWindow'
import { syncDevices, updateEntranceById } from '@/api/business/device'
import { syncPlatforms } from '@/api/platform/platform'
export default {
  name: 'Platform',
  extends: BaseTable,
@@ -96,10 +113,10 @@
    this.search()
  },
  methods: {
    changeManufature (e, row) {
      updateEntranceById({
    changeStatus (e, row) {
      this.api.updateStatusById({
        id: row.id,
        isEntrance: e
        status: e
      })
    },
    syncData () {
@@ -124,7 +141,7 @@
      this.$dialog.actionConfirm('操作确认提醒', '您确认同步全部信息吗?')
        .then(() => {
          this.isWorking.working = true
          this.api.syncPlatforms({})
          this.api.syncPlatformStatus({})
            .then(res => {
              this.$tip.apiSuccess(res || '同步成功')
              this.search()