-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
209 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
find "electron/resources/extra" -type f -exec git update-index --chmod=+x {} + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/components/Device/components/BatchActions/Tasks/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<div class="" @click="handleClick(devices)"> | ||
<slot v-bind="{ loading }" /> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
const props = defineProps({ | ||
devices: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
}) | ||
const loading = ref(false) | ||
</script> | ||
|
||
<style></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
src/components/Device/components/ControlBar/Tasks/components/TaskDialog/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<template> | ||
<el-dialog | ||
v-model="visible" | ||
title="定时任务" | ||
width="60%" | ||
class="el-dialog-beautify" | ||
append-to-body | ||
@closed="onClosed" | ||
> | ||
<ele-form-row :model="model" label-width="120px" class="!pr-[120px] !pt-4"> | ||
<ele-form-item-col label="任务类型" :span="24"> | ||
<el-select v-model="model.taskType" placeholder="请选择任务类型"> | ||
<el-option | ||
v-for="item in taskModel" | ||
:key="item.value" | ||
:label="$t(item.label)" | ||
:value="item.value" | ||
> | ||
</el-option> | ||
</el-select> | ||
</ele-form-item-col> | ||
<ele-form-item-col label="定时器类型" :span="24"> | ||
<el-radio-group v-model="model.timerType"> | ||
<el-radio | ||
v-for="(item, index) of timerModel" | ||
:key="index" | ||
:value="item.value" | ||
> | ||
{{ item.label }} | ||
</el-radio> | ||
</el-radio-group> | ||
</ele-form-item-col> | ||
</ele-form-row> | ||
<template #footer> | ||
<el-button @click="close"> | ||
取消 | ||
</el-button> | ||
<el-button type="primary" @click="submit"> | ||
确定 | ||
</el-button> | ||
</template> | ||
</el-dialog> | ||
</template> | ||
|
||
<script setup> | ||
const visible = ref(false) | ||
const model = ref({ | ||
taskType: '', | ||
timerType: 'timeout', | ||
}) | ||
const taskModel = [ | ||
{ | ||
label: 'device.control.install', | ||
value: 'install', | ||
}, | ||
{ | ||
label: 'device.control.capture', | ||
value: 'screenshot', | ||
}, | ||
{ | ||
label: 'device.control.shell.name', | ||
value: 'shell', | ||
}, | ||
] | ||
const timerModel = [ | ||
{ | ||
label: '单次', | ||
value: 'timeout', | ||
}, | ||
{ | ||
label: '周期', | ||
value: 'interval', | ||
}, | ||
] | ||
function open() { | ||
visible.value = true | ||
} | ||
function close() { | ||
visible.value = false | ||
} | ||
function submit() {} | ||
function onClosed() {} | ||
defineExpose({ | ||
open, | ||
close, | ||
}) | ||
</script> | ||
|
||
<style></style> |
28 changes: 28 additions & 0 deletions
28
src/components/Device/components/ControlBar/Tasks/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<div class="" @click="handleClick(device)"> | ||
<slot v-bind="{ loading }" /> | ||
|
||
<TaskDialog ref="taskDialogRef" /> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import TaskDialog from './components/TaskDialog/index.vue' | ||
const props = defineProps({ | ||
device: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
}) | ||
const loading = ref(false) | ||
const taskDialogRef = ref(null) | ||
function handleClick(device) { | ||
taskDialogRef.value.open(device) | ||
} | ||
</script> | ||
|
||
<style></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/plugins/element-plus/components/EleFormItemCol/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<template> | ||
<el-col v-bind="{ ...$props }"> | ||
<el-form-item v-bind="{ ...$attrs }"> | ||
<slot /> | ||
</el-form-item> | ||
</el-col> | ||
</template> | ||
|
||
<script> | ||
import { ElCol } from 'element-plus' | ||
export default { | ||
name: 'ElFormItemCol', | ||
inheritAttrs: false, | ||
props: { | ||
...ElCol.props, | ||
}, | ||
} | ||
</script> | ||
|
||
<style></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<template> | ||
<el-form v-bind="{ ...$props }"> | ||
<el-row v-bind="{ ...$attrs, size: $props.size }"> | ||
<slot /> | ||
</el-row> | ||
</el-form> | ||
</template> | ||
|
||
<script> | ||
import { ElForm } from 'element-plus' | ||
export default { | ||
name: 'ElFormRow', | ||
inheritAttrs: false, | ||
props: { | ||
...ElForm.props, | ||
}, | ||
} | ||
</script> | ||
|
||
<style></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters