瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

Hwf 2 月之前
父節點
當前提交
e49c28ec98

+ 8 - 0
src/api/comprehensiveGuarantee/materialReserveManagement/typesMaterialsManagement.ts

@@ -37,3 +37,11 @@ export function deleteMaterialType(id: string) {
     method: 'delete'
   });
 }
+
+// 获取父类id
+export function getParentIdTree() {
+  return request({
+    url: '/api/resource_provison/material/type/treeselect',
+    method: 'get'
+  });
+}

+ 16 - 4
src/views/comprehensiveGuarantee/MaterialReserveManagement/addTypesMaterials.vue

@@ -8,9 +8,15 @@
       <div class="common-dialog-box">
         <el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
           <el-form-item label="父类id:" prop="parent_id">
-            <el-input v-model="form.parent_id" placeholder="请输入父类id" style="width: 468px !important" />
+            <el-tree-select
+              v-model="form.parent_id"
+              :data="parentId"
+              :render-after-expand="false"
+              style="width: 468px !important"
+              node-key="id"
+              check-strictly
+            />
           </el-form-item>
-
           <el-form-item label="物资类别名称:" prop="material_category_name">
             <el-input v-model="form.material_category_name" placeholder="请输入物资类别名称" style="width: 468px !important" />
           </el-form-item>
@@ -43,7 +49,7 @@
 import { ref, reactive, toRefs } from 'vue';
 import {
   createMaterialType,
-  getMaterialTypeInfo,
+  getMaterialTypeInfo, getParentIdTree,
   updateMaterialType
 } from '@/api/comprehensiveGuarantee/materialReserveManagement/typesMaterialsManagement';
 const emits = defineEmits(['close']);
@@ -75,7 +81,13 @@ const data = reactive({
 });
 
 const { form, rules } = toRefs(data);
-
+const parentId = ref();
+const getParentId = () => {
+  getParentIdTree().then((res) => {
+    parentId.value = res.data;
+  })
+};
+getParentId();
 const closeDialog = () => {
   emits('close');
 };

+ 6 - 6
src/views/comprehensiveGuarantee/reliefResourceManagement/shelterAdd.vue

@@ -42,19 +42,19 @@
             </el-col>
             <el-col :span="10">
               <el-form-item label="避难场所容纳人数:" prop="capacity">
-                <el-input v-model="formData.capacity" placeholder="请输入避难场所容纳人数" style="width: 468px !important" />
+                <el-input type="number" v-model="formData.capacity" placeholder="请输入避难场所容纳人数" style="width: 468px !important" />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row :gutter="20" class="mb8">
             <el-col :span="10">
               <el-form-item label="应急避难场所室内面积:" prop="indoor_area">
-                <el-input v-model="formData.indoor_area" placeholder="请输入应急避难场所室内面积" style="width: 468px !important" />
+                <el-input type="number" v-model="formData.indoor_area" placeholder="请输入应急避难场所室内面积" style="width: 468px !important" />
               </el-form-item>
             </el-col>
             <el-col :span="10">
               <el-form-item label="应急避难场所所占地总面积:" prop="total_area">
-                <el-input v-model="formData.total_area" placeholder="请输入应急避难场所所占地总面积" style="width: 468px !important" />
+                <el-input type="number" v-model="formData.total_area" placeholder="请输入应急避难场所所占地总面积" style="width: 468px !important" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -126,7 +126,7 @@
             </el-col>
             <el-col :span="10">
               <el-form-item label="建设总投资(万元):" prop="total_investment">
-                <el-input v-model="formData.total_investment" placeholder="请输入建设总投资" style="width: 468px !important" />
+                <el-input type="number" v-model="formData.total_investment" placeholder="请输入建设总投资" style="width: 468px !important" />
               </el-form-item>
             </el-col>
           </el-row>
@@ -138,14 +138,14 @@
             </el-col>
             <el-col :span="10">
               <el-form-item label="日常维护或管理人员数量:" prop="management_number">
