Browse Source

月统计报表

liangjiahao 3 years ago
parent
commit
49133adb7c

+ 58 - 0
src/components/look_word/statistics.vue

@@ -0,0 +1,58 @@
+<template>
+  <div>
+   
+
+    <div class="word" id="contents">
+      <p
+        style="
+          font-size: 14pt;
+          font-weight: 900;
+          margin-botttom: 30px;
+          color: black;
+        "
+      >
+        《军事训练月统计报表》
+      </p>
+ 
+    </div>
+  </div>
+</template>
+<script>
+import { lookWord } from "@/utils/look_word.js";
+import "@/utils/lodJs.js";
+export default {
+  name: "bdgleven",
+  props: ["message"],
+  data() {
+    return {
+      title: "军事训练月统计报表",
+      style:
+        ".JR_tr {height: 40px;};.JR_left{width: 120px;font-size: 1.331em; font-family: '楷体_GB2312';};.JR_right{ font-size: 1.331em; font-family: 仿宋_GB2312;};.JR_bottom{border-left:0; font-size: 1.331em; font-family: 仿宋_GB2312; text-align: right}",
+    };
+  },
+  methods: {
+    daochu() {
+      lookWord(this.title, "#contents", this.style, true);
+    },
+  },
+};
+</script>
+<style scoped>
+tbody {
+  color: #fff;
+  text-align: center;
+}
+tr:last-child {
+  border-bottom: 1px solid;
+}
+::v-deep .contents {
+  width: 1047px !important;
+}
+.box1 {
+  position: absolute;
+  right: 30px;
+  top: 80px;
+  border: 1px solid rgb(129, 130, 131);
+  border-radius: 5px;
+}
+</style>

+ 1 - 0
src/views/grassrootsregistration/bdglfood/index.vue

