This commit is contained in:
2025-07-20 19:20:12 +08:00
parent 83d732d805
commit b8f943ca79
7 changed files with 104 additions and 158 deletions

View File

@ -3,23 +3,12 @@
<div class="head_box">
<span class="title">社会信息人员建设管理{{ title }} </span>
<div>
<el-button
type="primary"
size="small"
:loading="loading"
@click="submit"
>保存</el-button
>
<el-button type="primary" size="small" :loading="loading" @click="submit">保存</el-button>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="form_cnt">
<FormMessage
v-model="listQuery"
:formList="formData"
ref="elform"
:rules="rules"
></FormMessage>
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules"></FormMessage>
</div>
</div>
</template>
@ -91,12 +80,12 @@ const validateIdentity = () => {
callback(new Error("身份证地区非法"));
// 出生日期验证
var sBirthday = (
value.substr(6, 4) +
"-" +
Number(value.substr(10, 2)) +
"-" +
Number(value.substr(12, 2))
).replace(/-/g, "-"),
value.substr(6, 4) +
"-" +
Number(value.substr(10, 2)) +
"-" +
Number(value.substr(12, 2))
).replace(/-/g, "-"),
d = new Date(sBirthday);
let yyyy = d.getFullYear();
let mm = d.getMonth() + 1;
@ -166,7 +155,7 @@ const rules = reactive({
],
...rule.phoneRule({ require: true, validator: true }, "ryLxdh") // 是否必填 是否进行校验 可以传第二个参数
});
onMounted(() => {});
onMounted(() => { });
// 初始化数据
const init = (type, row) => {
@ -195,7 +184,7 @@ const submit = () => {
emit("updateDate");
close();
})
.catch(() => {});
.catch(() => { });
});
};

View File

@ -3,68 +3,39 @@
<div class="titleBox">
<PageTitle title="社会信息人员建设管理">
<el-button type="primary" @click="addEdit('add', '')">
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
<el-icon style="vertical-align: middle">
<CirclePlus />
</el-icon>
<span style="vertical-align: middle">新增</span>
</el-button>
<el-button type="primary" @click="importData">
<el-icon style="vertical-align: middle"><Upload /></el-icon>
<span style="vertical-align: middle">导入</span>
</el-button>
<el-button type="primary" @click="exportData">
<el-icon style="vertical-align: middle"><Download /></el-icon>
<span style="vertical-align: middle">导出</span>
</el-button>
</PageTitle>
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search
:searchArr="searchConfiger"
@submit="onSearch"
:key="pageData.keyCount"
/>
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"
>
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
@chooseData="chooseData">
<template #ryMz="{ row }">
<DictTag :tag="false" :value="row.ryMz" :options="D_BZ_MZ" />
</template>
<!-- 操作 -->
<template #controls="{ row }">
<el-link size="small" type="success" @click="addEdit('edit', row)"
>编辑</el-link
>
<el-link size="small" type="danger" @click="deleteRow(row.id)"
>删除</el-link
>
<el-link size="small" type="success" @click="addEdit('edit', row)">编辑</el-link>
<el-link size="small" type="danger" @click="deleteRow(row.id)">删除</el-link>
</template>
</MyTable>
<Pages
@changeNo="changeNo"
@changeSize="changeSize"
:tableHeight="pageData.tableHeight"
:pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"
></Pages>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
<!-- 详情 -->
<DetailForm
v-if="show"
@updateDate="getList"
ref="detailDiloag"
:dic="{ D_BZ_WHCD, D_BZ_MZ, D_BZ_XB, D_BZ_ZZMM }"
/>
<DetailForm v-if="show" @updateDate="getList" ref="detailDiloag"
:dic="{ D_BZ_WHCD, D_BZ_MZ, D_BZ_XB, D_BZ_ZZMM }" />
</div>
</template>
@ -76,7 +47,6 @@ import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/addForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
import { CirclePlus, Upload, Download } from "@element-plus/icons-vue";
import { ElMessage } from "element-plus";
const { proxy } = getCurrentInstance();
const { D_BZ_WHCD, D_BZ_MZ, D_BZ_XB, D_BZ_ZZMM } = proxy.$dict(
@ -111,7 +81,7 @@ const pageData = reactive({
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 200,
controlsWidth: 120,
tableColumn: [
{ label: "姓名", prop: "ryXm" },
{ label: "联系电话", prop: "ryLxdh" },
@ -169,7 +139,7 @@ const deleteRow = (id) => {
getList();
});
})
.catch(() => {});
.catch(() => { });
};
// 详情