-                <el-input v-model="formData.management_number" placeholder="请输入日常维护或管理人员数量" style="width: 468px !important" />
+                <el-input type="number" v-model="formData.management_number" placeholder="请输入日常维护或管理人员数量" style="width: 468px !important" />
               </el-form-item>
             </el-col>
           </el-row>
           <el-row :gutter="20" class="mb8">
             <el-col :span="10">
               <el-form-item label="其中:专职维护或管理人员数量:" prop="full_number">
-                <el-input v-model="formData.full_number" placeholder="请输入专职维护或管理人员数量" style="width: 468px !important" />
+                <el-input type="number" v-model="formData.full_number" placeholder="请输入专职维护或管理人员数量" style="width: 468px !important" />
               </el-form-item>
             </el-col>
             <el-col :span="10">

+ 5 - 5
src/views/dataFilling/fillingManage.vue

@@ -46,7 +46,7 @@
                   <el-button type="primary" icon="Plus" @click="handleAdd">新增</el-button>
                   <el-button type="primary" icon="Search" @click="handleQuery">查询</el-button>
                   <el-button icon="Refresh" @click="resetQuery">重置</el-button>
-                  <el-button type="warning" plain icon="Download" :disabled="multiple" @click="exportTableData">导出</el-button>
+                  <el-button type="warning" plain icon="Download" @click="exportTableData">导出</el-button>
                 </el-col>
               </el-row>
             </el-form>
@@ -54,7 +54,7 @@
         </transition>
         <!-- 表格组件 -->
         <el-table ref="multipleTable" v-loading="loading" :data="tableData" @selection-change="handleSelectionChange" style="margin-top: 10px">
-          <el-table-column type="selection" width="55" align="center" />
+<!--          <el-table-column type="selection" width="55" align="center" />-->
           <el-table-column label="序号" align="center" type="index" width="50px" />
           <el-table-column label="表格名称" align="center" prop="table_name" />
           <el-table-column label="发布日期" align="center" prop="start_time" />
@@ -203,6 +203,9 @@ const fetchFillList = () => {
         res.data[i].start_time = parseTime(res.data[i].start_time);
       }
       tableData.value = res.data;
