Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Aug 8, 2024
1 parent ef5fd88 commit 83ede29
Show file tree
Hide file tree
Showing 15 changed files with 1,971 additions and 5,012 deletions.
6,768 changes: 1,833 additions & 4,935 deletions package-lock.json

Large diffs are not rendered by default.

48 changes: 33 additions & 15 deletions src/components/HubSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import { ElMessage } from 'element-plus';
import { onMounted, ref } from 'vue';
import ColorImg from '@/components/ColorImg.vue';
import { useI18n } from 'vue-i18n';
import axios from '../http/axios';
import RenderStatus from './RenderStatus.vue';
import RenderDeviceName from './RenderDeviceName.vue';
import { useI18n } from 'vue-i18n';
const { t: $t } = useI18n();
Expand Down Expand Up @@ -284,7 +284,10 @@ onMounted(() => {
<div style="text-align: center">
<el-popover :width="400" trigger="click">
<el-table border :data="devices">
<el-table-column header-align="center" :label="$t('agent.hub.info')">
<el-table-column
header-align="center"
:label="$t('agent.hub.info')"
>
<template #default="scope">
<RenderDeviceName :device="scope.row" />
</template>
Expand All @@ -296,35 +299,41 @@ onMounted(() => {
property="udId"
label="udId"
/>
<el-table-column align="center" width="100" :label="$t('agent.hub.action')">
<el-table-column
align="center"
width="100"
:label="$t('agent.hub.action')"
>
<template #default="scope">
<el-button
type="primary"
size="mini"
:disabled="scope.row.id === device.id"
@click="updatePosition(scope.row.id, i + 1 + j * 5)"
>{{$t('agent.hub.relate')}}
>{{ $t('agent.hub.relate') }}
</el-button>
</template>
</el-table-column>
</el-table>
<template #reference>
<el-button size="mini"> {{$t('agent.hub.switch')}} </el-button>
<el-button size="mini">
{{ $t('agent.hub.switch') }}
</el-button>
</template>
</el-popover>
<el-button
type="primary"
size="mini"
@click="hubControl(i + 1 + j * 5, 'up')"
>
{{$t('agent.hub.poweron')}}
{{ $t('agent.hub.poweron') }}
</el-button>
<el-button
type="danger"
size="mini"
@click="hubControl(i + 1 + j * 5, 'down')"
>
{{$t('agent.hub.poweroff')}}
{{ $t('agent.hub.poweroff') }}
</el-button>
</div>
</el-card>
Expand All @@ -336,7 +345,10 @@ onMounted(() => {
<div style="text-align: center">
<el-popover :width="400" trigger="click">
<el-table border :data="devices">
<el-table-column header-align="center" :label="$t('agent.hub.info')">
<el-table-column
header-align="center"
:label="$t('agent.hub.info')"
>
<template #default="scope">
<RenderDeviceName :device="scope.row" />
</template>
Expand All @@ -348,34 +360,40 @@ onMounted(() => {
property="udId"
label="udId"
/>
<el-table-column align="center" width="100" :label="$t('agent.hub.action')">
<el-table-column
align="center"
width="100"
:label="$t('agent.hub.action')"
>
<template #default="scope">
<el-button
type="primary"
size="mini"
@click="updatePosition(scope.row.id, i + 1 + j * 5)"
>{{$t('agent.hub.relate')}}
>{{ $t('agent.hub.relate') }}
</el-button>
</template>
</el-table-column>
</el-table>
<template #reference>
<el-button size="mini"> {{$t('agent.hub.relate')}} </el-button>
<el-button size="mini">
{{ $t('agent.hub.relate') }}
</el-button>
</template>
</el-popover>
<el-button
type="primary"
size="mini"
@click="hubControl(i + 1 + j * 5, 'up')"
>
{{$t('agent.hub.poweron')}}
{{ $t('agent.hub.poweron') }}
</el-button>
<el-button
type="danger"
size="mini"
@click="hubControl(i + 1 + j * 5, 'down')"
>
{{$t('agent.hub.poweroff')}}
{{ $t('agent.hub.poweroff') }}
</el-button>
</div>
</el-card>
Expand All @@ -384,10 +402,10 @@ onMounted(() => {
</div>
<div style="text-align: center; margin-top: 20px">
<el-button type="primary" size="mini" @click="hubControl(11, 'up')">
{{$t('agent.hub.allpoweron')}}
{{ $t('agent.hub.allpoweron') }}
</el-button>
<el-button type="danger" size="mini" @click="hubControl(11, 'down')">
{{$t('agent.hub.allpoweroff')}}
{{ $t('agent.hub.allpoweroff') }}
</el-button>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/PublicStepUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ const jump = (id) => {
<step-draggable
:is-edit="true"
:steps="publicStep.steps"
@setParent="setParent"
@addStep="addStep"
@set-parent="setParent"
@add-step="addStep"
@flush="flush"
@editStep="editStep"
@edit-step="editStep"
@remove="removeFromPublic"
@deleteStep="deleteStep"
@delete-step="deleteStep"
/>
</el-tab-pane>
<el-tab-pane :label="$t('pubSteps.list')" name="list">
Expand Down
10 changes: 5 additions & 5 deletions src/components/StepDraggable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,12 @@ const addStepTotarget = (id, toNext) => {
<step-draggable
:steps="s['childSteps']"
:parent-id="s['id']"
@setParent="setParent"
@addStep="addStep"
@set-parent="setParent"
@add-step="addStep"
@flush="emit('flush')"
@editStep="editStep"
@deleteStep="deleteStep"
@copyStep="copyStep"
@edit-step="editStep"
@delete-step="deleteStep"
@copy-step="copyStep"
/>
</el-card>
<div v-else style="display: flex; justify-content: space-between">
Expand Down
12 changes: 6 additions & 6 deletions src/components/StepList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ onMounted(() => {
<step-draggable
:steps="steps"
:parent-id="0"
@setParent="setParent"
@addStep="addStep"
@set-parent="setParent"
@add-step="addStep"
@flush="flush"
@editStep="editStep"
@copyStep="copyStep"
@deleteStep="deleteStep"
@addStepTotarget="addStepTotarget"
@edit-step="editStep"
@copy-step="copyStep"
@delete-step="deleteStep"
@add-step-totarget="addStepTotarget"
/>
</template>
39 changes: 29 additions & 10 deletions src/components/StepUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,9 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
/>
<el-form-item
prop="text"
Expand All @@ -1870,7 +1872,9 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
/>
<el-form-item
prop="text"
Expand All @@ -1894,7 +1898,9 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
/>
<el-form-item
:label="$t('stepDetail.installation')"
Expand Down Expand Up @@ -1958,7 +1964,9 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
/>
<el-form-item
prop="text"
Expand Down Expand Up @@ -1993,7 +2001,9 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
/>
<el-form-item
prop="text"
Expand Down Expand Up @@ -2326,7 +2336,11 @@ onMounted(() => {
{{ $t('stepDetail.msgTips.focus') }}
</div>
<div>
{{`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`}}
{{
`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`
}}
</div>
</template>
</el-alert>
Expand Down Expand Up @@ -2359,7 +2373,9 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.sysKey')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.sysKey')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
/>
<el-form-item :label="$t('stepDetail.inputValue')">
<el-input
Expand Down Expand Up @@ -2392,7 +2408,6 @@ onMounted(() => {
/>
</div>


<div v-if="step.stepType === 'motionEvent'">
<element-select
:label="$t('stepDetail.control.element')"
Expand Down Expand Up @@ -2783,7 +2798,9 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
/>
<global-params-select
:label="$t('stepDetail.verify.expectedValue')"
Expand Down Expand Up @@ -3115,7 +3132,9 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.use')} &#123;&#123;${$t('stepDetail.variableName')}&#125;&#125; ${$t('stepDetail.msgTips.verify')}`"
:title="`${$t('stepDetail.use')} &#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125; ${$t('stepDetail.msgTips.verify')}`"
/>
<el-form-item :label="$t('stepDetail.verify.actualValue')">
<el-input
Expand Down
11 changes: 6 additions & 5 deletions src/components/TestCaseList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ const getTestCaseList = (pageNum, pSize) => {
params: {
projectId: props.projectId,
moduleIds: moduleIds.value.length > 0 ? moduleIds.value : undefined,
caseAuthorNames: caseAuthorNames.value.length > 0 ? caseAuthorNames.value : undefined,
caseAuthorNames:
caseAuthorNames.value.length > 0 ? caseAuthorNames.value : undefined,
platform: props.platform,
name: name.value,
page: pageCurrNum.value,
Expand Down Expand Up @@ -124,11 +125,11 @@ const getModuleList = () => {
const caseAuthorList = ref([]);
const getCaseAuthorList = () => {
axios
.get('/controller/testCases/listAllCaseAuthor', {
params: {
.get('/controller/testCases/listAllCaseAuthor', {
params: {
projectId: props.projectId,
platform: props.platform,
}
},
})
.then((resp) => {
if (resp.code === 2000) {
Expand Down Expand Up @@ -160,7 +161,7 @@ const sequence = (column) => {
getTestCaseList();
};
const filter = (filters) => {
for (let key in filters) {
for (const key in filters) {
if (key === 'moduleId') {
moduleIds.value = filters.moduleId;
} else if (key === 'caseAuthorName') {
Expand Down
11 changes: 7 additions & 4 deletions src/locales/lang/en_US.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ const steps = {
loading: 'Loading',
loadDone: 'Load completed',
loadMore: 'Load more',
copyStepTips: 'Are you sure you want to replicate this step? Click on the surrounding space to cancel',
copyStepTips:
'Are you sure you want to replicate this step? Click on the surrounding space to cancel',
copyToNextLine: 'copy to current line',
copyToLastLine: 'copy to last line',
addStepTips: 'Select the location to add the step and click on the surrounding space to cancel.',
addStepTips:
'Select the location to add the step and click on the surrounding space to cancel.',
addToNextLine: 'add to next line',
addToBeforeLine: 'add to previous line',
};
Expand Down Expand Up @@ -527,7 +529,7 @@ const jobsTS = {
},
addCron: 'Add a timed task',
whatCron: 'What is a Cron expression?',
cronNoNext: "N/A",
cronNoNext: 'N/A',
cronInfo: {
one: '* The first bit, indicating seconds, value range: 0-59',
two: '* The second bit, indicating minutes, value range: 0-59',
Expand Down Expand Up @@ -1149,7 +1151,8 @@ const stepDetail = {
isOpenH5Listener: 'Detect if stay in H5 for a long time(Android Only)',
isOpenActivityListener:
'Detect if the current activity is in blacklist (Android Only)',
isOpenNetworkListener: 'Detect if in the airplane status or WIFI(Android Only)',
isOpenNetworkListener:
'Detect if in the airplane status or WIFI(Android Only)',
},
},
detailConfigure: 'Detail Configure ',
Expand Down
Loading

0 comments on commit 83ede29

Please sign in to comment.