|
@@ -41,6 +41,10 @@
|
|
<a-row class="edit-operation">
|
|
<a-row class="edit-operation">
|
|
<a-col :span="24" style="text-align: right">
|
|
<a-col :span="24" style="text-align: right">
|
|
<a-button type="primary" html-type="submit" functioncode="T01010302" @click='onAdd' >新增</a-button>
|
|
<a-button type="primary" html-type="submit" functioncode="T01010302" @click='onAdd' >新增</a-button>
|
|
|
|
+ <BImportExcel functioncode="T01010306"
|
|
|
|
+ :options="importOptions"
|
|
|
|
+ @success="loadData"
|
|
|
|
+ ></BImportExcel>
|
|
<BExportExcel :title="'导出'" :filename="'驿站人员信息'" :url="'userInfo/export'" :params="{...searchParams, rows:100000,siteUserIDList:formState.selectedRowKeys.join(',')}"></BExportExcel>
|
|
<BExportExcel :title="'导出'" :filename="'驿站人员信息'" :url="'userInfo/export'" :params="{...searchParams, rows:100000,siteUserIDList:formState.selectedRowKeys.join(',')}"></BExportExcel>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -55,6 +59,8 @@
|
|
<template #bodyCell="{ column, text, record }">
|
|
<template #bodyCell="{ column, text, record }">
|
|
<template v-if="column.key === 'operation'">
|
|
<template v-if="column.key === 'operation'">
|
|
<div class="table-operation">
|
|
<div class="table-operation">
|
|
|
|
+ <a-button type="link" size="small" functioncode="T01010301" @click='onDetail(record.siteUserID)'>查看
|
|
|
|
+ </a-button>
|
|
<a-button type="link" size="small" functioncode="T01010303" @click='onEdit(record.siteUserID)' >编辑</a-button>
|
|
<a-button type="link" size="small" functioncode="T01010303" @click='onEdit(record.siteUserID)' >编辑</a-button>
|
|
<a-button type="link" size="small" functioncode="T01010304" @click="onDel(record)" >删除</a-button>
|
|
<a-button type="link" size="small" functioncode="T01010304" @click="onDel(record)" >删除</a-button>
|
|
</div>
|
|
</div>
|
|
@@ -75,10 +81,12 @@ import {delSiteUser, getSiteUserList} from '@/api/baseSettings/userInfo';
|
|
import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
|
|
import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
|
|
import {getPaginationTotalTitle} from "@/utils/common";
|
|
import {getPaginationTotalTitle} from "@/utils/common";
|
|
import {getSiteList} from "@/api/baseSettings/siteInfo";
|
|
import {getSiteList} from "@/api/baseSettings/siteInfo";
|
|
|
|
+import BImportExcel from "@/components/basic/excel/importExcel/importExcel.vue";
|
|
|
|
+import type {ImportProps} from "@/components/basic/excel/importExcel/ImportProps";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'UserInfoList',
|
|
name: 'UserInfoList',
|
|
- components: {DownOutlined, UpOutlined, BExportExcel},
|
|
|
|
|
|
+ components: {BImportExcel, DownOutlined, UpOutlined, BExportExcel},
|
|
setup() {
|
|
setup() {
|
|
const formRef = ref<FormInstance>();
|
|
const formRef = ref<FormInstance>();
|
|
const tabsViewStore = useTabsViewStore();
|
|
const tabsViewStore = useTabsViewStore();
|
|
@@ -104,8 +112,26 @@ export default defineComponent({
|
|
{title: '联系电话', dataIndex: 'mobile', key: 'mobile', align: "center"},
|
|
{title: '联系电话', dataIndex: 'mobile', key: 'mobile', align: "center"},
|
|
{title: '身份证号', dataIndex: 'idCard', key: 'idCard', align: "center"},
|
|
{title: '身份证号', dataIndex: 'idCard', key: 'idCard', align: "center"},
|
|
{title: '所属驿站', dataIndex: 'siteName', key: 'siteName', align: "center"},
|
|
{title: '所属驿站', dataIndex: 'siteName', key: 'siteName', align: "center"},
|
|
- {title: '操作', key: 'operation', fixed: 'right',width:100, align: "center"},
|
|
|
|
|
|
+ {title: '操作', key: 'operation', fixed: 'right', width: 150, align: "center"},
|
|
];
|
|
];
|
|
|
|
+ const importOptions = ref<ImportProps>({
|
|
|
|
+ title: '导入',
|
|
|
|
+ url: 'userInfo/importSiteUser',
|
|
|
|
+ columns: [
|
|
|
|
+ {cnName: '姓名', enName: 'siteUserName', width: 100},
|
|
|
|
+ {cnName: '工号', enName: 'userNo', width: 100},
|
|
|
|
+ {cnName: '性别', enName: 'genderName', width: 100},
|
|
|
|
+ {cnName: '联系电话', enName: 'mobile', width: 100},
|
|
|
|
+ {cnName: '身份证号码', enName: 'idCard', width: 140},
|
|
|
|
+ {cnName: '用户类型', enName: 'roleName', width: 100},
|
|
|
|
+ {cnName: '所属驿站', enName: 'siteName', width: 100},
|
|
|
|
+ ],
|
|
|
|
+ template: {
|
|
|
|
+ tempFileName: '站点人员信息导入模板.xlsx',
|
|
|
|
+ url: '',
|
|
|
|
+ params: null,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
const pagination = computed(() => ({
|
|
const pagination = computed(() => ({
|
|
total: formState.total,
|
|
total: formState.total,
|
|
current: searchParams.pageIndex,
|
|
current: searchParams.pageIndex,
|
|
@@ -183,6 +209,10 @@ export default defineComponent({
|
|
tabsViewStore.addTabByPath('/baseSettings/user/edit', {id:id,op:2});
|
|
tabsViewStore.addTabByPath('/baseSettings/user/edit', {id:id,op:2});
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ const onDetail = (id: string) => {
|
|
|
|
+ tabsViewStore.addTabByPath('/baseSettings/user/detail', {id: id, op: 2});
|
|
|
|
+ };
|
|
|
|
+
|
|
return {
|
|
return {
|
|
formRef,
|
|
formRef,
|
|
allSites,
|
|
allSites,
|
|
@@ -197,7 +227,9 @@ export default defineComponent({
|
|
onAdd,
|
|
onAdd,
|
|
onEdit,
|
|
onEdit,
|
|
onDel,
|
|
onDel,
|
|
- loadData
|
|
|
|
|
|
+ loadData,
|
|
|
|
+ onDetail,
|
|
|
|
+ importOptions
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|