1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072 |
- <template>
- <div class="app-container">
- <el-form
- :model="queryParams"
- ref="queryForm"
- :inline="true"
- v-show="showSearch"
- label-width="100px"
- >
- <el-form-item label="单位" prop="unitId" style="margin-left:-60px" label-width="50px">
- <!-- <el-input
- v-model="queryParams.unitId"
- placeholder="请输入单位"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- /> -->
- <treeselect
- v-model="queryParams.unitId"
- :options="users"
- placeholder="请选择到访单位"
- class="threeselects"
- @select="selectPeo1"
- />
- </el-form-item>
- <el-form-item label="人员" prop="peopleId" label-width="50px" style="margin-left:-50px">
- <!-- <el-input
- v-model="queryParams.peopleId"
- placeholder="请输入人员"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- /> -->
- <el-select v-model="queryParams.name" ref="peoplenames" placeholder="请选择人员">
- <el-option
- v-for="item in executor"
- :key="item.id"
- :label="item.name"
- :value="item.name"
- @click.native="peopleIds1(item.id, item.name)"
- />
- </el-select>
- </el-form-item>
- <!-- <el-form-item label="部职别" prop="duty" label-width="110px">
- <el-input
- v-model="queryParams.duty"
- placeholder="请输入部职别"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="住房待遇等级" prop="grade">
- <el-input
- v-model="queryParams.grade"
- placeholder="请输入住房待遇等级"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item> -->
- <el-form-item label="申请住房类别" style="margin-left:-20px" prop="type" >
- <!-- <el-select v-model="queryParams.type" placeholder="请选择申请住房类别" clearable size="small">
- <el-option label="请选择字典生成" value="" />
- </el-select> -->
- <el-select v-model="queryParams.type" placeholder="请选择申请住房类别">
- <!-- <el-option label="请选择字典生成" value="" /> -->
- <el-option
- v-for="(item, i) in ziDian"
- :key="i"
- :label="item.dictLabel"
- :value="item.dictLabel"
- >
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button
- type="primary"
- icon="el-icon-search"
- size="btr"
- @click="handleQuery"
- >搜索</el-button
- >
- <el-button icon="el-icon-refresh" size="btr" @click="resetQuery"
- >重置</el-button
- >
- </el-form-item>
- </el-form>
- <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="['barracksManagement:flats:add']"
- >新增</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- plain
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['barracksManagement:flats:edit']"
- >修改</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['barracksManagement:flats:remove']"
- >删除</el-button
- >
- </el-col>
- <!-- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- :loading="exportLoading"
- @click="handleExport"
- v-hasPermi="['barracksManagement:flats:export']"
- >导出</el-button>
- </el-col> -->
- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- ></right-toolbar>
- </el-row>
- <el-table
- v-loading="loading"
- :data="flatsList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="序号" type="index" width="50"> </el-table-column>
- <el-table-column
- label="单位"
- align="center"
- prop="unitName"
- width="130"
- />
- <el-table-column
- label="人员"
- align="center"
- prop="peopleName"
- width="130"
- />
- <el-table-column label="部职别" align="center" prop="duty" width="130" />
- <el-table-column
- label="是否符合申请条件"
- align="center"
- prop="whether"
- width="150"
- />
- <el-table-column
- label="住房待遇等级"
- align="center"
- prop="grade"
- width="150"
- />
- <el-table-column
- label="申请住房户型"
- align="center"
- prop="houseType"
- width="150"
- />
- <el-table-column
- label="出生时间"
- align="center"
- prop="birthDate"
- width="180"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.birthDate, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="入伍年月"
- align="center"
- prop="enlistDate"
- width="160"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.enlistDate, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="参加工作时间"
- align="center"
- prop="jobTime"
- width="180"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.jobTime, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="地方普通高等学校入学时间"
- align="center"
- prop="entranceDate"
- width="180"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.entranceDate, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="享受相应住房待遇职级时间"
- align="center"
- prop="jobDate"
- width="180"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.jobDate, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="任现职级时间"
- align="center"
- prop="jobsDate"
- width="150"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.jobsDate, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="配偶是否军队人员"
- align="center"
- prop="whethers"
- width="150"
- />
- <el-table-column
- label="军衔"
- align="center"
- prop="rankId"
- :formatter="unit4Format"
- width="150"
- />
- <el-table-column
- label="军衔时间"
- align="center"
- prop="rankDate"
- width="150"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.rankDate, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="备注"
- align="center"
- prop="remark"
- show-overflow-tooltip
- width="150"
- />
- <!-- <el-table-column label="登记时间" align="center" prop="createtime" />
- <el-table-column label="登记人" align="center" prop="adminId" /> -->
- <el-table-column
- label="配偶姓名"
- align="center"
- prop="pName"
- width="150"
- />
- <el-table-column
- label="配偶单位"
- align="center"
- prop="pUnit"
- width="150"
- />
- <el-table-column
- label="配偶户口所在地"
- align="center"
- prop="pAccount"
- width="150"
- />
- <el-table-column label="结婚时间" align="center" prop="pTime" width="150">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.pTime, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="配偶入伍或随军时间"
- align="center"
- prop="pTimeOne"
- width="150"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.pTimeOne, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="配偶现住房"
- align="center"
- prop="pCeace"
- width="150"
- />
- <el-table-column
- label="申请住房类别"
- align="center"
- prop="type"
- width="150"
- />
- <el-table-column
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- width="150px"
- >
- <template slot-scope="scope">
- <el-button
- size="btu"
- type="text"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['barracksManagement:flats:edit']"
- >修改</el-button
- >
- <el-button
- size="btd"
- type="text"
- @click="handleDelete(scope.row)"
- v-hasPermi="['barracksManagement:flats:remove']"
- >删除</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <!-- 添加或修改公寓住房申请人员资格审查登记对话框 -->
- <el-dialog
- :title="title"
- :visible.sync="open"
- width="1190px"
- append-to-body
- >
- <el-form
- ref="form"
- :model="form"
- :rules="rules"
- label-width="110px"
- :inline="true"
- >
- <el-form-item label="单位" prop="unitId" style="margin-left:25px">
- <!-- <el-input v-model="form.unitId" placeholder="请输入单位" /> -->
- <treeselect
- v-model="form.unitId"
- :options="users"
- placeholder="请选择单位"
- class="threeselects"
- @select="selectPeo"
- />
- </el-form-item>
- <el-form-item label="人员" prop="peopleId" style="margin-left:-50px">
- <el-select
- v-model="form.peopleId"
- placeholder="请选择人员"
- ref="peoplenames"
- >
- <el-option
- v-for="item in executor"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- @click.native="peopleIds(item.name,item)"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="出生时间" style="margin-left:8px" prop="birthDate" placeholder="请选择出生时间">
- <el-date-picker
- clearable
- size="small"
- v-model="form.birthDate"
- type="date"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="军衔" prop="rankId" style="margin-left:25px">
- <!-- <el-input v-model="form.rankId" class="zhufnag" :disabled="true" /> -->
- <!-- <el-input v-model="form.rankName" placeholder="请输入军衔" /> -->
- <el-select v-model="form.rankId" :disabled="true" placeholder="请选择军衔" >
- <!-- <el-option label="请选择字典生成" value="" /> -->
- <el-option
- v-for="(item, i) in ziDian1"
- :key="i"
- :label="item.dictLabel"
- :value="item.dictSort"
- >
- </el-option>
- </el-select>
-
- </el-form-item>
- <el-form-item label="军衔时间" prop="rankDate" style="margin-left:-50px">
- <el-date-picker
- clearable
- size="small"
- v-model="form.rankDate"
- type="date"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="住房待遇等级" prop="grade" class="zhufnag" style="margin-left:35px">
- <el-input v-model="form.grade" class="zhufnag" />
- </el-form-item>
- <el-form-item label="配偶现住房" prop="pCeace" style="margin-left:25px">
- <el-input v-model="form.pCeace" />
- </el-form-item>
- <el-form-item label="入伍年月" prop="enlistDate" style="margin-left:-50px">
- <el-date-picker
- clearable
- size="small"
- v-model="form.enlistDate"
- type="date"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="申请住房户型" prop="houseType" style="margin-left:26px">
- <!-- <el-select v-model="form.houseType" placeholder="请选择申请住房户型" class="zhufnag">
- <el-option label="请选择字典生成" value="" class="zhufnag" /> -->
- <el-input v-model="form.houseType" class="zhufnag" />
- <!-- </el-select> -->
- </el-form-item>
- <el-form-item label="部职别" prop="duty" style="margin-left:25px">
- <el-input v-model="form.duty" />
- </el-form-item>
- <el-form-item label="参加工作时间" prop="jobTime" style="margin-left:-50px">
- <el-date-picker
- clearable
- size="small"
- v-model="form.jobTime"
- type="date"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="任现职级时间" prop="jobsDate" class="zhufnag" style="margin-left:35px">
- <el-date-picker
- clearable
- size="small"
- v-model="form.jobsDate"
- type="date"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- <!-- <el-form-item label="登记人" prop="adminId">
- <el-input v-model="form.adminId" placeholder="请输入登记人" />
- </el-form-item> -->
- <el-form-item label="配偶姓名" prop="pName" style="margin-left:25px">
- <el-input v-model="form.pName" />
- </el-form-item>
- <el-form-item label="配偶单位" prop="pUnit" style="margin-left:-50px">
- <el-input v-model="form.pUnit" />
- </el-form-item>
- <el-form-item label="申请住房类别" prop="type" style="margin-left:10px">
- <el-select v-model="form.type" placeholder="请选择申请住房类别">
- <!-- <el-option label="请选择字典生成" value="" /> -->
- <el-option
- v-for="(item, i) in ziDian"
- :key="i"
- :label="item.dictLabel"
- :value="item.dictLabel"
- >
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="配偶户口所在地" prop="pAccount" label-width="130px" style="margin-left:10px">
- <el-input v-model="form.pAccount" />
- </el-form-item>
- <el-form-item label="结婚时间" prop="pTime" style="margin-left:-50px">
- <el-date-picker
- clearable
- size="small"
- v-model="form.pTime"
- type="date"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="是否符合申请条件" prop="whether" label-width="127px" style="margin-left:4px" >
- <el-input v-model="form.whether" />
- </el-form-item>
- <el-form-item label="配偶是否军队人员(含职工)" class="peious" style="margin-left:-45px" label-width="180px" prop="whethers">
- <el-input v-model="form.whethers" />
- </el-form-item>
- <el-form-item
-
- label="配偶入伍或随军时间"
- prop="pTimeOne"
- class="peious"
- label-width="180px"
- >
- <el-date-picker
- clearable
- size="small"
- v-model="form.pTimeOne"
- type="date"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="地方普通高等学校入学时间" prop="entranceDate" style="margin-left:-44px" class="peious" label-width="180px">
- <el-date-picker
- clearable
- size="small"
- v-model="form.entranceDate"
- type="date"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
-
-
- <el-form-item
- label="享受相应住房待遇职级时间"
- prop="jobDate"
- label-width="200px"
- class="peious"
- style="margin-left:130px"
- >
- <el-date-picker
- clearable
- size="small"
- v-model="form.jobDate"
- type="date"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- <div class="jiben">备注</div>
- <el-form-item prop="remark">
- <el-input
- v-model="form.remark"
- type="textarea"
- placeholder="请输入内容"
- />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- listFlats,
- getFlats,
- delFlats,
- addFlats,
- updateFlats,
- exportFlats,
- } from "@/api/barracksManagement/flats";
- import { getDicts } from "@/api/system/dict/data";
- import Treeselect from "@riophae/vue-treeselect";
- import "@riophae/vue-treeselect/dist/vue-treeselect.css";
- import { getDept2 } from "@/api/grassrootsregistration/bdglmeeting";
- import { deptUser } from "@/api/doormanManage/bdglVisit";
- import { allUser, getDeptList } from "@/api/workingArrangements/workTask";
- export default {
- name: "Flats",
- components: { Treeselect },
- data() {
- return {
- // 执行单位列表
- users: [],
- // 遮罩层
- loading: true,
- // 导出遮罩层
- exportLoading: false,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 公寓住房申请人员资格审查登记表格数据
- flatsList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- unitId: null,
- peopleId: null,
- duty: null,
- whether: null,
- grade: null,
- houseType: null,
- birthDate: null,
- enlistDate: null,
- jobTime: null,
- entranceDate: null,
- jobDate: null,
- jobsDate: null,
- whethers: null,
- rankId: null,
- rankDate: null,
- createtime: null,
- updatetime: null,
- adminId: null,
- pName: null,
- pUnit: null,
- pAccount: null,
- pTime: null,
- pTimeOne: null,
- pCeace: null,
- type: null,
- },
- // 查询字典
- dictType: {
- dictType: "accommodation_type",
- // 军衔
- dictType1: "sys_user_rank",
- },
- ziDian: [],
- ziDian1: [],
- // 单位
- getdeptList: [],
- // 表单参数
- form: {},
- rylist: [],
- executor: [],
- // 表单校验
- rules: {
- enlistDate: [
- { required: true, message: "入伍年月不能为空", trigger: "blur" },
- ],
- // rankId: [{ required: true, message: "军衔不能为空", trigger: "blur" }],
- rankDate: [
- { required: true, message: "军衔时间不能为空", trigger: "blur" },
- ],
- },
- };
- },
- created() {
- this.getList();
- this.getdict();
- this.getdict1();
- allUser().then((res) => {
- this.rylist = res.rows;
- // console.log(this.rylist);
- });
- getDeptList().then((res) => {
- // console.log(res.data)
- this.getdeptList = res.data;
- // console.log(this.getdeptList);
- });
- // this.selectPeo1)()
- this.selectPeo1();
- // this.selectPeo()
- },
- methods: {
- unit4Format(row, column) {
- // console.log(row)
- var deptName = "";
- // console.log(this.ziDian1)
- // console.log(row.type)
- this.ziDian1.map((item) => {
- // console.log(item)
- // console.log(item.dictSort,item.dictLabel)
- if (item.dictSort == row.rankId) {
- // console.log(item.dictLabel)
- deptName = item.dictLabel;
- }
- });
- return deptName;
- },
- // 查询计划类型
- getdict1() {
- getDicts(this.dictType.dictType).then((res) => {
- // console.log(res);
- this.ziDian = res.data;
- // console.log(this.ziDian);
- });
- },
- // 查询计划类型
- getdict() {
- getDicts(this.dictType.dictType1).then((res) => {
- // console.log(res);
- this.ziDian1 = res.data;
- // console.log(this.ziDian1);
- });
- },
- // 军衔
- junxian(id, name) {
- this.form.rankId = id;
- this.form.rankName = name;
- // console.log(id)
- },
- // peopleIds(val){
- // this.form.peopleId=val.id;
- // this.form.peopleName=val.name;
- // console.log(val)
- // // console.log(item
- // this.form.rankId=val.rankId
- // // getDicts(this.dictType.dictType1).then((res) => {
- // // this.ziDian1 = res.data;
- // // this.ziDian1.map((item) => {
- // // if (item.dictSort == row.type) {
- // // this.ziDian1 = item.dictLabel;
- // // }
- // // });
- // // });
- // },
- peopleIds(name,item){
- console.log(item.rankId)
- this.form.rankName=""
- this.form.peopleName=name
- this.form.rankId=item.rankId
- console.log(this.form.rankId)
- this.ziDian1.forEach(item=>{
- if(this.form.rankId==item.dictSort)
- this.form.rankName=item.dictLabel
- // console.log(this.form.rankName)
- })
- // console.log(this.form.rankId)
- },
- peopleIds1(id, name) {
- this.queryParams.id = id;
- this.queryParams.peopleName = name;
- // console.log(id);
- },
- // 到访单位选中触发
- selectPeo1(val) {
- // 获取执行单位列表
- getDept2().then((res) => {
- // console.log(res,2)
- this.users = res.data;
- // console.log(this.users);
- });
- this.queryParams.unitId = val.id;
- this.queryParams.peopleName = "";
- this.queryParams.unitName = val.label;
- // console.log(this.queryParams);
- this.getZhuChi(this.queryParams.unitId);
- },
- // 获取执行人
- getZhuChi(id) {
- // console.log(id)
- deptUser(id).then((res) => {
- this.executor = res.data;
- // console.log(this.executor)
- // this.form.unitName=this.executor
- });
- },
- // 到访单位选中触发
- selectPeo(val) {
- // console.log(val)
- this.form.unitId = val.id;
- // console.log(val)
- this.form.peopleName = "";
- this.form.name=""
- this.form.rankName=""
- this.form.peopleId=""
- // this.form.name=""
- this.form.unitName = val.label;
- // console.log(this.form.unitId)
- this.getZhuChi(this.form.unitId);
- },
- // // 查询计划类型
- // getdict() {
- // getDicts(this.dictType.dictType).then((res) => {
- // this.ziDian = res.data;
- // });
- // getDicts(this.dictType.dictType1).then((res) => {
- // this.ziDian1 = res.data;
- // });
- // },
- /** 查询公寓住房申请人员资格审查登记列表 */
- getList() {
- this.loading = true;
- listFlats(this.queryParams).then((response) => {
- this.flatsList = response.rows;
- console.log(this.flatsList);
- this.total = response.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- unitId: null,
- peopleId: null,
- duty: null,
- whether: null,
- grade: null,
- houseType: null,
- birthDate: null,
- enlistDate: null,
- jobTime: null,
- entranceDate: null,
- jobDate: null,
- jobsDate: null,
- whethers: null,
- rankId: null,
- rankDate: null,
- remark: null,
- createtime: null,
- updatetime: null,
- adminId: null,
- pName: null,
- pUnit: null,
- pAccount: null,
- pTime: null,
- pTimeOne: null,
- pCeace: null,
- type: null,
- };
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- // this.queryParams.name=""
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.queryParams = {};
- this.getList();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.id);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "添加公寓住房申请人员资格审查登记";
- // 获取执行单位列表
- getDept2().then((res) => {
- // console.log(res,2)
- this.users = res.data;
- // console.log(this.users);
- });
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.reset();
- const id = row.id || this.ids;
- getFlats(id).then((response) => {
- this.form = response.data;
- // this.form.name=this.form.peopleName
- // console.log(this.form)
- this.form.peopleId=this.form.peopleName
- // this.executor.forEach
- this.ziDian1.forEach(item=>{
- if(item.dictSort==this.form.rankId){
- this.form.rankName=item.dictLabel
- // console.log(this.form.rankName)
- }
- })
- this.open = true;
- this.title = "修改公寓住房申请人员资格审查登记";
- });
- },
- /** 提交按钮 */
- submitForm() {
- console.log(this.form);
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.id != null) {
- updateFlats(this.form).then((response) => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addFlats(this.form).then((response) => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal
- .confirm("是否确认删除?")
- .then(function () {
- return delFlats(ids);
- })
- .then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- })
- .catch(() => {});
- },
- /** 导出按钮操作 */
- handleExport() {
- const queryParams = this.queryParams;
- this.$modal
- .confirm("是否确认导出所有公寓住房申请人员资格审查登记数据项?")
- .then(() => {
- this.exportLoading = true;
- return exportFlats(queryParams);
- })
- .then((response) => {
- this.$download.name(response.msg);
- this.exportLoading = false;
- })
- .catch(() => {});
- },
- },
- };
- </script>
- <style scoped>
- ::v-deep .el-dialog {
- background-color: #004d86 !important;
- }
- /* 输入框 */
- ::v-deep .el-dialog .el-input__inner {
- background-color: #004d86 !important;
- width: 216px;
- color: white;
- margin-right: 20px;
- }
- /* 标题弹框 */
- ::v-deep .el-dialog__title {
- color: white;
- /* border-bottom: 1px solid white; */
- }
- /* 标题下划线 */
- ::v-deep .el-dialog__header {
- border-bottom: 1px solid white;
- }
- /* 文本域 */
- ::v-deep .el-textarea__inner {
- width: 1117px;
- height: 80px;
- margin-left: -20px;
- }
- ::v-deep .el-form-item__label {
- text-align: end;
- }
- ::v-deep .el-dialog__body {
- padding: 0px;
- margin-left: 20px;
- margin-top: 20px;
- }
- ::v-deep .el-table .el-table__header-wrapper th,
- .el-table .el-table__fixed-header-wrapper th {
- background-color: rgb(0, 60, 105);
- color: white;
- }
- ::v-deep .el-input__suffix {
- right: 20px;
- }
- ::v-deep .zhufnag .el-form-item__label {
- margin-left: 16px;
- }
- /* 树形样式 */
- ::v-deep .vue-treeselect__control {
- background-color: #004d86;
- width: 216px;
- margin-right: 25px;
- color: white;
- }
- .threeselects {
- width: 216px;
- margin-right: 22px;
- }
- .peiou .el-input__inner{
- width: 300px;
- }
- ::v-deep .vue-treeselect__single-value {
- color: white;
- }
- ::v-deep .el-date-editor .el-input__inner {
- height: 36px;
- }
- ::v-deep .vue-treeselect__control {
- background-color: transparent;
- }
- ::v-deep .el-table__cell .cell {
- text-align: center;
- }
- ::v-deep .el-select .el-input__inner {
- background-color: transparent;
- color: white;
- }
- /* 文字多余部分省略 */
- ::v-deep .el-table__cell .cell {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- /* 调整输入框提示文字颜色 */
- ::v-deep .vue-treeselect__placeholder {
- color: #bdbdbd4f !important;
- }
- ::v-deep input::-webkit-input-placeholder {
- color: #bdbdbd4f !important;
- }
- ::v-deep input:-moz-placeholder {
- color: #bdbdbd4f !important;
- }
- ::v-deep .peiou .el-date-editor .el-input__inner{
- width: 330px;
- }
- ::v-deep .shifou .el-input--medium .el-input__inner{
- width: 330px;
- }
- ::v-deep .shifou1 .el-input--medium .el-input__inner{
- width: 330px;
- }
- ::v-deep .el-form-item__label{
- margin-left: 25px;
- }
- ::v-deep .peious .el-input__inner{
- width: 351px;
- }
- ::v-deep .el-form{
- margin-left: 30px;
- }
- .jiben{
- margin-left: -20px;
- }
- </style>
|