|
|
@@ -146,6 +146,7 @@
|
|
|
Reflect.deleteProperty(queryForm, 'startTime');
|
|
|
Reflect.deleteProperty(queryForm, 'endTime');
|
|
|
Reflect.deleteProperty(queryForm, 'issueMainTypeList');
|
|
|
+ Reflect.deleteProperty(queryForm, 'issueTypeList');
|
|
|
formRef.value?.resetFields();
|
|
|
emits('onReset', queryForm);
|
|
|
};
|
|
|
@@ -170,29 +171,39 @@
|
|
|
};
|
|
|
|
|
|
const handleIssueMainTypeChange = () => {
|
|
|
- const arrMain = [];
|
|
|
- const arrSub = [];
|
|
|
- issueTypeValue.value.forEach((item) => {
|
|
|
- arrMain.push(item[0]);
|
|
|
- arrSub.push(item[1]);
|
|
|
- });
|
|
|
- queryForm.issueMainTypeList = [...new Set(arrMain)];
|
|
|
- queryForm.issueTypeList = arrSub;
|
|
|
+ if (issueTypeValue.value.length !== 0) {
|
|
|
+ const arrMain = [];
|
|
|
+ const arrSub = [];
|
|
|
+ issueTypeValue.value.forEach((item) => {
|
|
|
+ arrMain.push(item[0]);
|
|
|
+ arrSub.push(item[1]);
|
|
|
+ });
|
|
|
+ queryForm.issueMainTypeList = [...new Set(arrMain)];
|
|
|
+ queryForm.issueTypeList = arrSub;
|
|
|
+ } else {
|
|
|
+ Reflect.deleteProperty(queryForm, 'issueMainTypeList');
|
|
|
+ Reflect.deleteProperty(queryForm, 'issueTypeList');
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const handleCascaderChange = () => {
|
|
|
- const arr = [];
|
|
|
- workShopIds.value = [];
|
|
|
- workLocation.value.forEach((item) => {
|
|
|
- arr.push(item[1]);
|
|
|
- workShopIds.value.push(item[0]);
|
|
|
- });
|
|
|
- queryForm.workspaceId = arr;
|
|
|
- workShopIds.value = [...new Set(workShopIds.value)];
|
|
|
+ if (workLocation.value.length !== 0) {
|
|
|
+ const arr = [];
|
|
|
+ workShopIds.value = [];
|
|
|
+ workLocation.value.forEach((item) => {
|
|
|
+ arr.push(item[1]);
|
|
|
+ workShopIds.value.push(item[0]);
|
|
|
+ });
|
|
|
+ queryForm.workspaceId = arr;
|
|
|
+ workShopIds.value = [...new Set(workShopIds.value)];
|
|
|
+ } else {
|
|
|
+ Reflect.deleteProperty(queryForm, 'workspaceId');
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const handleIssueStateChange = () => {
|
|
|
if (tempState.value) queryForm.issueState = JSON.parse(tempState.value);
|
|
|
+ else Reflect.deleteProperty(queryForm, 'issueState');
|
|
|
};
|
|
|
|
|
|
const handleDateChange = () => {
|