|
@@ -102,7 +102,7 @@
|
|
|
<el-row type="flex" :gutter="10" justify="space-between">
|
|
<el-row type="flex" :gutter="10" justify="space-between">
|
|
|
<el-col :span="16" style="text-align: left">
|
|
<el-col :span="16" style="text-align: left">
|
|
|
<el-link
|
|
<el-link
|
|
|
- type=""
|
|
|
|
|
|
|
+
|
|
|
:underline="false"
|
|
:underline="false"
|
|
|
style="font-weight: bold; font-size: 16px; line-height: 32px"
|
|
style="font-weight: bold; font-size: 16px; line-height: 32px"
|
|
|
@click="handleDeviceDetail(item)"
|
|
@click="handleDeviceDetail(item)"
|
|
@@ -387,6 +387,8 @@ import { download } from '@/config/axios/service'
|
|
|
import productSvg from '@/assets/imgs/product.svg'
|
|
import productSvg from '@/assets/imgs/product.svg'
|
|
|
import videoSvg from '@/assets/imgs/video.svg'
|
|
import videoSvg from '@/assets/imgs/video.svg'
|
|
|
import gatewaySvg from '@/assets/imgs/gateway.svg'
|
|
import gatewaySvg from '@/assets/imgs/gateway.svg'
|
|
|
|
|
+import { getDicts } from '@/api/pms/video/dicts'
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
|
|
@@ -400,7 +402,7 @@ const router = useRouter()
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
|
|
|
|
|
// 字典定义
|
|
// 字典定义
|
|
|
-const iot_product_status = []
|
|
|
|
|
|
|
+const iot_product_status = ref([])
|
|
|
const iot_device_type = []
|
|
const iot_device_type = []
|
|
|
const iot_network_method = []
|
|
const iot_network_method = []
|
|
|
const iot_vertificate_method = []
|
|
const iot_vertificate_method = []
|
|
@@ -460,7 +462,7 @@ function handleFileUploadProgress(event, file, fileList) {
|
|
|
function getList() {
|
|
function getList() {
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
listProduct(queryParams).then((response) => {
|
|
listProduct(queryParams).then((response) => {
|
|
|
- console.log(response)
|
|
|
|
|
|
|
+
|
|
|
productList.value = response.list
|
|
productList.value = response.list
|
|
|
total.value = response.total
|
|
total.value = response.total
|
|
|
loading.value = false
|
|
loading.value = false
|
|
@@ -509,10 +511,12 @@ async function handleChangeProductStatus(productId, status, deviceType) {
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- let data = {}
|
|
|
|
|
- data.productId = productId
|
|
|
|
|
- data.status = status
|
|
|
|
|
- data.deviceType = deviceType
|
|
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ productId,
|
|
|
|
|
+ status,
|
|
|
|
|
+ deviceType
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
changeProductStatus(data)
|
|
changeProductStatus(data)
|
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
getList()
|
|
getList()
|
|
@@ -567,15 +571,18 @@ function handleDelete(row) {
|
|
|
.then(function () {
|
|
.then(function () {
|
|
|
// 删除SIP配置
|
|
// 删除SIP配置
|
|
|
delSipconfigByProductId(productIds).then((response) => {})
|
|
delSipconfigByProductId(productIds).then((response) => {})
|
|
|
- return delProduct(productIds).then((response) => {
|
|
|
|
|
|
|
+ delProduct(productIds).then((response) => {
|
|
|
|
|
+
|
|
|
msg = response.msg
|
|
msg = response.msg
|
|
|
|
|
+ getList()
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- getList()
|
|
|
|
|
- ElMessage.success(msg)
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {})
|
|
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+
|
|
|
|
|
+ ElMessage.success('删除成功')
|
|
|
|
|
+ }).catch(() => { })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 修改按钮操作
|
|
// 修改按钮操作
|
|
@@ -611,6 +618,11 @@ function handleDeviceAuthorize(item) {
|
|
|
// 生命周期钩子
|
|
// 生命周期钩子
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getList()
|
|
getList()
|
|
|
|
|
+
|
|
|
|
|
+ getDicts('iot_product_status').then((response) => {
|
|
|
|
|
+
|
|
|
|
|
+ iot_product_status.value = response
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// activated钩子
|
|
// activated钩子
|