+      // res.data.forEach((item) => {
+      //   ids.value.push(item.report_id);
+      // })
       total.value = res.total;
     })
     .finally(() => {
@@ -237,7 +240,6 @@ const handleSelectionChange = (selection) => {
   }if (selection.length !== 1) {
     multiple .value = true;
   }
-
 };
 
 const handleTimeChange = () => {
@@ -248,8 +250,6 @@ const baseUrl = import.meta.env.VITE_APP_BASE_API;
 const exportTableData = () => {
   fillingTable(ids.value[0]);
   download2(baseUrl + '/api/dataFilling/export_to_excel?report_id='+ids.value[0], filename.value + '.xlsx');
-
-
 };
 
 const handlePagination = ({ page, limit }) => {

+ 19 - 4
src/views/knowledge/knowledge-management/index.vue

@@ -29,7 +29,7 @@
                 </el-col>
                 <el-col :span="6">
                   <el-form-item>
-                    <el-input v-model="queryParams.query" placeholder="请输入报告名称" clearable @keyup.enter="handleQuery" />
+                    <el-input v-model="queryParams.query" placeholder="请输入报告名称" clearable @keyup.enter="handleQuery" />
                   </el-form-item>
                 </el-col>
                 <el-col :span="6">
@@ -60,7 +60,7 @@
 
         <!-- 表格组件 -->
         <el-table v-loading="loading" :data="demoList" @selection-change="handleSelectionChange">
-          <el-table-column type="selection" width="55" align="center" />
+<!--          <el-table-column type="selection" width="55" align="center" />-->
           <el-table-column label="报告编号" align="center" prop="reportId" />
           <el-table-column label="报告名称" align="center" prop="reportName" />
           <el-table-column label="主题词" align="center" prop="subject" />
@@ -93,6 +93,8 @@ import { QueryParams, ReportItem } from '@/api/knowledge/types';
 import { fetchReports, deleteReport } from '@/api/knowledge';
 import KnowledgeDetail from './detail.vue';
 import Edit from '@/views/knowledge/knowledge-management/edit.vue';
+import { download2 } from '@/utils/request';
+import { onMounted, ref } from 'vue';
 
 const demoList = ref<ReportItem[]>([]);
 const loading = ref(true);
@@ -285,10 +287,23 @@ const close = () => {
   dialog.visible = false
 }
 
-
+const filename = '总结报告';
+const queryParam = ref({
+  sortBy: '',
+  sortOrder: '',
+  eventType: '',
+  publishDateRange: '',
+  query: 1,
+  page: '',
+  pageSize: 10
+})
+const baseUrl = import.meta.env.VITE_APP_BASE_API;
 const handleExport = () => {
-  ElMessage.success('导出成功');
+  download2(baseUrl + `/api/knowledge/export?sortBy=${queryParam.value.sortBy}&sortOrder=${queryParam.value.sortOrder}&eventType=${queryParam.value.eventType}&publishDateRange=${queryParam.value.publishDateRange}&query=${queryParam.value.query}&page=${queryParam.value.page}&pageSize=${queryParam.value.pageSize}`, filename + '.xlsx');
 };
+// const handleExport = () => {
+//   ElMessage.success('导出成功');
+// };
 
 onMounted(() => {
   getList();

+ 1 - 1
src/views/system/dept/index.vue

@@ -142,8 +142,8 @@
           </el-form>
         </div>
         <div class="common-dialog-footer" style="display: flex; justify-content: center">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
           <el-button @click="cancel">取 消</el-button>
+          <el-button type="primary" @click="submitForm">确 定</el-button>
         </div>
       </div>
     </div>

+ 1 - 1
src/views/system/dict/index.vue

@@ -108,8 +108,8 @@
           </el-form>
         </div>
         <div class="common-dialog-footer" style="display: flex; justify-content: center">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
           <el-button @click="cancel">取 消</el-button>
+          <el-button type="primary" @click="submitForm">确 定</el-button>
         </div>
       </div>
     </div>

+ 1 - 1
src/views/system/menu/index.vue

@@ -254,8 +254,8 @@
           </el-form>
         </div>
         <div class="common-dialog-footer" style="display: flex; justify-content: center">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
           <el-button @click="cancel">取 消</el-button>
+          <el-button type="primary" @click="submitForm">确 定</el-button>
         </div>
       </div>
     </div>

+ 3 - 3
src/views/system/role/index.vue

@@ -49,7 +49,7 @@
       <el-col :span="1.5">
         <el-button v-hasPermi="['system:role:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
       </el-col>
-      
+
       <el-col :span="1.5">
         <el-button v-hasPermi="['system:role:remove']" type="danger" plain icon="Refresh" @click="handleRefreshCache">刷新缓存</el-button>
       </el-col>
@@ -147,8 +147,8 @@
           </el-form>
         </div>
         <div class="common-dialog-footer" style="display: flex; justify-content: center">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
           <el-button @click="cancel">取 消</el-button>
+          <el-button type="primary" @click="submitForm">确 定</el-button>
         </div>
       </div>
     </div>
@@ -185,8 +185,8 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" @click="submitDataScope">确 定</el-button>
           <el-button @click="cancelDataScope">取 消</el-button>
+          <el-button type="primary" @click="submitDataScope">确 定</el-button>
         </div>
       </template>
     </el-dialog>

+ 3 - 3
src/views/system/user/index.vue

@@ -84,7 +84,7 @@
           <right-toolbar v-model:showSearch="showSearch" :columns="columns" :search="true" @query-table="getList"></right-toolbar>
           -->
         </el-row>
-        
+
         <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column v-if="columns[0].visible" key="userId" label="用户编号" align="center" prop="userId" />
@@ -239,8 +239,8 @@
           </el-form>
         </div>
         <div class="common-dialog-footer" style="display: flex; justify-content: center">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
           <el-button @click="cancel">取 消</el-button>
+          <el-button type="primary" @click="submitForm">确 定</el-button>
         </div>
       </div>
     </div>
@@ -273,8 +273,8 @@
       </el-upload>
       <template #footer>
         <div class="dialog-footer">
-          <el-button type="primary" @click="submitFileForm">确 定</el-button>
           <el-button @click="upload.open = false">取 消</el-button>
+          <el-button type="primary" @click="submitFileForm">确 定</el-button>
         </div>
       </template>
     </el-dialog>