zs
2025-04-28 1f32ea02c1910c417f159cba81a296e66ae7484c
HIAWms/web/app/template/HIAWms/Views/Pages/Sample/Sample.tsx
文件名从 WMS/web/app/template/MyPluginName/Views/Pages/MyEntityName/MyEntityName.tsx 修改
@@ -1,10 +1,10 @@
import { defineComponent } from 'vue'
import type { Ref } from 'vue'
import BaseTable from '@/components/Table/Table'
import styles from './MyEntityName.module.scss'
import { useMyEntityName } from '../../../Controllers/MyEntityName'
import styles from './Sample.module.scss'
import { useSample } from '../../../Controllers/Sample'
import IconButton from '@/components/IconButton/IconButton'
import MyEntityNameDrawer from '../Dialog/MyEntityNameDrawer/MyEntityNameDrawer'
import SampleDrawer from '../Dialog/SampleDrawer/SampleDrawer'
import Search from '@/components/Search/Search'
import { columns } from './Config'
import TdButton from '@/components/TdButton/TdButton'
@@ -21,7 +21,7 @@
}
export default defineComponent({
  name: 'MyEntityName',
  name: 'Sample',
  directives: {
    permission: vPermission,
  },
@@ -38,14 +38,14 @@
      onError,
      onSearch,
      onRowClick,
      onConfirmMyEntityName,
      onConfirmSample,
      onCheck,
      onAddMyEntityName,
      onAddSample,
      onExport,
      openDetail,
      onSuccess,
      onBeforeUpload,
    } = useMyEntityName(props, ctx)
    } = useSample(props, ctx)
    /**
     * @returns 琛ㄦ牸
@@ -64,13 +64,13 @@
      return (
        <div
          class={{
            [styles.myEntityNameList]: true,
            [styles.sampleList]: true,
          }}
        >
          <BaseTable
            ref={tableRef}
            url={url}
            sortUrlTpl="/api/v1/myPluginName/myEntityName/{id}/adjustsort/{sort}"
            sortUrlTpl="/api/v1/hiawms/sample/{id}/adjustsort/{sort}"
            v-model:dataSource={dataSource.value}
            columns={columns}
            contextMenu={contextMenu}
@@ -105,28 +105,28 @@
    }
    return () => {
      return (
        <div class={styles.myEntityNameContent}>
        <div class={styles.sampleContent}>
          {/* 娣诲姞/缂栬緫 */}
          <MyEntityNameDrawer
          <SampleDrawer
            v-model={dialogConfig.visible}
            title={dialogConfig.title}
            row={current.value}
            sort={sort.value}
            onConfirm={onConfirmMyEntityName}
            onConfirm={onConfirmSample}
          />
          <div class={styles.headerContent}>
            <div class={styles.header}>
              <IconButton
                v-permission="myEntityName-add"
                v-permission="sample-add"
                icon="add-p"
                onClick={onAddMyEntityName}
                onClick={onAddSample}
                type="primary"
              >
                娣诲姞
              </IconButton>
              <el-divider direction="vertical" />
              <el-upload
                v-permission="myEntityName-import"
                v-permission="sample-import"
                name="file"
                accept=".xlsx,.xls,.csv"
                show-file-list={false}
@@ -134,13 +134,13 @@
                onSuccess={onSuccess}
                before-upload={onBeforeUpload}
                headers={headers.value}
                action="/api/v1/myPluginName/myEntityName/import"
                action="/api/v1/hiawms/sample/import"
              >
                <IconButton icon="in">瀵煎叆</IconButton>
              </el-upload>
              <IconButton
                v-permission="myEntityName-output"
                v-permission="sample-output"
                icon="out"
                onClick={onExport}
              >
@@ -155,7 +155,7 @@
            />
          </div>
          <RenderBaseTable
            url="/api/v1/myPluginName/myEntityName"
            url="/api/v1/hiawms/sample"
            dataSource={dataSource}
            isChecked={true}
            isDrag={true}