|
@@ -1,7 +1,13 @@
|
|
|
<template>
|
|
|
<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
|
|
|
v-model="queryParams.unitId"
|
|
|
placeholder="请输入单位"
|
|
@@ -10,7 +16,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="应到" prop="shouldBeTo">
|
|
|
+ <el-form-item label="" prop="shouldBeTo">
|
|
|
<el-input
|
|
|
v-model="queryParams.shouldBeTo"
|
|
|
placeholder="请输入应到"
|
|
@@ -19,7 +25,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="实到" prop="actualArrival">
|
|
|
+ <el-form-item label="" prop="actualArrival">
|
|
|
<el-input
|
|
|
v-model="queryParams.actualArrival"
|
|
|
placeholder="请输入实到"
|
|
@@ -28,7 +34,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="单位名称" prop="unitName">
|
|
|
+ <el-form-item label="" prop="unitName">
|
|
|
<el-input
|
|
|
v-model="queryParams.unitName"
|
|
|
placeholder="请输入单位名称"
|
|
@@ -38,8 +44,14 @@
|
|
|
/>
|
|
|
</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>
|
|
|
|
|
@@ -52,7 +64,8 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['grassrootsregistration:statistics:add']"
|
|
|
- >新增</el-button>
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -63,7 +76,8 @@
|
|
|
:disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
v-hasPermi="['grassrootsregistration:statistics:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -74,7 +88,8 @@
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
v-hasPermi="['grassrootsregistration:statistics:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -85,40 +100,60 @@
|
|
|
:loading="exportLoading"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['grassrootsregistration:statistics:export']"
|
|
|
- >导出</el-button>
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <!-- <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar> -->
|
|
|
</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 label="单位名称" align="center" prop="id" />
|
|
|
<el-table-column label="单位" align="center" prop="unitId" />
|
|
|
<el-table-column label="应到" align="center" prop="shouldBeTo" />
|
|
|
<el-table-column label="实到" align="center" prop="actualArrival" />
|
|
|
<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">
|
|
|
+ <!-- <el-button
|
|
|
+ size="btk"
|
|
|
+ type="text"
|
|
|
+ @click="handleChakan(scope.row)"
|
|
|
+ v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
|
|
|
+ ><span class="chakan">查看</span></el-button
|
|
|
+ > -->
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
+ size="btu"
|
|
|
type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['grassrootsregistration:statistics:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
+ size="btd"
|
|
|
type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['grassrootsregistration:statistics:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
-
|
|
|
+
|
|
|
<pagination
|
|
|
- v-show="total>0"
|
|
|
+ v-show="total > 0"
|
|
|
:total="total"
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
: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-input v-model="form.unitId" placeholder="请输入单位" />
|
|
|
</el-form-item>
|
|
@@ -146,16 +190,40 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</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>
|
|
|
</template>
|
|
|
|
|
|
<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 {
|
|
|
name: "Statistics",
|
|
|
+ components: { statistics },
|
|
|
data() {
|
|
|
return {
|
|
|
+ //查看页面
|
|
|
+ menuRoleVisible: false,
|
|
|
+ wordInfo: {},
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 导出遮罩层
|
|
@@ -183,13 +251,12 @@ export default {
|
|
|
unitId: null,
|
|
|
shouldBeTo: null,
|
|
|
actualArrival: null,
|
|
|
- unitName: null
|
|
|
+ unitName: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
- rules: {
|
|
|
- }
|
|
|
+ rules: {},
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -199,7 +266,7 @@ export default {
|
|
|
/** 查询军事训练月统计班列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listStatistics(this.queryParams).then(response => {
|
|
|
+ listStatistics(this.queryParams).then((response) => {
|
|
|
this.statisticsList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -217,7 +284,7 @@ export default {
|
|
|
unitId: null,
|
|
|
shouldBeTo: null,
|
|
|
actualArrival: null,
|
|
|
- unitName: null
|
|
|
+ unitName: null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -233,9 +300,9 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
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() {
|
|
@@ -246,25 +313,36 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
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.open = true;
|
|
|
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() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- updateStatistics(this.form).then(response => {
|
|
|
+ updateStatistics(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- addStatistics(this.form).then(response => {
|
|
|
+ addStatistics(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -276,24 +354,96 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
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() {
|
|
|
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>
|
|
|
+<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>
|