|
@@ -36,16 +36,54 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="form-box">
|
|
|
+ <el-form
|
|
|
+ ref="form1"
|
|
|
+ :model="form1"
|
|
|
+ :rules="rules"
|
|
|
+ label-width="80px"
|
|
|
+ inline
|
|
|
+ >
|
|
|
+ <el-form-item label="请假人数" prop="leaveNum">
|
|
|
+ <el-input v-model="form1.leaveNum" placeholder="" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="学习人数" prop="studyNum">
|
|
|
+ <el-input v-model="form1.studyNum" placeholder="" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="特殊人数" prop="speciaNum">
|
|
|
+ <el-input v-model="form1.speciaNum" placeholder="" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="出差人数" prop="businessTravelNum">
|
|
|
+ <el-input v-model="form1.businessTravelNum" placeholder="" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="休假人数" prop="vacationNum">
|
|
|
+ <el-input v-model="form1.vacationNum" placeholder="" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否启用" prop="isEnable">
|
|
|
+ <el-radio-group v-model="form1.isEnable">
|
|
|
+ <el-radio :label="0">否</el-radio>
|
|
|
+ <el-radio :label="1">是</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm1" size="btq"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
listPeopleStatistics,
|
|
|
+ listPeopleStatistics1,
|
|
|
getPeopleStatistics,
|
|
|
delPeopleStatistics,
|
|
|
addPeopleStatistics,
|
|
|
- updatePeopleStatistics,
|
|
|
+ updatePeopleStatistics1,
|
|
|
} from "@/api/combatduty/PeopleStatistics";
|
|
|
|
|
|
export default {
|
|
@@ -80,9 +118,16 @@ export default {
|
|
|
nabianOut: null,
|
|
|
notNabianOut: null,
|
|
|
toggle: null,
|
|
|
+ leaveNum: null,
|
|
|
+ studyNum: null,
|
|
|
+ specialNum: null,
|
|
|
+ busibessTravelNum: null,
|
|
|
+ vacationNum: null,
|
|
|
+ isEnable: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
+ form1: {},
|
|
|
// 表单校验
|
|
|
rules: {},
|
|
|
};
|
|
@@ -95,6 +140,7 @@ export default {
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
listPeopleStatistics(this.queryParams).then((response) => {
|
|
|
+ console.log(response);
|
|
|
if (response.rows.length > 0) {
|
|
|
this.form = response.rows[0];
|
|
|
this.form.toggle = response.rows[0].toggle * 1;
|
|
@@ -102,6 +148,13 @@ export default {
|
|
|
this.loading = false;
|
|
|
}
|
|
|
});
|
|
|
+ listPeopleStatistics1(this.queryParams).then((response) => {
|
|
|
+ console.log(response);
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.form1 = response.data;
|
|
|
+ this.form1.isEnable = response.data.isEnable * 1;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
@@ -165,6 +218,17 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ submitForm1() {
|
|
|
+ this.$refs["form1"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ updatePeopleStatistics1(this.form1).then((response) => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
@@ -370,5 +434,8 @@ export default {
|
|
|
::v-deep .el-radio__input.is-checked + .el-radio__label {
|
|
|
color: #fff;
|
|
|
}
|
|
|
+.app-container {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
</style>
|
|
|
|