Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev
This commit is contained in:
commit
de904854e5
|
@ -6,7 +6,7 @@
|
||||||
<span>精简模式下参数只支持输入框的方式录入</span>
|
<span>精简模式下参数只支持输入框的方式录入</span>
|
||||||
</j-space>
|
</j-space>
|
||||||
</div>
|
</div>
|
||||||
<j-tabs v-model="activeKey" tab-position="left">
|
<j-tabs v-model="activeKey" tab-position="left" @change="onTabChange" :destroyInactiveTabPane="true">
|
||||||
<j-tab-pane v-for="func in newFunctions" :key="func.id">
|
<j-tab-pane v-for="func in newFunctions" :key="func.id">
|
||||||
<template #tab>
|
<template #tab>
|
||||||
<Ellipsis style="width: 100px; text-align: left">
|
<Ellipsis style="width: 100px; text-align: left">
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
:ref="`result${func.id}Ref`"
|
:ref="`result${func.id}Ref`"
|
||||||
class="execute-result"
|
class="execute-result"
|
||||||
>
|
>
|
||||||
{{ func.executeResult }}
|
{{ executeResult || '' }}
|
||||||
</span>
|
</span>
|
||||||
</j-col>
|
</j-col>
|
||||||
</j-row>
|
</j-row>
|
||||||
|
@ -135,6 +135,8 @@ const columns = ref([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const executeResult = ref('')
|
||||||
|
|
||||||
// 设备功能数据处理
|
// 设备功能数据处理
|
||||||
const newFunctions = computed(() => {
|
const newFunctions = computed(() => {
|
||||||
const result: any = [];
|
const result: any = [];
|
||||||
|
@ -205,7 +207,7 @@ const handleExecute = async (func: any) => {
|
||||||
);
|
);
|
||||||
if (!success) return;
|
if (!success) return;
|
||||||
message.success('操作成功');
|
message.success('操作成功');
|
||||||
func.executeResult = result instanceof Array ? result[0] : result;
|
executeResult.value = result instanceof Array ? result[0] : result;
|
||||||
proxy?.$forceUpdate();
|
proxy?.$forceUpdate();
|
||||||
})
|
})
|
||||||
.catch((err: any) => {
|
.catch((err: any) => {
|
||||||
|
@ -216,8 +218,13 @@ const handleExecute = async (func: any) => {
|
||||||
* 清空
|
* 清空
|
||||||
*/
|
*/
|
||||||
const handleClear = (func: any) => {
|
const handleClear = (func: any) => {
|
||||||
|
executeResult.value = ''
|
||||||
proxy?.$refs[`${func.id}Ref`][0].resetFields();
|
proxy?.$refs[`${func.id}Ref`][0].resetFields();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onTabChange = (_key: string) => {
|
||||||
|
executeResult.value = ''
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -220,7 +220,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #createTime="slotProps">
|
<template #createTime="slotProps">
|
||||||
<span>{{
|
<span>{{
|
||||||
dayjs(slotProps.createTime).format('YYYY-MM-DD HH:mm:ss')
|
slotProps?.createTime ? dayjs(slotProps.createTime).format('YYYY-MM-DD HH:mm:ss') : ''
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #action="slotProps">
|
<template #action="slotProps">
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #registerTime="slotProps">
|
<template #registerTime="slotProps">
|
||||||
<span>{{
|
<span>{{
|
||||||
dayjs(slotProps.registerTime).format('YYYY-MM-DD HH:mm:ss')
|
slotProps?.registerTime ? dayjs(slotProps.registerTime).format('YYYY-MM-DD HH:mm:ss') : ''
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</JProTable>
|
</JProTable>
|
||||||
|
|
Loading…
Reference in New Issue