Explorar o código

Merge branch 'qhse_person' of shuzhihua/pms-iot-vue into master

yanghao hai 6 días
pai
achega
f790179943

+ 11 - 5
src/views/pms/constructionDailyReport/components/report-config.ts

@@ -91,7 +91,7 @@ export const tableColumns: Array<{
   { prop: 'productionStatus', label: '施工动态', minWidth: 180 },
   { prop: 'planWorkingLayers', label: '本月计划层数', width: 120 },
   { prop: 'weather', label: '天气', width: 100 },
-  { prop: 'temperature', label: '气温', width: 100 },
+  { prop: 'temperature', label: '气温(℃)', width: 100 },
   { prop: 'deviceNames', label: '设备名称', minWidth: 180 },
   { prop: 'customer', label: '合同甲方', minWidth: 140 }
 ]
@@ -153,7 +153,7 @@ export const formSections: ConstructionDailyReportSection[] = [
         type: 'number',
         editableInEdit: true
       },
-      { prop: 'singleWellWorkload', label: '单井工作量' },
+      { prop: 'singleWellWorkload', label: '单井工作量', editableInEdit: true },
       { prop: 'planWorkingLayers', label: '本月计划层数', type: 'number' }
     ]
   },
@@ -167,9 +167,15 @@ export const formSections: ConstructionDailyReportSection[] = [
         span: 2,
         editableInEdit: true
       },
-      { prop: 'productionStatus', label: '施工动态', type: 'textarea', span: 2 },
-      { prop: 'weather', label: '天气' },
-      { prop: 'temperature', label: '气温(℃)' }
+      {
+        prop: 'productionStatus',
+        label: '施工动态',
+        type: 'textarea',
+        span: 2,
+        editableInEdit: true
+      },
+      { prop: 'weather', label: '天气', editableInEdit: true },
+      { prop: 'temperature', label: '气温(℃)', editableInEdit: true }
     ]
   }
 ]

+ 12 - 27
src/views/pms/constructionDailyReport/index.vue

@@ -86,19 +86,16 @@ onMounted(() => {
 
 <template>
   <div
-    class="grid grid-cols-[auto_1fr] grid-rows-[62px_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
-  >
+    class="grid grid-cols-[auto_1fr] grid-rows-[62px_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]">
     <DeptTreeSelect
       v-model="query.deptId"
-      :top-id="158"
+      :top-id="388"
       :deptId="deptId"
       :show-title="false"
-      class="row-span-2"
-    />
+      class="row-span-2" />
     <el-form
       size="default"
-      class="bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-8 gap-8 flex items-center justify-between"
-    >
+      class="bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-8 gap-8 flex items-center justify-between">
       <div class="flex items-center gap-8">
         <el-form-item label="项目">
           <el-input
@@ -106,8 +103,7 @@ onMounted(() => {
             placeholder="请输入项目名称"
             clearable
             @keyup.enter="handleQuery()"
-            class="!w-240px"
-          />
+            class="!w-240px" />
         </el-form-item>
         <el-form-item label="生产任务">
           <el-input
@@ -115,8 +111,7 @@ onMounted(() => {
             placeholder="请输入生产任务"
             clearable
             @keyup.enter="handleQuery()"
-            class="!w-240px"
-          />
+            class="!w-240px" />
         </el-form-item>
         <el-form-item label="创建时间">
           <el-date-picker
@@ -127,17 +122,14 @@ onMounted(() => {
             end-placeholder="结束日期"
             :shortcuts="rangeShortcuts"
             :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
-            class="!w-260px"
-          />
+            class="!w-260px" />
         </el-form-item>
       </div>
       <el-form-item>
         <el-button type="primary" @click="handleQuery()">
           <Icon icon="ep:search" class="mr-5px" /> 搜索
         </el-button>
-        <el-button @click="resetQuery">
-          <Icon icon="ep:refresh" class="mr-5px" /> 重置
-        </el-button>
+        <el-button @click="resetQuery"> <Icon icon="ep:refresh" class="mr-5px" /> 重置 </el-button>
       </el-form-item>
     </el-form>
 
@@ -148,16 +140,14 @@ onMounted(() => {
       :page-no="query.pageNo"
       :page-size="query.pageSize"
       @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-    >
+      @current-change="handleCurrentChange">
       <template #action="{ row }">
         <el-button
           v-if="row.status === 0"
           link
           type="primary"
           @click="handleOpenForm(row.id!, 'edit')"
-          v-hasPermi="['pms:iot-five-daily-report:update']"
-        >
+          v-hasPermi="['pms:iot-five-daily-report:update']">
           填报
         </el-button>
         <el-button
@@ -165,19 +155,14 @@ onMounted(() => {
           link
           type="success"
           @click="handleOpenForm(row.id!, 'readonly')"
-          v-hasPermi="['pms:iot-five-daily-report:query']"
-        >
+          v-hasPermi="['pms:iot-five-daily-report:query']">
           查看
         </el-button>
       </template>
     </ConstructionDailyReportTable>
   </div>
 
-  <ConstructionDailyReportDrawer
-    ref="formRef"
-    v-model:visible="visible"
-    :load-list="loadList"
-  />
+  <ConstructionDailyReportDrawer ref="formRef" v-model:visible="visible" :load-list="loadList" />
 </template>
 
 <style scoped>

+ 2 - 1
src/views/pms/iotprojecttask/IotProjectTaskForm.vue

@@ -1326,7 +1326,8 @@ const openDeviceDialogForForm = async () => {
 
   try {
     const params = {
-      deptIds: currentTask.value.deptIds
+      deptIds: currentTask.value.deptIds,
+      deptId: deptId.value
     }
     const data = await IotDeviceApi.getDevicesByDepts(params)