[add] 新增萤石摄像头抓拍相关逻辑,获取方阵内光伏板、桩点支柱立架、箱变、逆变器地理信息接口

This commit is contained in:
lcj
2025-06-18 19:56:23 +08:00
parent 9d092facd0
commit cd1779fffd
91 changed files with 4163 additions and 672 deletions

View File

@ -122,16 +122,6 @@ const contractorFormRef = ref<ElFormInstance>();
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject);
//监听项目改变
// watch(
// () => currentProject.value,
// (newId, oldId) => {
// /* ... */
// queryParams.value.projectId=newId.id
// // getList()
// }
// )
const dialog = reactive<DialogOption>({
visible: false,
title: ''
@ -145,7 +135,8 @@ const initFormData: ContractorForm = {
custodian: undefined,
custodianPhone: undefined,
fileMap: undefined,
remark: undefined
remark: undefined,
projectId: currentProject.value.id
};
const data = reactive<PageData<ContractorForm, ContractorQuery>>({
form: { ...initFormData },
@ -172,7 +163,6 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询分包单位列表 */
const getList = async () => {
loading.value = true;
const res = await listContractor(queryParams.value);
contractorList.value = res.rows;
total.value = res.total;
@ -231,6 +221,7 @@ const handleUpdate = async (row?: ContractorVO) => {
const submitForm = () => {
contractorFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
form.value.projectId = currentProject.value.id;
buttonLoading.value = true;
if (form.value.id) {
await updateContractor(form.value).finally(() => (buttonLoading.value = false));
@ -272,7 +263,20 @@ const handleContractorFile = (row?: ContractorVO) => {
console.log(currentContractorId.value);
visible.value = true;
};
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value.id,
(nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;
console.log('监听项目id', queryParams.value.projectId, form.value.projectId);
getList();
}
);
onUnmounted(() => {
listeningProject();
});
onMounted(() => {
getList();
});