修改运维数据

This commit is contained in:
yangjun 2026-03-10 09:17:22 +08:00
parent 0d4f9adf0e
commit d28f94c404
2 changed files with 91 additions and 50 deletions

View File

@ -15,53 +15,72 @@ export const columns: BasicColumn[] = [
dataIndex: 'openId',
width: 220
},
{
title: '名称',
align: "center",
dataIndex: 'name',
width: 120
},
{
title: '电话',
align: "center",
dataIndex: 'tel',
width: 100
},
{
title: '咨询类型',
dataIndex: 'advisoryType',
width: 100,
customRender:({text})=>{
if(text == '1'){
return "家属";
}else if(text == '2'){
return "员工";
}else if(text == '3'){
return "公司";
}else if(text == '4'){
return "供应商";
}else{
return "其他";
}
},
},
{
title: '机构名称',
align: "center",
dataIndex: 'comName',
width: 240
},
// {
// title: '咨询类型',
// dataIndex: 'advisoryType',
// width: 100,
// customRender:({text})=>{
// if(text == '1'){
// return "家属";
// }else if(text == '2'){
// return "员工";
// }else if(text == '3'){
// return "公司";
// }else if(text == '4'){
// return "供应商";
// }else{
// return "其他";
// }
// },
// },
// {
// title: '机构名称',
// align: "center",
// dataIndex: 'comName',
// width: 240
// },
{
title: '注册时间',
align: "center",
dataIndex: 'createTime',
width: 160
},
// {
// title: '申请时间',
// align: "center",
// dataIndex: 'updateTime',
// width: 160
// },
{
title: '申请时间',
title: '是否是员工',
align: "center",
dataIndex: 'updateTime',
width: 160
dataIndex: 'type1',
width: 100
},
{
title: '是否是供应商',
align: "center",
dataIndex: 'type2',
width: 100
},
{
title: '是否是机构',
align: "center",
dataIndex: 'type3',
width: 100
},
{
title: '是否是长者',
align: "center",
dataIndex: 'type4',
width: 100
},
];

View File

@ -9,6 +9,24 @@
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'type1'">
<span style="color: red;font-weight: 700;font-size: 16px;" v-if="text == '0'">×</span>
<span style="color: green;font-weight: 700;font-size: 16px;" v-else-if="text == '1'"></span>
</template>
<template v-if="column.dataIndex === 'type2'">
<span style="color: red;font-weight: 700;font-size: 16px;" v-if="text == '0'">×</span>
<span style="color: green;font-weight: 700;font-size: 16px;" v-else-if="text == '1'"></span>
</template>
<template v-if="column.dataIndex === 'type3'">
<span style="color: red;font-weight: 700;font-size: 16px;" v-if="text == '0'">×</span>
<span style="color: green;font-weight: 700;font-size: 16px;" v-else-if="text == '1'"></span>
</template>
<template v-if="column.dataIndex === 'type4'">
<span style="color: red;font-weight: 700;font-size: 16px;" v-if="text == '0'">×</span>
<span style="color: green;font-weight: 700;font-size: 16px;" v-else-if="text == '1'"></span>
</template>
</template>
</BasicTable>
</div>
</template>
@ -80,14 +98,6 @@ async function handleDelete(record, type) {
*/
function getTableAction(record) {
return [
{
label: '清除长者',
popConfirm: {
title: '是否确认清除长者',
confirm: handleClean.bind(null, record, '1'),
placement: 'topLeft',
},
},
{
label: '清除员工',
popConfirm: {
@ -95,14 +105,7 @@ function getTableAction(record) {
confirm: handleClean.bind(null, record, '2'),
placement: 'topLeft',
},
},
{
label: '清除机构',
popConfirm: {
title: '是否确认清除机构',
confirm: handleClean.bind(null, record, '3'),
placement: 'topLeft',
},
ifShow: record.type1 == '1'
},
{
label: '清除供应商',
@ -111,12 +114,31 @@ function getTableAction(record) {
confirm: handleClean.bind(null, record, '4'),
placement: 'topLeft',
},
ifShow: record.type2 == '1'
},
{
label: '清除机构',
popConfirm: {
title: '是否确认清除机构',
confirm: handleClean.bind(null, record, '3'),
placement: 'topLeft',
},
ifShow: record.type3 == '1'
},
{
label: '清除长者',
popConfirm: {
title: '是否确认清除长者',
confirm: handleClean.bind(null, record, '1'),
placement: 'topLeft',
},
ifShow: record.type4 == '1'
},
{
label: '清除所有',
popConfirm: {
title: '是否确认清除所有',
confirm: handleDelete.bind(null, record, '1'),
confirm: handleDelete.bind(null, record, '-1'),
placement: 'topLeft',
},
},