运维管理平台前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.4 KiB

3 months ago
<template>
<PageWrapper dense>
<BasicTable @register="registerTable">
<template #toolbar>
3 months ago
<a-button type="primary" @click="showFaultModal">故障上报</a-button>
3 months ago
</template>
<template #bodyCell="{ column, record }">
2 months ago
<template v-if="column && record && column.key === 'action'">
2 weeks ago
<a-button type="link" @click="showSendModal(record.id)">派遣</a-button>
2 months ago
<a-button type="link" @click="showDrawer(record.id)">详情</a-button>
</template>
3 months ago
</template>
</BasicTable>
<faultModal ref="faultModalRef" @success="reload()"/>
2 weeks ago
<detailDrawer ref="detailDrawerRef" />
<sendModal ref="sendModalRef" @success="reload()"/>
3 months ago
</PageWrapper>
</template>
<script setup lang="ts">
import { PageWrapper } from '@/components/Page';
import { BasicTable, useTable } from '@/components/Table';
2 weeks ago
import { list,getProjectInfo} from './api';
3 months ago
import { formSchemas, columns } from './data';
3 months ago
import faultModal from './faultModal.vue';
import detailDrawer from './detailDrawer.vue';
2 weeks ago
import sendModal from './sendModal.vue';
3 months ago
import { ref } from 'vue';
3 months ago
const [registerTable,{reload}] = useTable({
3 months ago
rowSelection: {
type: 'checkbox',
},
title: '工单派遣',
api: list,
showIndexColumn: true,
rowKey: 'id',
useSearchForm: true,
formConfig: {
schemas: formSchemas,
2 weeks ago
name: 'orderSend',
3 months ago
baseColProps: {
xs: 24,
sm: 24,
md: 24,
lg: 6,
},
},
columns: columns,
actionColumn: {
width: 200,
title: '操作',
key: 'action',
fixed: 'right',
},
});
3 months ago
//弹窗内容
2 months ago
const faultModalRef = ref();
3 months ago
const showFaultModal = () => {
2 months ago
faultModalRef.value.showModal();
3 months ago
};
2 weeks ago
const sendModalRef = ref()
const showSendModal = (id:any) => {
sendModalRef.value.showModal(id);
};
3 months ago
//详情抽屉
const detailDrawerRef = ref();
2 months ago
const showDrawer = (id: any) => {
detailDrawerRef.value.showDrawer(id);
3 months ago
};
2 weeks ago
const projectOptions = ref([]);
const getProjectOptions = async () => {
const res = await getProjectInfo();
res.forEach((i: any) => {
i.value = i.projectName;
i.label = i.projectName;
});
projectOptions.value = res;
formSchemas[0].componentProps.options = projectOptions.value;
};
const getOptions = () => {
getProjectOptions();
};
getOptions();
3 months ago
// 前往审批记录页面
</script>
<style scoped></style>