|
@@ -0,0 +1,505 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
+ <el-form-item label="开户企业" prop="enterpriseId">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.enterpriseId"
|
|
|
|
+ placeholder="请输入开户企业"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="用户类别" prop="enterpriseUserType">
|
|
|
|
+ <el-select v-model="queryParams.enterpriseUserType" placeholder="请选择用户类别" clearable size="small">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in dict.type.enterprise_user_type"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </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-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="['housingconstruction:realnameuser: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="['housingconstruction:realnameuser: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="['housingconstruction:realnameuser:remove']"
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="warning"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleExport"
|
|
|
|
+ v-hasPermi="['housingconstruction:realnameuser:export']"
|
|
|
|
+ >导出
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ <el-table v-loading="loading" :data="realnameuserList" @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
|
+ <el-table-column label="开户企业" align="center">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{ getEnterpriseName(scope.row.enterpriseId) }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="用户类别" align="center" prop="enterpriseUserType">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <dict-tag :options="dict.type.enterprise_user_type" :value="scope.row.enterpriseUserType"/>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="用户代码" align="center" prop="userCode"/>
|
|
|
|
+ <el-table-column label="用户姓名" align="center" prop="userName"/>
|
|
|
|
+ <el-table-column label="用气地址" align="center" prop="gasAddress"/>
|
|
|
|
+ <el-table-column label="证照代码" align="center" prop="licenseCode"/>
|
|
|
|
+ <el-table-column label="联系电话" align="center" prop="contactNumber"/>
|
|
|
|
+ <el-table-column label="开户时间" align="center" prop="accountOpenTime" width="180">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{ parseTime(scope.row.accountOpenTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="部门名称" align="center" prop="deptName"/>
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
|
+ v-hasPermi="['housingconstruction:realnameuser:edit']"
|
|
|
|
+ >修改
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
|
+ v-hasPermi="['housingconstruction:realnameuser: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="1000px" append-to-body class="form-style">
|
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="开户企业" prop="enterpriseId">
|
|
|
|
+ <el-select v-model="form.enterpriseId" placeholder="请选择开户企业">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="data in enterpriseList"
|
|
|
|
+ :key="data.id"
|
|
|
|
+ :label="data.enterpriseName"
|
|
|
|
+ :value="data.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="用户类别" prop="enterpriseUserType">
|
|
|
|
+ <el-select v-model="form.enterpriseUserType" placeholder="请选择用户类别">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in dict.type.enterprise_user_type"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="用户姓名" prop="userName">
|
|
|
|
+ <el-input v-model="form.userName" placeholder="请输入用户姓名"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="证照代码" prop="licenseCode">
|
|
|
|
+ <el-input v-model="form.licenseCode" placeholder="请输入证照代码"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="用户代码" prop="userCode">
|
|
|
|
+ <el-input v-model="form.userCode" placeholder="请输入用户代码"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="开户时间" prop="accountOpenTime">
|
|
|
|
+ <el-date-picker clearable size="small"
|
|
|
|
+ v-model="form.accountOpenTime"
|
|
|
|
+ type="date"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ placeholder="选择开户时间">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="用气地址" prop="gasAddress">
|
|
|
|
+ <el-input v-model="form.gasAddress" placeholder="请输入用气地址(城区、街道、社区、小区或道路、门牌号)"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="联系电话" prop="contactNumber">
|
|
|
|
+ <el-input v-model="form.contactNumber" placeholder="请输入联系电话"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="经度" prop="longitude" @dblclick.native="showMap">
|
|
|
|
+ <el-input v-model="form.longitude" placeholder="鼠标双击选择经纬度"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="纬度" prop="latitude" @dblclick.native="showMap">
|
|
|
|
+ <el-input v-model="form.latitude" placeholder="鼠标双击选择经纬度"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="所属部门" prop="deptId">
|
|
|
|
+ <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
|
|
|
|
+ placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </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>
|
|
|
|
+ <el-dialog :title="titleLongitude" :visible.sync="showLongitude" append-to-body>
|
|
|
|
+ <el-input v-show="false" v-model="form.longitude" disabled></el-input>
|
|
|
|
+ <el-input v-show="false" v-model="form.latitude" disabled></el-input>
|
|
|
|
+ <supermap style="width: 100%;height: 500px;" :mapDiv="'landingMap'" :mapSite="{doubleClickZoom:false}"
|
|
|
|
+ :codes="['9fa5']" :isSideBySide="false" :showLatLng="showLatLng"></supermap>
|
|
|
|
+ <el-button type="primary" @click="showLongitude=false">确定</el-button>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <ISuperMap ref="ISuperMap" v-if="ISuperMapvisible" @send="send"/>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import {
|
|
|
|
+ addRealnameuser,
|
|
|
|
+ delRealnameuser,
|
|
|
|
+ getRealnameuser,
|
|
|
|
+ listRealnameuser,
|
|
|
|
+ updateRealnameuser
|
|
|
|
+} from "@/api/data/housingconstruction/realnameuser";
|
|
|
|
+import {getListAll} from "@/api/data/housingconstruction/enterprise"
|
|
|
|
+import deptselector from "@/views/components/deptselector.vue";
|
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
+import ISuperMap from "@/views/data/common/ISuperMap.vue";
|
|
|
|
+import supermap from "@/views/components/supermap.vue";
|
|
|
|
+import DataImageUpload from "@/components/ImageUpload/dataUpload.vue";
|
|
|
|
+import {treeselect} from "@/api/system/dept";
|
|
|
|
+import {checkLat, checkLon, validPhoneMobile} from "@/api/rules/rules";
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: "Realnameuser",
|
|
|
|
+ components: {deptselector, Treeselect, supermap, ISuperMap,DataImageUpload},
|
|
|
|
+ dicts: ['enterprise_user_type'],
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ titleLongitude: '',
|
|
|
|
+ showLongitude: false,
|
|
|
|
+ ISuperMapvisible: false,
|
|
|
|
+ // 遮罩层
|
|
|
|
+ loading: true,
|
|
|
|
+ // 选中数组
|
|
|
|
+ ids: [],
|
|
|
|
+ // 非单个禁用
|
|
|
|
+ single: true,
|
|
|
|
+ // 非多个禁用
|
|
|
|
+ multiple: true,
|
|
|
|
+ // 显示搜索条件
|
|
|
|
+ showSearch: true,
|
|
|
|
+ // 总条数
|
|
|
|
+ total: 0,
|
|
|
|
+ // 住建-实名用户表格数据
|
|
|
|
+ realnameuserList: [],
|
|
|
|
+ //企业信息列表
|
|
|
|
+ enterpriseList: [],
|
|
|
|
+ // 弹出层标题
|
|
|
|
+ title: "",
|
|
|
|
+ // 是否显示弹出层
|
|
|
|
+ open: false,
|
|
|
|
+ // 查询参数
|
|
|
|
+ queryParams: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ enterpriseId: null,
|
|
|
|
+ enterpriseUserType: null,
|
|
|
|
+ },
|
|
|
|
+ // 表单参数
|
|
|
|
+ form: {},
|
|
|
|
+ // 表单校验
|
|
|
|
+ rules: {
|
|
|
|
+ enterpriseId: [
|
|
|
|
+ {required: true, message: "开户企业不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ enterpriseUserType: [
|
|
|
|
+ {required: true, message: "用户类别不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ userCode: [
|
|
|
|
+ {required: true, message: "用户代码不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ userName: [
|
|
|
|
+ {required: true, message: "用户姓名不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ gasAddress: [
|
|
|
|
+ {required: true, message: "用气地址不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ licenseCode: [
|
|
|
|
+ {required: true, message: "证件代码不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ contactNumber: [
|
|
|
|
+ {validator: validPhoneMobile, trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ accountOpenTime: [
|
|
|
|
+ {required: true, message: "开户时间不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ licensePeriodStart: [
|
|
|
|
+ {required: true, message: "许可期限开始时间不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ licensePeriodEnd: [
|
|
|
|
+ {required: true, message: "许可期限结束时间不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ issuingAuthority: [
|
|
|
|
+ {required: true, message: "发证机关不能为空", trigger: "blur"}
|
|
|
|
+ ],
|
|
|
|
+ longitude: [
|
|
|
|
+ {required: true, message: '经度不能为空', trigger: ['change', 'blur']},
|
|
|
|
+ {validator: checkLon, trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ latitude: [
|
|
|
|
+ {required: true, message: '纬度不能为空', trigger: ['change', 'blur']},
|
|
|
|
+ {validator: checkLat, trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getList();
|
|
|
|
+ this.getTreeselect();
|
|
|
|
+ this.getEnterpriseList();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ getEnterpriseName(id) {
|
|
|
|
+ const enterprise = this.enterpriseList.find(e => e.id === id);
|
|
|
|
+ return enterprise ? enterprise.enterpriseName : '未知企业';
|
|
|
|
+ },
|
|
|
|
+ getEnterpriseList(){
|
|
|
|
+ getListAll().then(res=>{
|
|
|
|
+ this.enterpriseList = res.data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ showLatLng: function (lat, lng) {
|
|
|
|
+ this.form.latitude = lat
|
|
|
|
+ this.form.longitude = lng
|
|
|
|
+ },
|
|
|
|
+ send(val) {
|
|
|
|
+ if (val === true) {
|
|
|
|
+ this.ISuperMapvisible = false;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (this.sign === 1) {
|
|
|
|
+ this.form.longitude = val.longitude;
|
|
|
|
+ this.form.latitude = val.latitude;
|
|
|
|
+ }
|
|
|
|
+ if (this.sign === 2 || this.sign === 3) this.form.longitude = val.xiantude;//this.form.longitude 换成对应的线或区域的字段
|
|
|
|
+ this.ISuperMapvisible = false
|
|
|
|
+ },
|
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
|
+ getTreeselect() {
|
|
|
|
+ treeselect().then(response => {
|
|
|
|
+ this.deptOptions = response.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ hx(node) {
|
|
|
|
+ this.form.dataDeptId = node.id
|
|
|
|
+ this.form.deptId = node.id
|
|
|
|
+ this.form.deptName = node.label
|
|
|
|
+ this.$refs.form.validateField("deptId")
|
|
|
|
+ },
|
|
|
|
+ showMap() {
|
|
|
|
+ this.ISuperMapvisible = true;
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.ISuperMap.init(this.sign, {
|
|
|
|
+ id: this.form.id,
|
|
|
|
+ longitude: this.form.longitude,
|
|
|
|
+ latitude: this.form.latitude,
|
|
|
|
+ xiantude: this.form.longitude//this.form.longitude换成每个页面对应线或者面对应的字段
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ /** 查询住建-实名用户列表 */
|
|
|
|
+ getList() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ listRealnameuser(this.queryParams).then(response => {
|
|
|
|
+ this.realnameuserList = response.rows;
|
|
|
|
+ this.total = response.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 取消按钮
|
|
|
|
+ cancel() {
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.reset();
|
|
|
|
+ },
|
|
|
|
+ // 表单重置
|
|
|
|
+ reset() {
|
|
|
|
+ this.form = {
|
|
|
|
+ id: null,
|
|
|
|
+ enterpriseId: null,
|
|
|
|
+ enterpriseUserType: null,
|
|
|
|
+ userCode: null,
|
|
|
|
+ userName: null,
|
|
|
|
+ gasAddress: null,
|
|
|
|
+ licenseCode: null,
|
|
|
|
+ contactNumber: null,
|
|
|
|
+ accountOpenTime: null,
|
|
|
|
+ longitude: null,
|
|
|
|
+ latitude: null,
|
|
|
|
+ createTime: null,
|
|
|
|
+ createBy: null,
|
|
|
|
+ createName: null,
|
|
|
|
+ updateTime: null,
|
|
|
|
+ updateBy: null,
|
|
|
|
+ updateName: null,
|
|
|
|
+ deptId: null,
|
|
|
|
+ deptName: null
|
|
|
|
+ };
|
|
|
|
+ this.resetForm("form");
|
|
|
|
+ },
|
|
|
|
+ /** 搜索按钮操作 */
|
|
|
|
+ handleQuery() {
|
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ /** 重置按钮操作 */
|
|
|
|
+ resetQuery() {
|
|
|
|
+ this.resetForm("queryForm");
|
|
|
|
+ this.handleQuery();
|
|
|
|
+ },
|
|
|
|
+ // 多选框选中数据
|
|
|
|
+ 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 = "添加实名用户";
|
|
|
|
+ },
|
|
|
|
+ /** 修改按钮操作 */
|
|
|
|
+ handleUpdate(row) {
|
|
|
|
+ this.reset();
|
|
|
|
+ const id = row.id || this.ids
|
|
|
|
+ getRealnameuser(id).then(response => {
|
|
|
|
+ this.form = response.data;
|
|
|
|
+ this.open = true;
|
|
|
|
+ this.title = "修改实名用户";
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 提交按钮 */
|
|
|
|
+ submitForm() {
|
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (this.form.id != null) {
|
|
|
|
+ updateRealnameuser(this.form).then(response => {
|
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ addRealnameuser(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 delRealnameuser(ids);
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getList();
|
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 导出按钮操作 */
|
|
|
|
+ handleExport() {
|
|
|
|
+ this.download('housingconstruction/realnameuser/export', {
|
|
|
|
+ ...this.queryParams
|
|
|
|
+ }, `实名用户_${new Date().getTime()}.xlsx`)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+</script>
|