From 6d479f9fbc15e96383fe25270575c976e4356e89 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 16 五月 2025 17:23:46 +0800
Subject: [PATCH] 新建工地夜间施工管理页面(待完成)
---
src/views/fysp/scene/SceneEditDialog.vue | 58 +++++++++++++++++++
src/api/fysp/nightConstructionApi.js | 17 +++++
src/views/fysp/support/JingAnSupport.vue | 10 ++-
src/views/fysp/support/JingAnNightConstruction.vue | 53 +++++++++++++++++
4 files changed, 135 insertions(+), 3 deletions(-)
diff --git a/src/api/fysp/nightConstructionApi.js b/src/api/fysp/nightConstructionApi.js
new file mode 100644
index 0000000..371448d
--- /dev/null
+++ b/src/api/fysp/nightConstructionApi.js
@@ -0,0 +1,17 @@
+import { $fysp } from '../index';
+
+/**
+ * 宸ュ湴澶滈棿鏂藉伐璁稿彲璇佺浉鍏矨PI
+ */
+export default {
+ /**
+ * 鏌ヨ宸ュ湴澶滈棿鏂藉伐璁稿彲璇�
+ */
+ fetchRecord({ cityCode, districtCode, page, perPage = 20 }) {
+ return $fysp
+ .get(`nightwork/record/all`, {
+ params: { cityCode, districtCode, page, perPage }
+ })
+ .then((res) => res.data);
+ }
+};
diff --git a/src/views/fysp/scene/SceneEditDialog.vue b/src/views/fysp/scene/SceneEditDialog.vue
new file mode 100644
index 0000000..b730af4
--- /dev/null
+++ b/src/views/fysp/scene/SceneEditDialog.vue
@@ -0,0 +1,58 @@
+<template>
+ <el-dialog>
+ <div class="sub-title">璐︽埛淇℃伅</div>
+ <el-row>
+ <FormCol>
+ <CompUserInfo :form-info="formUser" />
+ </FormCol>
+ </el-row>
+ <el-divider />
+ <div class="sub-title">鍩烘湰淇℃伅</div>
+ <el-row>
+ <FormCol>
+ <CompSceneBaseInfo :model="formScene" />
+ </FormCol>
+ </el-row>
+ <template v-if="formScene.typeid == 1">
+ <el-divider />
+ <div class="sub-title">宸ュ湴淇℃伅</div>
+ <el-row>
+ <FormCol>
+ <CompSceneConstructionInfo
+ showStyle="form"
+ :form-info="formSubScene"
+ />
+ </FormCol>
+ </el-row>
+ <el-divider />
+ <div class="sub-title">璁惧淇℃伅</div>
+ <el-row>
+ <FormCol>
+ <CompSceneDeviceInfo
+ :form-info="formSceneDevice"
+ :scene-type="formScene.typeid"
+ />
+ </FormCol>
+ </el-row>
+ </template>
+ </el-dialog>
+</template>
+<script setup>
+import { ref } from 'vue';
+
+import sceneApi from '@/api/fysp/sceneApi';
+import userApi from '@/api/fysp/userApi';
+import CompSceneBaseInfo from './CompSceneBaseInfo.vue';
+import CompSceneConstructionInfo from './CompSceneConstructionInfo.vue';
+import CompSceneDeviceInfo from './CompSceneDeviceInfo.vue';
+import CompUserInfo from '../user/CompUserInfo.vue';
+
+const props = defineProps({
+ sceneId: String
+});
+
+const formUser = ref({});
+const formScene = ref({});
+const formSubScene = ref({});
+const formSceneDevice = ref({});
+</script>
diff --git a/src/views/fysp/support/JingAnNightConstruction.vue b/src/views/fysp/support/JingAnNightConstruction.vue
new file mode 100644
index 0000000..79089b0
--- /dev/null
+++ b/src/views/fysp/support/JingAnNightConstruction.vue
@@ -0,0 +1,53 @@
+<template>
+ <FYTable @search="onSearch">
+ <template #options>
+
+ </template>
+
+ <template #buttons>
+
+ </template>
+
+ <template #table-column>
+ <el-table-column fixed="left" sortable prop="ncNum" label="缂栧彿" width="80">
+ </el-table-column>
+ <el-table-column
+ fixed="left"
+ prop="name"
+ label="鍚嶇О"
+ :show-overflow-tooltip="true"
+ width="400"
+ >
+ </el-table-column>
+ <el-table-column prop="type" label="绫诲瀷" width="130" />
+ <el-table-column prop="provincename" label="鐪�" width="90" />
+ <el-table-column prop="cityname" label="甯�" width="90" />
+ <el-table-column prop="districtname" label="鍖哄幙" width="90" />
+ <el-table-column prop="townname" label="琛楅亾" width="110" />
+ <el-table-column prop="location" label="鍦板潃" min-width="400" />
+ <el-table-column prop="longitude" label="缁忓害" width="110" />
+ <el-table-column prop="latitude" label="绾害" width="110" />
+ <el-table-column fixed="right" label="鎿嶄綔" width="160">
+ <template #default="scope">
+ <el-button
+ :loading="scope.row.loading1"
+ type="default"
+ size="small"
+ @click="itemEdit(scope)"
+ >缂栬緫</el-button
+ >
+ <el-button
+ :loading="scope.row.loading2"
+ :type="scope.row.extension1 != '0' ? 'danger' : 'primary'"
+ size="small"
+ @click="itemActive(scope)"
+ >{{ scope.row.extension1 != '0' ? '涓嬬嚎' : '涓婄嚎' }}</el-button
+ >
+ </template>
+ </el-table-column>
+ </template>
+ </FYTable>
+</template>
+<script setup>
+import nightConstructionApi from '@/api/fysp/nightConstructionApi';
+</script>
diff --git a/src/views/fysp/support/JingAnSupport.vue b/src/views/fysp/support/JingAnSupport.vue
index 1a0cc17..3f8a4fb 100644
--- a/src/views/fysp/support/JingAnSupport.vue
+++ b/src/views/fysp/support/JingAnSupport.vue
@@ -1,15 +1,19 @@
<template>
<el-tabs type="border-card">
- <el-tab-pane label="鏂拌澶�">
+ <el-tab-pane label="闈欏畨澶滈棿鏂藉伐绠$悊">
+ <JingAnNightConstruction></JingAnNightConstruction>
+ </el-tab-pane>
+ <el-tab-pane label="闈欏畨宸ュ湴鎵皹璁惧淇℃伅鍖归厤">
<NewDevice></NewDevice>
</el-tab-pane>
- <el-tab-pane label="鏂板伐鍦�">
+ <!-- <el-tab-pane label="鏂板伐鍦�">
<NewConstruction></NewConstruction>
- </el-tab-pane>
+ </el-tab-pane> -->
</el-tabs>
</template>
<script setup>
import NewDevice from './NewDevice.vue';
import NewConstruction from './NewConstruction.vue';
+import JingAnNightConstruction from './JingAnNightConstruction.vue';
</script>
<style scoped></style>
--
Gitblit v1.9.3