222
schangxiang@126.com
2025-04-30 9bec4dcae002f36aa23231da11cb03a156b40110
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { defineComponent } from 'vue'
import BaseDialog from '@/components/BaseDialog/index.vue'
import { useSelectDialog } from './hook'
import styles from './ProcessRouterDialog.module.scss'
import Search from '@/components/Search/Search'
import BaseTable from '@/components/Table/Table'
import { _t } from '@/libs/Language/Language'
export default defineComponent({
  name: 'ProcessRouterDialog',
  props: {
    modelValue: {
      type: Boolean,
      default: false,
    },
    title: {
      type: String,
      default: '',
    },
    data: {
      type: Array,
      default: () => [],
    },
    productId: {
      type: String,
      default: '',
    },
    radio: {
      type: Boolean,
      default: false,
    },
  },
  emits: ['update:modelValue', 'close', 'confirm'],
  setup(props, ctx) {
    const {
      onClose,
      onConfirm,
      onCheck,
      onOpen,
      onSearch,
      visible,
      innerValue,
      tableRef,
      dataSource,
      columns,
      selections,
    } = useSelectDialog(props, ctx)
 
    return () => (
      <BaseDialog
        destroy-on-close
        class={styles.drawer}
        style="background: #fff"
        width="664px"
        height="578px"
        title={props.title ? props.title : _t('工位选择')}
        v-model={visible.value}
        onClose={onClose}
        onConfirm={onConfirm}
        onOpen={onOpen}
      >
        <div class={styles.container}>
          <div class={styles.tools}>
            <span class={styles.name}>{_t('查询')}</span>
            <Search v-model={innerValue.value} onConfirm={onSearch} />
          </div>
          <div class={styles.mainTable}>
            <BaseTable
              selections={selections.value}
              ref={tableRef}
              style="margin-top:10px"
              dataSource={dataSource.value}
              columns={columns.value}
              isChecked={true}
              onCheck={onCheck}
              isHidePagination={true}
              radio={props.radio}
            />
          </div>
        </div>
      </BaseDialog>
    )
  },
})