diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml new file mode 100644 index 0000000000..dc91f47871 --- /dev/null +++ b/.github/workflows/publish-maven.yml @@ -0,0 +1,45 @@ +name: Publish package to the Maven Central Repository and GitHub Packages + +on: + push + +jobs: + publish-maven-central: + runs-on: ubuntu-18.04 + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + + - name: Install Java and Maven + uses: actions/setup-java@v1 + with: + java-version: '11' + distribution: 'temurin' + + - name: Publish to the Maven Central Repository + uses: samuelmeuli/action-maven-publish@v1 + with: + maven_args: '-DskipTests' + gpg_private_key: ${{ secrets.GPG_SECRET }} + gpg_passphrase: ${{ secrets.GPG_PASSWORD }} + nexus_username: ${{ secrets.OSSRH_USERNAME }} + nexus_password: ${{ secrets.OSSRH_TOKEN }} + + # publish-github-package: + # runs-on: ubuntu-latest + # permissions: + # contents: read + # packages: write + # steps: + # - uses: actions/checkout@v4 + # - name: Set up Java for publishing to GitHub Packages + # uses: actions/setup-java@v3 + # with: + # java-version: '11' + # distribution: 'temurin' + # - name: Publish to GitHub Packages + # run: | + # chmod 755 ./mvnw + # ./mvnw clean install package deploy -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true + # env: + # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/core/datacap-web/src/fontawesome.ts b/core/datacap-web/src/fontawesome.ts index 8ac1028bb8..38ec741667 100644 --- a/core/datacap-web/src/fontawesome.ts +++ b/core/datacap-web/src/fontawesome.ts @@ -23,6 +23,7 @@ import { faKey, faMagnifyingGlass, faMinus, + faPlus, faRepeat, faSun, faTable, @@ -39,6 +40,7 @@ import { */ const createIcons = (app: any) => { library.add(faArrowRight, + faPlus, faTablet, faMinus, faUpload, diff --git a/core/datacap-web/src/i18n/langs/en/source/manager.ts b/core/datacap-web/src/i18n/langs/en/source/manager.ts index 7e18f917f9..a9c0c484c8 100644 --- a/core/datacap-web/src/i18n/langs/en/source/manager.ts +++ b/core/datacap-web/src/i18n/langs/en/source/manager.ts @@ -9,4 +9,5 @@ export default { resetTo: 'Reset To', filter: 'Filter', addFilter: 'Add Filter', + addRows: 'Add Rows', } diff --git a/core/datacap-web/src/i18n/langs/zhCn/source/manager.ts b/core/datacap-web/src/i18n/langs/zhCn/source/manager.ts index 59c1778b89..ac269bb290 100644 --- a/core/datacap-web/src/i18n/langs/zhCn/source/manager.ts +++ b/core/datacap-web/src/i18n/langs/zhCn/source/manager.ts @@ -8,5 +8,6 @@ export default { resetAutoIncrement: '重置自增列', resetTo: '重置为', filter: '筛选器', - addFilter: '添加筛选器' + addFilter: '添加筛选器', + addRows: '添加行', } diff --git a/core/datacap-web/src/views/admin/source/components/TableData.vue b/core/datacap-web/src/views/admin/source/components/TableData.vue index 53bce4d8b5..a8de51607e 100644 --- a/core/datacap-web/src/views/admin/source/components/TableData.vue +++ b/core/datacap-web/src/views/admin/source/components/TableData.vue @@ -76,10 +76,20 @@ {{ $t('common.row') }} + + + @@ -108,6 +120,7 @@ placement="bottom-end" transfer> @@ -116,6 +129,7 @@ placement="bottom-end" transfer> @@ -225,6 +239,7 @@ export default defineComponent({ gridApi: null as GridApi, gridColumnApi: null as ColumnApi, originalColumns: [], + newRows: [], configure: { headers: [], columns: [], @@ -425,6 +440,16 @@ export default defineComponent({ { this.filterConfigure.configure = value; }, + handlerAddRow() + { + const newData = {}; + this.originalColumns.forEach((column: { field: string; }) => { + newData[column.field] = null; + }); + this.configure.datasets.push(newData); + this.newRows.push(newData); + this.gridApi.setRowData(this.configure.datasets); + }, getSortConfigure(configure: TableFilter) { const columnState = this.gridColumnApi.getColumnState();