@@ -1982,4 +1982,5 @@ table td {
 .box2 tr td span {
 .box2 tr td span {
   font-size: 0.1em;
   font-size: 0.1em;
 }
 }
+::v-deep ::-webkit-input-placeholder{  color: #bdbdbd4f !important;}
 </style>
 </style>

+ 203 - 53
src/views/grassrootsregistration/statistics/index.vue

@@ -1,7 +1,13 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="单位" prop="unitId">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
+      <el-form-item label="" prop="unitId">
         <el-input
         <el-input
           v-model="queryParams.unitId"
           v-model="queryParams.unitId"
           placeholder="请输入单位"
           placeholder="请输入单位"
@@ -10,7 +16,7 @@
           @keyup.enter.native="handleQuery"
           @keyup.enter.native="handleQuery"
         />
         />
       </el-form-item>
       </el-form-item>
-      <el-form-item label="应到" prop="shouldBeTo">
+      <el-form-item label="" prop="shouldBeTo">
         <el-input
         <el-input
           v-model="queryParams.shouldBeTo"
           v-model="queryParams.shouldBeTo"
           placeholder="请输入应到"
           placeholder="请输入应到"
@@ -19,7 +25,7 @@
           @keyup.enter.native="handleQuery"
           @keyup.enter.native="handleQuery"
         />
         />
       </el-form-item>
       </el-form-item>
-      <el-form-item label="实到" prop="actualArrival">
+      <el-form-item label="" prop="actualArrival">
         <el-input
         <el-input
           v-model="queryParams.actualArrival"
           v-model="queryParams.actualArrival"
           placeholder="请输入实到"
           placeholder="请输入实到"
@@ -28,7 +34,7 @@
           @keyup.enter.native="handleQuery"
           @keyup.enter.native="handleQuery"
         />
         />
       </el-form-item>
       </el-form-item>
-      <el-form-item label="单位名称" prop="unitName">
+      <el-form-item label="" prop="unitName">
         <el-input
         <el-input
           v-model="queryParams.unitName"
           v-model="queryParams.unitName"
           placeholder="请输入单位名称"
           placeholder="请输入单位名称"
@@ -38,8 +44,14 @@
         />
         />
       </el-form-item>
       </el-form-item>
       <el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <!-- <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        > -->
+        <el-button size="btr" @click="resetQuery">重置</el-button>
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
 
 
@@ -52,7 +64,8 @@
           size="mini"
           size="mini"
           @click="handleAdd"
           @click="handleAdd"
           v-hasPermi="['grassrootsregistration:statistics:add']"
           v-hasPermi="['grassrootsregistration:statistics:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
         <el-button
         <el-button
@@ -63,7 +76,8 @@
           :disabled="single"
           :disabled="single"
           @click="handleUpdate"
           @click="handleUpdate"
           v-hasPermi="['grassrootsregistration:statistics:edit']"
           v-hasPermi="['grassrootsregistration:statistics:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
         <el-button
         <el-button
@@ -74,7 +88,8 @@
           :disabled="multiple"
           :disabled="multiple"
           @click="handleDelete"
           @click="handleDelete"
           v-hasPermi="['grassrootsregistration:statistics:remove']"
           v-hasPermi="['grassrootsregistration:statistics:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
         <el-button
         <el-button
@@ -85,40 +100,60 @@
           :loading="exportLoading"
           :loading="exportLoading"
           @click="handleExport"
           @click="handleExport"
           v-hasPermi="['grassrootsregistration:statistics:export']"
           v-hasPermi="['grassrootsregistration:statistics:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <!-- <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar> -->
     </el-row>
     </el-row>
 
 
-    <el-table v-loading="loading" :data="statisticsList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="statisticsList"
+      @selection-change="handleSelectionChange"
+      :header-cell-style="{ background: '#003C69', color: 'white' }"
+    >
       <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="id" />
       <el-table-column label="单位名称" align="center" prop="id" />
       <el-table-column label="单位" align="center" prop="unitId" />
       <el-table-column label="单位" align="center" prop="unitId" />
       <el-table-column label="应到" align="center" prop="shouldBeTo" />
       <el-table-column label="应到" align="center" prop="shouldBeTo" />
       <el-table-column label="实到" align="center" prop="actualArrival" />
       <el-table-column label="实到" align="center" prop="actualArrival" />
       <el-table-column label="单位名称" align="center" prop="unitName" />
       <el-table-column label="单位名称" align="center" prop="unitName" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
         <template slot-scope="scope">
+          <!-- <el-button
+            size="btk"
+            type="text"
+            @click="handleChakan(scope.row)"
+            v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
+            ><span class="chakan">查看</span></el-button
+          > -->
           <el-button
           <el-button
-            size="mini"
+            size="btu"
             type="text"
             type="text"
-            icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['grassrootsregistration:statistics:edit']"
             v-hasPermi="['grassrootsregistration:statistics:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
           <el-button
-            size="mini"
+            size="btd"
             type="text"
             type="text"
-            icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             @click="handleDelete(scope.row)"
             v-hasPermi="['grassrootsregistration:statistics:remove']"
             v-hasPermi="['grassrootsregistration:statistics:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    
+
     <pagination
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :total="total"
       :page.sync="queryParams.pageNum"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       :limit.sync="queryParams.pageSize"
@@ -126,8 +161,17 @@
     />
     />
 
 
     <!-- 添加或修改军事训练月统计班对话框 -->
     <!-- 添加或修改军事训练月统计班对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <div class="jiben">基本信息</div>
+
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="80px"
+        append-to-body
+        :inline="true"
+      >
         <el-form-item label="单位" prop="unitId">
         <el-form-item label="单位" prop="unitId">
           <el-input v-model="form.unitId" placeholder="请输入单位" />
           <el-input v-model="form.unitId" placeholder="请输入单位" />
         </el-form-item>
         </el-form-item>
@@ -146,16 +190,40 @@
         <el-button @click="cancel">取 消</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
+    <el-dialog
+      :visible.sync="menuRoleVisible"
+      :title="title"
+      append-to-body
+      id="chakan"
+    >
+      <statistics
+        v-if="menuRoleVisible"
+        ref="menuRole"
+        :message="wordInfo"
+      ></statistics>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { listStatistics, getStatistics, delStatistics, addStatistics, updateStatistics, exportStatistics } from "@/api/grassrootsregistration/statistics";
+import statistics from "@/components/look_word/statistics.vue";
+import {
+  listStatistics,
+  getStatistics,
+  delStatistics,
+  addStatistics,
+  updateStatistics,
+  exportStatistics,
+} from "@/api/grassrootsregistration/statistics";
 
 
 export default {
 export default {
   name: "Statistics",
   name: "Statistics",
+  components: { statistics },
   data() {
   data() {
     return {
     return {
+      //查看页面
+      menuRoleVisible: false,
+      wordInfo: {},
       // 遮罩层
       // 遮罩层
       loading: true,
       loading: true,
       // 导出遮罩层
       // 导出遮罩层
@@ -183,13 +251,12 @@ export default {
         unitId: null,
         unitId: null,
         shouldBeTo: null,
         shouldBeTo: null,
         actualArrival: null,
         actualArrival: null,
-        unitName: null
+        unitName: null,
       },
       },
       // 表单参数
       // 表单参数
       form: {},
       form: {},
       // 表单校验
       // 表单校验
-      rules: {
-      }
+      rules: {},
     };
     };
   },
   },
   created() {
   created() {
@@ -199,7 +266,7 @@ export default {
     /** 查询军事训练月统计班列表 */
     /** 查询军事训练月统计班列表 */
     getList() {
     getList() {
       this.loading = true;
       this.loading = true;
-      listStatistics(this.queryParams).then(response => {
+      listStatistics(this.queryParams).then((response) => {
         this.statisticsList = response.rows;
         this.statisticsList = response.rows;
         this.total = response.total;
         this.total = response.total;
         this.loading = false;
         this.loading = false;
@@ -217,7 +284,7 @@ export default {
         unitId: null,
         unitId: null,
         shouldBeTo: null,
         shouldBeTo: null,
         actualArrival: null,
         actualArrival: null,
-        unitName: null
+        unitName: null,
       };
       };
       this.resetForm("form");
       this.resetForm("form");
     },
     },
@@ -233,9 +300,9 @@ export default {
     },
     },
     // 多选框选中数据
     // 多选框选中数据
     handleSelectionChange(selection) {
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     },
     /** 新增按钮操作 */
     /** 新增按钮操作 */
     handleAdd() {
     handleAdd() {
@@ -246,25 +313,36 @@ export default {
     /** 修改按钮操作 */
     /** 修改按钮操作 */
     handleUpdate(row) {
     handleUpdate(row) {
       this.reset();
       this.reset();
-      const id = row.id || this.ids
-      getStatistics(id).then(response => {
+      const id = row.id || this.ids;
+      getStatistics(id).then((response) => {
         this.form = response.data;
         this.form = response.data;
         this.open = true;
         this.open = true;
         this.title = "修改军事训练月统计班";
         this.title = "修改军事训练月统计班";
       });
       });
     },
     },
+    //查看按钮操作
+    // handleChakan(row) {
+    //   this.opens = false;
+    //   const id = row.id || this.ids;
+    //   getStatistics(id).then((response) => {
+    //     this.wordInfo = response.data;
+    //     console.log(this.wordInfo);
+    //     this.title = "军事训练月统计报表";
+    //     this.menuRoleVisible = true;
+    //   });
+    // },
     /** 提交按钮 */
     /** 提交按钮 */
     submitForm() {
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
         if (valid) {
           if (this.form.id != null) {
           if (this.form.id != null) {
-            updateStatistics(this.form).then(response => {
+            updateStatistics(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.open = false;
               this.getList();
               this.getList();
             });
             });
           } else {
           } else {
-            addStatistics(this.form).then(response => {
+            addStatistics(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.open = false;
               this.getList();
               this.getList();
@@ -276,24 +354,96 @@ export default {
     /** 删除按钮操作 */
     /** 删除按钮操作 */
     handleDelete(row) {
     handleDelete(row) {
       const ids = row.id || this.ids;
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除军事训练月统计班编号为"' + ids + '"的数据项?').then(function() {
-        return delStatistics(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除军事训练月统计班编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delStatistics(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     },
     /** 导出按钮操作 */
     /** 导出按钮操作 */
     handleExport() {
     handleExport() {
       const queryParams = this.queryParams;
       const queryParams = this.queryParams;
-      this.$modal.confirm('是否确认导出所有军事训练月统计班数据项?').then(() => {
-        this.exportLoading = true;
-        return exportStatistics(queryParams);
-      }).then(response => {
-        this.$download.name(response.msg);
-        this.exportLoading = false;
-      }).catch(() => {});
-    }
-  }
+      this.$modal
+        .confirm("是否确认导出所有军事训练月统计班数据项?")
+        .then(() => {
+          this.exportLoading = true;
+          return exportStatistics(queryParams);
+        })
+        .then((response) => {
+          this.$download.name(response.msg);
+          this.exportLoading = false;
+        })
+        .catch(() => {});
+    },
+  },
 };
 };
 </script>
 </script>
+<style scoped>
+/* 对话框背景颜色 */
+::v-deep .el-dialog {
+  background: #004d86 !important;
+}
+
+::v-deep .el-dialog__header {
+  border-bottom: 1px solid #718a9d;
+}
+::v-deep .el-dialog__title {
+  color: #fff;
+  font: 18px;
+}
+::v-deep .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+::v-deep .el-form-item__label {
+  font: 16px;
+  color: #fff;
+  width: 100px !important;
+}
+::v-deep .el-input__inner {
+  /* width: 200px !important;
+  height: 36px; */
+  background: transparent;
+  color: #fff;
+}
+/* 单位框背景颜色 */
+::v-deep .vue-treeselect__control {
+  background: #004d86 !important;
+}
+/* 基本信息背景 */
+.jiben {
+  width: 500px;
+  height: 32px;
+  background-image: url(../../../images/小标题底.png);
+  margin-bottom: 25px;
+  margin-left: 0px;
+  color: #fff;
+  padding-left: 16px;
+  line-height: 32px;
+}
+/*调整表单间距 */
+::v-deep .el-form-item__content {
+  width: 200px;
+}
+::v-deep .el-dialog__body {
+  margin: 10px 30px 20px 30px;
+  padding-top: 20px !important;
+  box-sizing: border-box;
+}
+.el-dialog__body .el-form-item{
+  margin-left: 70px;
+}
+/* 底部确定取消按钮 */
+::v-deep .el-dialog__footer {
+  padding: 0px 10px 20px 0px;
+  margin-right: 37px;
+}
+::v-deep .el-input--small .el-input__inner {
+    height: 36px;
+    line-height: 36px;
+}
+</style>