|
@@ -31,7 +31,8 @@ import { ElMessage } from 'element-plus'
|
|
import api from '/@/api/device'
|
|
import api from '/@/api/device'
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
- funKey: String,
|
|
|
|
|
|
+ productKey: String,
|
|
|
|
+ deviceKey: String,
|
|
})
|
|
})
|
|
|
|
|
|
interface IListItem {
|
|
interface IListItem {
|
|
@@ -44,7 +45,7 @@ interface IListItem {
|
|
|
|
|
|
const list = ref<IListItem[]>([])
|
|
const list = ref<IListItem[]>([])
|
|
|
|
|
|
-api.tabDeviceFucntion.getList({ key: props.funKey }).then((res: IListItem[]) => {
|
|
|
|
|
|
+api.tabDeviceFucntion.getList({ key: props.productKey }).then((res: IListItem[]) => {
|
|
res.forEach((item) => (item.result = ''))
|
|
res.forEach((item) => (item.result = ''))
|
|
list.value = res
|
|
list.value = res
|
|
})
|
|
})
|
|
@@ -60,7 +61,7 @@ function run(row: IListItem) {
|
|
row.inputs.forEach(({ key, value }) => (params[key] = value))
|
|
row.inputs.forEach(({ key, value }) => (params[key] = value))
|
|
api.tabDeviceFucntion
|
|
api.tabDeviceFucntion
|
|
.do({
|
|
.do({
|
|
- deviceKey: props.funKey,
|
|
|
|
|
|
+ deviceKey: props.deviceKey,
|
|
funcKey: row.key,
|
|
funcKey: row.key,
|
|
params,
|
|
params,
|
|
})
|
|
})
|