|
@@ -0,0 +1,172 @@
|
|
|
+<template>
|
|
|
+ <div class="violation-registration flex flex-col">
|
|
|
+ <SearchForm :fields="fields" :params="params"></SearchForm>
|
|
|
+ <div class="flex-1 page-wrap">
|
|
|
+ <t-table
|
|
|
+ size="small"
|
|
|
+ row-key="id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="tableData"
|
|
|
+ bordered
|
|
|
+ :pagination="{
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 10,
|
|
|
+ onChange,
|
|
|
+ total: pagination.total,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ </t-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="jsx" name="ViolationRegistration">
|
|
|
+import { reactive, ref } from 'vue';
|
|
|
+import { getTableData } from '@/api/test';
|
|
|
+import useFetchTable from '@/hooks/useFetchTable';
|
|
|
+
|
|
|
+const rowData = ref({});
|
|
|
+
|
|
|
+const columns = [
|
|
|
+ { colKey: 'a', title: '违规流水号' },
|
|
|
+ { colKey: 'b', title: 'SOP流水号' },
|
|
|
+ { colKey: 'c', title: '节点负责人' },
|
|
|
+ { colKey: 'd', title: '客户名称' },
|
|
|
+ { colKey: 'e', title: '项目单号' },
|
|
|
+ { colKey: 'f', title: '项目名称' },
|
|
|
+ { colKey: 'g', title: '违规类型' },
|
|
|
+ { colKey: 'h', title: '违规情况' },
|
|
|
+ { colKey: 'i', title: '跟进状态' },
|
|
|
+ { colKey: 'j', title: '登记时间' },
|
|
|
+ { colKey: 'k', title: '登记人' },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ colKey: 'operate',
|
|
|
+ fixed: 'right',
|
|
|
+ width: 200,
|
|
|
+ cell: (h, { row }) => {
|
|
|
+ return (
|
|
|
+ <div class="table-operations">
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 跟进
|
|
|
+ </t-link>
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 重启
|
|
|
+ </t-link>
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 关闭
|
|
|
+ </t-link>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+const fields = ref([
|
|
|
+ {
|
|
|
+ prop: 'a',
|
|
|
+ label: '服务单元',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: '100px',
|
|
|
+ colSpan: 4.5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'b',
|
|
|
+ label: '违规类型',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: '100px',
|
|
|
+ colSpan: 4.5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'c',
|
|
|
+ label: '跟进状态',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: '100px',
|
|
|
+ colSpan: 4.5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'd',
|
|
|
+ label: '节点负责人',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: '100px',
|
|
|
+ colSpan: 4.5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'buttons',
|
|
|
+ colSpan: 3,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ type: 'button',
|
|
|
+ text: '查询',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'e',
|
|
|
+ label: '客户名称',
|
|
|
+ type: 'select',
|
|
|
+ labelWidth: '100px',
|
|
|
+ colSpan: 4.5,
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'f',
|
|
|
+ label: 'SOP流水号',
|
|
|
+ labelWidth: '100px',
|
|
|
+ colSpan: 4.5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'g',
|
|
|
+ label: '登记人',
|
|
|
+ labelWidth: '100px',
|
|
|
+ colSpan: 4.5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'h',
|
|
|
+ label: '预警时间',
|
|
|
+ type: 'daterange',
|
|
|
+ labelWidth: '100px',
|
|
|
+ colSpan: 9,
|
|
|
+ },
|
|
|
+]);
|
|
|
+const params = reactive({
|
|
|
+ a: '',
|
|
|
+ b: '',
|
|
|
+ c: '',
|
|
|
+ d: '',
|
|
|
+ e: '',
|
|
|
+ f: '',
|
|
|
+ g: '',
|
|
|
+ h: [],
|
|
|
+});
|
|
|
+
|
|
|
+const {
|
|
|
+ loading: tableLoading,
|
|
|
+ pagination,
|
|
|
+ tableData,
|
|
|
+ fetchData,
|
|
|
+ onChange,
|
|
|
+} = useFetchTable(getTableData);
|
|
|
+
|
|
|
+const refresh = async () => {};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style></style>
|