|
@@ -1,30 +1,70 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
-
|
|
|
<!-- 搜索工作栏 -->
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ v-show="showSearch"
|
|
|
+ label-width="120px"
|
|
|
+ >
|
|
|
<el-form-item label="人员姓名" prop="empName">
|
|
|
- <el-input v-model="queryParams.empName" placeholder="请输入人员姓名" clearable @keyup.enter.native="handleQuery"/>
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.empName"
|
|
|
+ placeholder="请输入人员姓名"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="性别" prop="empGender">
|
|
|
- <el-select v-model="queryParams.empGender" placeholder="请选择性别" clearable size="small">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.empGender"
|
|
|
+ placeholder="请选择性别"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
<el-option label="请选择字典生成" value="" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证号" prop="idcardno">
|
|
|
- <el-input v-model="queryParams.idcardno" placeholder="请输入身份证号" clearable @keyup.enter.native="handleQuery"/>
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.idcardno"
|
|
|
+ placeholder="请输入身份证号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="人员出生日期" prop="empBirthday">
|
|
|
- <el-date-picker clearable v-model="queryParams.empBirthday" type="date" value-format="yyyy-MM-dd" placeholder="选择人员出生日期" />
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
+ v-model="queryParams.empBirthday"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择人员出生日期"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="特种证书编号" prop="numberCode">
|
|
|
- <el-input v-model="queryParams.numberCode" placeholder="请输入特种证书编号" clearable @keyup.enter.native="handleQuery"/>
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.numberCode"
|
|
|
+ placeholder="请输入特种证书编号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="颁证时间" prop="issueDate">
|
|
|
- <el-date-picker clearable v-model="queryParams.issueDate" type="date" value-format="yyyy-MM-dd" placeholder="选择颁证时间" />
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
+ v-model="queryParams.issueDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择颁证时间"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -32,14 +72,32 @@
|
|
|
<!-- 操作工具栏 -->
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
|
- v-hasPermi="['backend:fire-special:create']">新增</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+ v-hasPermi="['backend:fire-special:create']"
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
|
|
- v-hasPermi="['backend:fire-special:export']">导出</el-button>
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExport"
|
|
|
+ :loading="exportLoading"
|
|
|
+ v-hasPermi="['backend:fire-special:export']"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 列表 -->
|
|
@@ -49,52 +107,105 @@
|
|
|
<el-table-column label="人员姓名" align="center" prop="empName" />
|
|
|
<el-table-column label="性别" align="center" prop="empGender" />
|
|
|
<el-table-column label="身份证号" align="center" prop="idcardno" />
|
|
|
- <el-table-column label="人员出生日期" align="center" prop="empBirthday" />
|
|
|
+ <el-table-column label="人员出生日期" align="center" prop="empBirthday">
|
|
|
+ <template v-slot="scope">
|
|
|
+ {{ scope.row.empBirthday.split(" ")[0] }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="特种证书编号" align="center" prop="numberCode" />
|
|
|
<el-table-column label="颁证时间" align="center" prop="issueDate" />
|
|
|
- <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 v-slot="scope">
|
|
|
- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['backend:fire-special:update']">修改</el-button>
|
|
|
- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['backend:fire-special:delete']">删除</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['backend:fire-special:update']"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['backend:fire-special:delete']"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!-- 分页组件 -->
|
|
|
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
|
- @pagination="getList"/>
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNo"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
|
|
|
<!-- 对话框(添加 / 修改) -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="所属单位" prop="orgId">
|
|
|
- <el-select v-model="form.orgId" placeholder="请选择所属单位">
|
|
|
+ <el-dialog
|
|
|
+ :title="title"
|
|
|
+ :visible.sync="open"
|
|
|
+ width="500px"
|
|
|
+ v-dialogDrag
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
+ <el-form-item label="所属单位" prop="orgIds">
|
|
|
+ <el-input
|
|
|
+ v-model="form.orgIds"
|
|
|
+ @focus="handleChoice"
|
|
|
+ placeholder="请选择所属单位"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
+ <!-- <el-select v-model="form.orgId" placeholder="请选择所属单位">
|
|
|
<el-option label="请选择字典生成" value="" />
|
|
|
- </el-select>
|
|
|
+ </el-select> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="人员姓名" prop="empName">
|
|
|
<el-input v-model="form.empName" placeholder="请输入人员姓名" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="性别" prop="empGender">
|
|
|
- <el-select v-model="form.empGender" placeholder="请选择性别">
|
|
|
- <el-option label="请选择字典生成" value="" />
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="特种证书编号" prop="numberCode">
|
|
|
+ <el-input
|
|
|
+ v-model="form.numberCode"
|
|
|
+ placeholder="请输入特种证书编号"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证号" prop="idcardno">
|
|
|
<el-input v-model="form.idcardno" placeholder="请输入身份证号" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="人员出生日期" prop="empBirthday">
|
|
|
- <el-date-picker clearable v-model="form.empBirthday" type="date" value-format="timestamp" placeholder="选择人员出生日期" />
|
|
|
+ <el-form-item label="性别" prop="empGender">
|
|
|
+ <el-select v-model="form.empGender" placeholder="请选择性别">
|
|
|
+ <el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_USER_SEX)" :key="parseInt(dict.value)"
|
|
|
+ :label="dict.label" :value="parseInt(dict.value)" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="特种证书编号" prop="numberCode">
|
|
|
- <el-input v-model="form.numberCode" placeholder="请输入特种证书编号" />
|
|
|
+ <el-form-item label="人员出生日期" prop="empBirthday">
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
+ v-model="form.empBirthday"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择人员出生日期"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="颁证时间" prop="issueDate">
|
|
|
- <el-date-picker clearable v-model="form.issueDate" type="date" value-format="timestamp" placeholder="选择颁证时间" />
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
+ v-model="form.issueDate"
|
|
|
+ type="date"
|
|
|
+ value-format="timestamp"
|
|
|
+ placeholder="选择颁证时间"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="附件">
|
|
|
- <fileUpload v-model="form.att"/>
|
|
|
+ <fileUpload v-model="form.att" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -102,17 +213,43 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 分配分管单位 -->
|
|
|
+ <el-dialog
|
|
|
+ title="分配分管单位"
|
|
|
+ :visible.sync="openOrg"
|
|
|
+ width="85vw"
|
|
|
+ append-to-body
|
|
|
+ v-if="openOrg"
|
|
|
+ >
|
|
|
+ <choiceSelectCopy
|
|
|
+ ref="choiceSelect"
|
|
|
+ :userId="form.id"
|
|
|
+ :type="'tackinfo'"
|
|
|
+ ></choiceSelectCopy>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitOrg">确 定</el-button>
|
|
|
+ <el-button @click="cancelOrg">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { createFireSpecial, updateFireSpecial, deleteFireSpecial, getFireSpecial, getFireSpecialPage, exportFireSpecialExcel } from "@/api/backend/fireSpecial";
|
|
|
-import FileUpload from '@/components/FileUpload';
|
|
|
-
|
|
|
+import {
|
|
|
+ createFireSpecial,
|
|
|
+ updateFireSpecial,
|
|
|
+ deleteFireSpecial,
|
|
|
+ getFireSpecial,
|
|
|
+ getFireSpecialPage,
|
|
|
+ exportFireSpecialExcel,
|
|
|
+} from "@/api/backend/fireSpecial";
|
|
|
+import FileUpload from "@/components/FileUpload";
|
|
|
+import choiceSelectCopy from "@/components/choiceSelectCopy";
|
|
|
export default {
|
|
|
name: "FireSpecial",
|
|
|
components: {
|
|
|
FileUpload,
|
|
|
+ choiceSelectCopy,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -130,6 +267,7 @@ export default {
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNo: 1,
|
|
@@ -144,21 +282,36 @@ export default {
|
|
|
issueDate: [],
|
|
|
},
|
|
|
// 表单参数
|
|
|
- form: {},
|
|
|
+ form: { orgId: "", orgIds: "" },
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
- }
|
|
|
+ empName: [
|
|
|
+ { required: true, message: "人员姓名不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ idcardno: [
|
|
|
+ { required: true, message: "身份证号不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ numberCode: [
|
|
|
+ { required: true, message: "特种证书编号不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ openOrg: false,
|
|
|
+ data:{}
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleChoice() {
|
|
|
+ // 打开弹窗==========
|
|
|
+ this.openOrg = true;
|
|
|
+ },
|
|
|
/** 查询列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
// 执行查询
|
|
|
- getFireSpecialPage(this.queryParams).then(response => {
|
|
|
+ getFireSpecialPage(this.queryParams).then((response) => {
|
|
|
this.list = response.data.list;
|
|
|
this.total = response.data.total;
|
|
|
this.loading = false;
|
|
@@ -169,6 +322,19 @@ export default {
|
|
|
this.open = false;
|
|
|
this.reset();
|
|
|
},
|
|
|
+ /** 单位信息确认按钮 */
|
|
|
+ submitOrg() {
|
|
|
+ console.log("this.orgType :>> ", this.$refs["choiceSelect"].confirmMSg());
|
|
|
+ this.data = this.$refs["choiceSelect"].confirmMSg();
|
|
|
+ this.form.orgIds = this.data.orgName;
|
|
|
+ // 关闭弹窗
|
|
|
+ this.openOrg = false;
|
|
|
+ // this.orgshow = true
|
|
|
+ },
|
|
|
+ // 取消按钮(分管单位)
|
|
|
+ cancelOrg() {
|
|
|
+ this.openOrg = false;
|
|
|
+ },
|
|
|
/** 表单重置 */
|
|
|
reset() {
|
|
|
this.form = {
|
|
@@ -204,21 +370,27 @@ export default {
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
const id = row.id;
|
|
|
- getFireSpecial(id).then(response => {
|
|
|
+ getFireSpecial(id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
+ this.form.orgIds = response.data.orgName
|
|
|
+ this.data.dwid=row.orgId
|
|
|
this.title = "修改特种作业人员";
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ if (!this.form.orgIds) {
|
|
|
+ return this.$modal.msgError("请选择所属单位")
|
|
|
+ }
|
|
|
+ this.form.orgId = this.data.dwid
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if (!valid) {
|
|
|
return;
|
|
|
}
|
|
|
// 修改的提交
|
|
|
if (this.form.id != null) {
|
|
|
- updateFireSpecial(this.form).then(response => {
|
|
|
+ updateFireSpecial(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -226,7 +398,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
// 添加的提交
|
|
|
- createFireSpecial(this.form).then(response => {
|
|
|
+ createFireSpecial(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -236,27 +408,35 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const id = row.id;
|
|
|
- this.$modal.confirm('是否确认删除特种作业人员编号为"' + id + '"的数据项?').then(function() {
|
|
|
+ this.$modal
|
|
|
+ .confirm('是否确认删除特种作业人员编号为"' + id + '"的数据项?')
|
|
|
+ .then(function () {
|
|
|
return deleteFireSpecial(id);
|
|
|
- }).then(() => {
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
this.getList();
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
// 处理查询参数
|
|
|
- let params = {...this.queryParams};
|
|
|
+ let params = { ...this.queryParams };
|
|
|
params.pageNo = undefined;
|
|
|
params.pageSize = undefined;
|
|
|
- this.$modal.confirm('是否确认导出所有特种作业人员数据项?').then(() => {
|
|
|
+ this.$modal
|
|
|
+ .confirm("是否确认导出所有特种作业人员数据项?")
|
|
|
+ .then(() => {
|
|
|
this.exportLoading = true;
|
|
|
return exportFireSpecialExcel(params);
|
|
|
- }).then(response => {
|
|
|
- this.$download.excel(response, '特种作业人员.xls');
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
+ this.$download.excel(response, "特种作业人员.xls");
|
|
|
this.exportLoading = false;
|
|
|
- }).catch(() => {});
|
|
|
- }
|
|
|
- }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|