|
@@ -64,6 +64,7 @@
|
|
|
</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="T01010307" @click="onChangeStatus(record.userID,record.recordStatus==1?0:1)" >{{ record.recordStatus==1?"禁用":"启用" }}</a-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</template>
|
|
@@ -84,6 +85,7 @@ import {getPaginationTotalTitle} from "@/utils/common";
|
|
|
import {getSiteList} from "@/api/baseSettings/siteInfo";
|
|
|
import BImportExcel from "@/components/basic/excel/importExcel/importExcel.vue";
|
|
|
import type {ImportProps} from "@/components/basic/excel/importExcel/ImportProps";
|
|
|
+import {updateUserStatus} from "@/api/system/user";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'UserInfoList',
|
|
@@ -118,8 +120,11 @@ export default defineComponent({
|
|
|
{title: '性别', dataIndex: 'genderName', key: 'genderName', align: "center"},
|
|
|
{title: '联系电话', dataIndex: 'mobile', key: 'mobile', align: "center"},
|
|
|
{title: '年龄', dataIndex: 'age', key: 'age', align: "center"},
|
|
|
+ {title: '状态', dataIndex: 'recordStatus', key: 'recordStatus', align: "center",
|
|
|
+ customRender: ({record}) => record.recordStatus == 1?"正常":"禁用"
|
|
|
+ },
|
|
|
{title: '所属驿站', dataIndex: 'siteName', key: 'siteName', align: "center"},
|
|
|
- {title: '操作', key: 'operation', fixed: 'right', width: 150, align: "center"},
|
|
|
+ {title: '操作', key: 'operation', fixed: 'right', align: "center"},
|
|
|
];
|
|
|
const importOptions = ref<ImportProps>({
|
|
|
title: '导入',
|
|
@@ -210,6 +215,10 @@ export default defineComponent({
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+ const onChangeStatus = (userID: any,statusValue:any) => {
|
|
|
+ updateUserStatus({ userId: userID,status:statusValue });
|
|
|
+ loadData();
|
|
|
+ };
|
|
|
|
|
|
const loadData = async function () {
|
|
|
formState.loading = true;
|
|
@@ -246,6 +255,7 @@ export default defineComponent({
|
|
|
onAdd,
|
|
|
onEdit,
|
|
|
onDel,
|
|
|
+ onChangeStatus,
|
|
|
loadData,
|
|
|
onDetail,
|
|
|
importOptions,
|