|
|
@@ -56,7 +56,7 @@
|
|
|
</template>
|
|
|
<template v-if="column.key === 'action'">
|
|
|
<a-space>
|
|
|
- <a>查看</a>
|
|
|
+ <a @click="goDetailPage(record.id)">查看</a>
|
|
|
<a>调试</a>
|
|
|
<a>冻结</a>
|
|
|
<a-popconfirm
|
|
|
@@ -118,8 +118,10 @@ import { DeviceContriller, ModelController } from '@/controller/index'
|
|
|
import { onMounted, reactive } from 'vue'
|
|
|
import { Form, message } from 'ant-design-vue'
|
|
|
import { DeviceAuthTypeEnum } from '@/enum/common'
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
|
|
|
const useForm = Form.useForm
|
|
|
+const router = useRouter()
|
|
|
|
|
|
const columns = [
|
|
|
|
|
|
@@ -212,6 +214,10 @@ const { resetFields: resetFieldsDevice, validate: validateDevice, validateInfos:
|
|
|
deviceCode: [{ required: true, message: '请填写设备码' }]
|
|
|
}))
|
|
|
|
|
|
+const goDetailPage = (id: string) => {
|
|
|
+ router.push({ path: '/device/detail', query: { id } })
|
|
|
+}
|
|
|
+
|
|
|
const delDevice = async (id: string) => {
|
|
|
await DeviceContriller.del(id)
|
|
|
getDevicePage()
|
|
|
@@ -222,9 +228,12 @@ const ok = () => {
|
|
|
message.warn('两次密匙输入不同')
|
|
|
return
|
|
|
}
|
|
|
- validateDevice().then(async () => {
|
|
|
+ validateDevice().then(async (r) => {
|
|
|
+ console.log('validateDevice:', r)
|
|
|
+
|
|
|
await DeviceContriller.post(deviceState)
|
|
|
state.visible = false
|
|
|
+ getDevicePage()
|
|
|
})
|
|
|
}
|
|
|
|