jiangping
2024-02-29 6b6f00cae647a1dae999a4a1a3b87512f16c76f6
admin/src/views/business/device.vue
@@ -37,16 +37,16 @@
                        <span v-if="row.status === 1">启用</span>
                    </template>
                </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.operaDeviceWindow.open('编辑设备信息表', row)" icon="el-icon-edit" v-permissions="['business:company:update']">编辑</el-button>
                    </template>
                </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.operaDeviceWindow.open('编辑设备信息表', row)" icon="el-icon-edit" v-permissions="['business:company:update']">编辑</el-button>-->
<!--                    </template>-->
<!--                </el-table-column>-->
            </el-table>
            <pagination
                @size-change="handleSizeChange"
@@ -66,6 +66,7 @@
import Pagination from '@/components/common/Pagination'
import OperaDeviceWindow from '@/components/business/OperaDeviceWindow'
import { syncDevices } from '@/api/business/device'
import { memberSync } from '@/api/business/member'
export default {
  name: 'Device',
  extends: BaseTable,
@@ -91,22 +92,22 @@
  },
  methods: {
    synchronousData () {
      this.$confirm('确认同步吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        syncDevices({})
          .then(res => {
            this.$message({
              type: 'success',
              message: '同步成功'
      this.$dialog.actionConfirm('操作确认提醒', '您确认同步全部信息吗?')
        .then(() => {
          this.isWorking.delete = true
          syncDevices({})
            .then(res => {
              this.$tip.apiSuccess(res || '同步成功')
              this.search()
            })
            this.search()
          })
      }).catch(() => {
      })
            .catch(e => {
              this.$tip.apiFailed(e)
            })
            .finally(() => {
              this.isWorking.delete = false
            })
        })
        .catch(() => {})
    }
  }
}