jiangping
2024-10-14 2079ba28f20bde46f7736699c97abf0e1564770d
admin/src/views/business/deviceLed.vue
@@ -2,7 +2,7 @@
    <TableLayout :permissions="['business:device:query']">
        <!-- 搜索表单 -->
        <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
            <el-form-item label="名称" prop="name">
            <el-form-item title="名称" prop="name">
                <el-input v-model="searchForm.name" placeholder="请输入名称" @keypress.enter.native="search"></el-input>
            </el-form-item>
            <section>
@@ -32,6 +32,16 @@
                </el-table-column>
                <el-table-column prop="ip" label="设备ip"></el-table-column>
                <el-table-column prop="port" label="设备端口"></el-table-column>
              <el-table-column
                  v-if="containPermissions(['business:device:update' ])"
                  label="操作"
                  min-width="120"
                  fixed="right"
              >
                <template slot-scope="{row}">
                  <el-button type="text" @click="$refs.OperaDeviceLedWindow.open('设置屏显内容', row)" icon="el-icon-edit" v-permissions="['business:device:update']">设置屏显内容</el-button>
                </template>
              </el-table-column>
            </el-table>
            <pagination
                @size-change="handleSizeChange"
@@ -41,7 +51,7 @@
            </pagination>
        </template>
        <!-- 新建/修改 -->
<!--        <OperaDeviceWindow ref="operaDeviceWindow" @success="handlePageChange"/>-->
        <OperaDeviceLedWindow ref="OperaDeviceLedWindow" @success="handlePageChange"/>
    </TableLayout>
</template>
@@ -49,12 +59,12 @@
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaDeviceWindow from '@/components/business/OperaDeviceWindow'
import OperaDeviceLedWindow from '@/components/business/OperaDeviceLedWindow'
import { syncDevices, updateEntranceById } from '@/api/business/device'
export default {
  name: 'Device',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaDeviceWindow },
  components: { TableLayout, Pagination, OperaDeviceLedWindow },
  data () {
    return {
      // 搜索