测试修改
This commit is contained in:
parent
b604fbd59c
commit
e97a677c3b
@ -14,7 +14,7 @@ export function mockLocalDemoTestSet(
|
||||
deviceType: string;
|
||||
status: string;
|
||||
groupId?: string;
|
||||
}[][];
|
||||
}[];
|
||||
}
|
||||
) {
|
||||
return api.post(`${alertUriBase}/localDemoTest/${alertType}`, data);
|
||||
|
@ -25,6 +25,7 @@
|
||||
v-model="setAlartTextData.alertType"
|
||||
:options="optionsAlertType"
|
||||
:rules="[(val) => val.length > 0 || '请选择故障类型!']"
|
||||
@update:model-value="onChooseAlertType"
|
||||
/>
|
||||
<q-list bordered separator class="rounded-borders">
|
||||
<q-expansion-item
|
||||
@ -42,10 +43,9 @@
|
||||
v-if="setAlartTextData.alertType == '列车信号故障'"
|
||||
outlined
|
||||
label="车组号"
|
||||
v-model.number="configItem.groupId"
|
||||
type="number"
|
||||
v-model="configItem.groupId"
|
||||
lazy-rules
|
||||
:rules="[(val) => val || '请输入车组号!']"
|
||||
:rules="[(val) => val.length > 0 || '请输入车组号!']"
|
||||
/>
|
||||
<q-select
|
||||
outlined
|
||||
@ -261,12 +261,13 @@ const $q = useQuasar();
|
||||
async function onSubmit() {
|
||||
myForm.value?.validate().then(async (res) => {
|
||||
if (res) {
|
||||
const deviceInfos = setAlartTextData.value.groupList
|
||||
.map((item) => item.deviceInfos)
|
||||
.flat();
|
||||
try {
|
||||
const params = {
|
||||
lineId: +setAlartTextData.value.lineId,
|
||||
deviceInfos: setAlartTextData.value.groupList.map(
|
||||
(item) => item.deviceInfos
|
||||
),
|
||||
deviceInfos,
|
||||
};
|
||||
const alertType = (saveAlertTypeData as never)[
|
||||
setAlartTextData.value.alertType + ''
|
||||
@ -340,6 +341,18 @@ function deleteSelectConfig(index: number) {
|
||||
lineStore.getLineApp().updateSelected();
|
||||
}
|
||||
|
||||
function onChooseAlertType() {
|
||||
setAlartTextData.value.groupList = [
|
||||
{
|
||||
groupName: '测试组',
|
||||
groupId: '',
|
||||
status: '',
|
||||
deviceInfos: [],
|
||||
expanded: false,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function onReset() {
|
||||
setAlartTextData.value = {
|
||||
lineId: lineStore.lineId as unknown as string,
|
||||
|
Loading…
Reference in New Issue
Block a user