萤石摄像头

This commit is contained in:
Teo
2025-06-17 09:49:15 +08:00
parent d6c0d6319f
commit 2638a32495
17 changed files with 1614 additions and 85 deletions

View File

@ -15,9 +15,17 @@
</el-select>
</el-form-item>
<el-form-item label="请选择方阵:" prop="pid" label-width="100" style="margin-bottom: 0">
<el-select v-model="matrixValue" placeholder="请选择" @change="handleChange" clearable>
<!-- <el-select v-model="matrixValue" placeholder="请选择" @change="handleChange" clearable>
<el-option v-for="item in matrixOptions" :key="item.id" :label="item.matrixName" :value="item.id" />
</el-select>
</el-select> -->
<el-cascader
:options="matrixOptions"
placeholder="请选择"
@change="handleChange"
:props="{ value: 'matrixId', label: 'name' }"
v-model="queryParams.matrixId"
clearable
/>
</el-form-item>
</el-form>
</div>
@ -274,7 +282,7 @@ const resetTreeAndMap = () => {
/** 方阵选择器改变事件 */
const handleChange = (value: number) => {
queryParams.value.matrixId = value;
queryParams.value.matrixId = value[1];
getList();
};
@ -363,12 +371,18 @@ const resetMatrix = () => {
const getList = async () => {
if (!queryParams.value.matrixId) {
const res = await getProjectSquare(currentProject.value.id);
if (res.rows.length === 0) {
if (res.data.length === 0) {
proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
} else {
if (!matrixValue.value) matrixValue.value = res.rows[0].id;
matrixOptions.value = res.rows;
queryParams.value.matrixId = res.rows[0].id;
let matrixList = res.data.map((item) => {
return {
...item,
matrixId: item.projectId
};
});
if (!matrixValue.value) matrixValue.value = matrixList[0].id;
matrixOptions.value = matrixList;
queryParams.value.matrixId = matrixList[0].children[0].matrixId;
}
}
loading.value = true;