|
@@ -3,12 +3,7 @@
|
|
|
<el-space alignment="center" :size="50">
|
|
<el-space alignment="center" :size="50">
|
|
|
<div>
|
|
<div>
|
|
|
<el-select v-model="queryType" placeholder="选择类型" class="type-select">
|
|
<el-select v-model="queryType" placeholder="选择类型" class="type-select">
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in queryTypeSelect"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-option v-for="item in queryTypeSelect" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
<el-input
|
|
<el-input
|
|
|
:style="{ width: '180px' }"
|
|
:style="{ width: '180px' }"
|
|
@@ -21,23 +16,22 @@
|
|
|
<div>
|
|
<div>
|
|
|
<span>添加方式:</span>
|
|
<span>添加方式:</span>
|
|
|
<el-select v-model="querySourceType" placeholder="请选择添加方式" class="protocal-select">
|
|
<el-select v-model="querySourceType" placeholder="请选择添加方式" class="protocal-select">
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in cameraAddType"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="AddType[item.value]"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-option v-for="item in cameraAddType" :key="item.value" :label="item.label" :value="AddType[item.value]" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span>工位:</span>
|
|
<span>工位:</span>
|
|
|
- <el-tree-select
|
|
|
|
|
- v-model="queryWorkSpace"
|
|
|
|
|
- :data="workspaceInfo"
|
|
|
|
|
- :render-after-expand="false"
|
|
|
|
|
- check-strictly
|
|
|
|
|
- placeholder="请选择工位"
|
|
|
|
|
|
|
+ <el-cascader
|
|
|
class="protocal-select"
|
|
class="protocal-select"
|
|
|
|
|
+ v-model="tempWorkSpaces"
|
|
|
|
|
+ :options="workspaceInfo"
|
|
|
|
|
+ :props="locationProp"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ collapse-tags
|
|
|
|
|
+ :show-all-levels="false"
|
|
|
|
|
+ popper-class="special-cascader"
|
|
|
|
|
+ placeholder="请选择工位"
|
|
|
|
|
+ @change="handleCascaderChange"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
@@ -73,7 +67,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
- import { onMounted } from 'vue';
|
|
|
|
|
|
|
+ import { onMounted, ref } from 'vue';
|
|
|
import { queryTypeSelect, cameraAddType, AddType } from '@/types/camera/constant';
|
|
import { queryTypeSelect, cameraAddType, AddType } from '@/types/camera/constant';
|
|
|
import useCameraOverview from '../stores/useCameraOverview';
|
|
import useCameraOverview from '../stores/useCameraOverview';
|
|
|
// import useSceneInfos from '@/hooks/useSceneInfos';
|
|
// import useSceneInfos from '@/hooks/useSceneInfos';
|
|
@@ -91,22 +85,38 @@
|
|
|
queryType,
|
|
queryType,
|
|
|
queryTypeContent,
|
|
queryTypeContent,
|
|
|
querySourceType,
|
|
querySourceType,
|
|
|
- queryWorkSpace,
|
|
|
|
|
|
|
+ queryWorkSpaces,
|
|
|
integrationState,
|
|
integrationState,
|
|
|
networkingState,
|
|
networkingState,
|
|
|
openEagle,
|
|
openEagle,
|
|
|
} = storeToRefs(cameraOverview);
|
|
} = storeToRefs(cameraOverview);
|
|
|
- const { getCameraItems } = cameraOverview;
|
|
|
|
|
|
|
+ const { getCameraItems, reset } = cameraOverview;
|
|
|
|
|
+
|
|
|
|
|
+ const tempWorkSpaces = ref([]);
|
|
|
|
|
+ const locationProp = { multiple: true, expandTrigger: 'hover' as const }; // 级联选择器(打开多选)
|
|
|
|
|
+
|
|
|
|
|
+ const handleCascaderChange = () => {
|
|
|
|
|
+ const tempArr = [];
|
|
|
|
|
+ queryWorkSpaces.value = [];
|
|
|
|
|
+ if (tempWorkSpaces.value.length !== 0) {
|
|
|
|
|
+ tempWorkSpaces.value.forEach((item) => {
|
|
|
|
|
+ tempArr.push(item[2]);
|
|
|
|
|
+ });
|
|
|
|
|
+ queryWorkSpaces.value = tempArr;
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
// 重置查询条件
|
|
// 重置查询条件
|
|
|
const resetSearch = () => {
|
|
const resetSearch = () => {
|
|
|
|
|
+ tempWorkSpaces.value = [];
|
|
|
queryType.value = '';
|
|
queryType.value = '';
|
|
|
queryTypeContent.value = '';
|
|
queryTypeContent.value = '';
|
|
|
querySourceType.value = '';
|
|
querySourceType.value = '';
|
|
|
- queryWorkSpace.value = undefined;
|
|
|
|
|
|
|
+ queryWorkSpaces.value = [];
|
|
|
integrationState.value = -1;
|
|
integrationState.value = -1;
|
|
|
networkingState.value = -1;
|
|
networkingState.value = -1;
|
|
|
openEagle.value = -1;
|
|
openEagle.value = -1;
|
|
|
|
|
+ reset();
|
|
|
getCameraItems();
|
|
getCameraItems();
|
|
|
};
|
|
};
|
|
|
|
|
|