zhuoyuan.wang
2024-06-19 15ebe96f28cadec6a726c5324593a40bbf56205f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<template>
    <app-table-list
      v-bind="tableListProps"
    />
</template>
 
<script setup>
import {useEntityStore, useAppStore} from '@/store/modules';
 
import {modal} from '@/plugins';
import {meta} from '@/hooks';
 
const {useMetaData} = meta;
 
const tableSearchRef = ref();
const tableProRef = ref();
const entityStore = useEntityStore();
const appStore = useAppStore();
 
const props = defineProps({
  subSubmit: {
    type: Function,
    default: () => {
    }
  },
});
 
const tableListProRef = ref();
 
const tableListProps = {
  ref: tableListProRef,
  title: '流程字段',
  complementHeight: -1,
  columns: [
    {
      prop: 'value',
      label: "字段名",
    }
  ]
}
 
onMounted(async () => {
  const {data} = await entityStore.getOldEntitySet({
    dataName: 'dictitem',
    filter: " parent_id = 'notice_param_flow'"
  });
  tableListProRef.value.setTableData(data.entityset);
});
 
const getTableCurrent = () => {
  const current = tableListProRef.value.getTableCurrent();
  if (Object.keys(current).length === 0) {
    modal.msgError('请选择参数!');
    throw '';
  }
  return current;
}
 
defineExpose({
  getTableCurrent
});
 
</script>