Browse Source

Merge branch 'develop' into test

yuanliang 1 year ago
parent
commit
e4352fbdd3

+ 83 - 77
src/views/music-library/music-sheet/component/music-list.tsx

@@ -3,7 +3,7 @@ import Pagination from '@/components/pagination'
 import {
   DataTableRowKey,
   NButton, NCascader,
-  NDataTable,
+  NDataTable, NDescriptions, NDescriptionsItem,
   NFormItem,
   NIcon,
   NImage,
@@ -11,7 +11,7 @@ import {
   NModal,
   NSelect,
   NSpace,
-  NTag,
+  NTag, NTooltip,
   useDialog,
   useMessage
 } from 'naive-ui'
@@ -88,14 +88,24 @@ export default defineComponent({
           type: 'selection'
         },
         {
-          title: '曲目编号',
-          minWidth: '200px',
-          key: 'id'
-        },
-        {
           title: '曲目名称',
           minWidth: '200px',
-          key: 'name'
+          key: 'id',
+          render(row: any) {
+            return (
+                <NDescriptions labelPlacement="left" column={1}>
+                  <NDescriptionsItem label="名称">
+                    <NTooltip placement="top-start">
+                      {{
+                        default: () => row.name,
+                        trigger: () => row.name
+                      }}
+                    </NTooltip>
+                  </NDescriptionsItem>
+                  <NDescriptionsItem label="编号">{row.id}</NDescriptionsItem>
+                </NDescriptions>
+            )
+          }
         },
         {
           title: '封面图',
@@ -105,55 +115,85 @@ export default defineComponent({
           }
         },
         {
-          title: '音乐人',
-          minWidth: '100px',
-          key: 'composer'
-        },
-        {
-          title: '曲目类型',
-          minWidth: '100px',
-          key: 'musicSheetType',
+          title: '曲目信息',
+          minWidth: '150px',
+          key: 'composer',
           render(row: any) {
-            return getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)))
+            return (
+                <NDescriptions labelPlacement="left" column={1}>
+                  <NDescriptionsItem label="音乐人">{row.composer}</NDescriptionsItem>
+                  <NDescriptionsItem label="类型">{getMapValueByKey(row.musicSheetType, new Map(Object.entries(musicSheetType)))}</NDescriptionsItem>
+                  <NDescriptionsItem label="分类">{row.musicCategoryName}</NDescriptionsItem>
+                </NDescriptions>
+            )
           }
         },
         {
-          title: '曲目分类',
-          minWidth: '100px',
-          key: 'musicCategoryName',
-        },
-        {
-          title: '可用声部',
-          minWidth: '100px',
-          maxWidth: '300px',
-          key: 'subjectNames'
-        },
-        {
           title: '作者属性',
-          minWidth: '100px',
+          minWidth: '250px',
           key: 'sourceType',
           render(row: any) {
-            return getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)))
+            return (
+                <NDescriptions labelPlacement="left" column={1}>
+                  <NDescriptionsItem label="属性">{getMapValueByKey(row.sourceType, new Map(Object.entries(musicSheetSourceType)))}</NDescriptionsItem>
+                  <NDescriptionsItem label="所属人">{getOwnerName(row.musicSheetExtend, row.sourceType)?getOwnerName(row.musicSheetExtend, row.sourceType):"--"}</NDescriptionsItem>
+                </NDescriptions>
+            )
           }
         },
         {
-          title: '所属人',
-          minWidth: '200px',
-          key: 'composer',
+          title: '适用项目',
+          width: '300px',
+          key: 'projectName',
           render(row: any) {
-            return <div>{getOwnerName(row.musicSheetExtend, row.sourceType)}</div>
+            return (
+                <NSpace>
+                  <NButton
+                      type="primary"
+                      size="small"
+                      text
+                      onClick={() => {
+                        state.showUseProject = true
+                        state.showUseProjectId = row.id
+                      }}
+                  >
+                    {row.musicSheetExtend && row.musicSheetExtend.useApplicationNames
+                        ? row.musicSheetExtend.useApplicationNames
+                        : ''}
+
+                    <NIcon size={15} style="padding-left: 9px">
+                      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
+                        <path d="M2 26h28v2H2z" fill="currentColor"></path>
+                        <path
+                            d="M25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4l15-15zm-5-5L24 7.6l-3 3L17.4 7l3-3zM6 22v-3.6l10-10l3.6 3.6l-10 10H6z"
+                            fill="currentColor"
+                        ></path>
+                      </svg>
+                    </NIcon>
+                  </NButton>
+                </NSpace>
+            )
           }
         },
         {
-          title: '上传人',
-          minWidth: '100px',
-          key: 'createByName'
-        },
-        {
-          title: '上传时间',
-          minWidth: '150px',
-          key: 'createTime'
+          title: '更新信息',
+          minWidth: '250px',
+          key: 'updateBy',
+          render(row: any) {
+            return (
+                <NDescriptions labelPlacement="left" column={1}>
+                  <NDescriptionsItem label="更新人">{row.updateByName}</NDescriptionsItem>
+                  <NDescriptionsItem label="更新时间">{row.updateTime}</NDescriptionsItem>
+                </NDescriptions>
+            )
+          }
         },
+        // {
+        //   title: '可用声部',
+        //   minWidth: '100px',
+        //   maxWidth: '300px',
+        //   key: 'subjectNames'
+        // },
         {
           title: '审核版本',
           minWidth: '100px',
@@ -163,40 +203,6 @@ export default defineComponent({
           }
         },
         {
-          title: '适用项目',
-          width: '300px',
-          key: 'projectName',
-          render(row: any) {
-            return (
-              <NSpace>
-                <NButton
-                  type="primary"
-                  size="small"
-                  text
-                  onClick={() => {
-                    state.showUseProject = true
-                    state.showUseProjectId = row.id
-                  }}
-                >
-                  {row.musicSheetExtend && row.musicSheetExtend.useApplicationNames
-                    ? row.musicSheetExtend.useApplicationNames
-                    : ''}
-
-                  <NIcon size={15} style="padding-left: 9px">
-                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
-                      <path d="M2 26h28v2H2z" fill="currentColor"></path>
-                      <path
-                        d="M25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4l15-15zm-5-5L24 7.6l-3 3L17.4 7l3-3zM6 22v-3.6l10-10l3.6 3.6l-10 10H6z"
-                        fill="currentColor"
-                      ></path>
-                    </svg>
-                  </NIcon>
-                </NButton>
-              </NSpace>
-            )
-          }
-        },
-        {
           title: '状态',
           minWidth: '50px',
           key: 'status',
@@ -681,7 +687,7 @@ export default defineComponent({
             data={state.dataList}
             rowKey={(row: any) => row.id}
             onUpdateCheckedRowKeys={handleCheck}
-            scrollX={'2800'}
+            scrollX={'1800'}
           ></NDataTable>
           <Pagination
             v-model:page={state.pagination.page}

+ 2 - 4
src/views/music-library/music-sheet/modal/musicSheetOwnerDialog.tsx

@@ -35,7 +35,6 @@ export default defineComponent({
       },
       searchForm: {
         applicationId: null,
-        orgName: null,
         name: null,
         sourceType: null as any,
       },
@@ -94,7 +93,6 @@ export default defineComponent({
         } else {
           state.searchForm.applicationId = state.appData[0].value
         }
-        state.searchForm.orgName = null
         state.searchForm.name = null
       }
 
@@ -239,10 +237,10 @@ export default defineComponent({
 
             {state.searchForm.sourceType === 'ORG' &&
                 (<>
-                  <NFormItem label="机构名称" path="orgName" size="small" style={'width:250px'}>
+                  <NFormItem label="机构名称" path="name" size="small" style={'width:250px'}>
                     <NInput
                         placeholder="请输入机构名称"
-                        v-model:value={state.searchForm.orgName}
+                        v-model:value={state.searchForm.name}
                         clearable
                     />
                   </NFormItem>

+ 10 - 5
src/views/music-library/project-music-sheet/module/gym/music-sheet-gym.tsx

@@ -313,11 +313,16 @@ export default defineComponent({
         },
         {
           title: '上传人',
-          key: 'createByName'
-        },
-        {
-          title: '上传时间',
-          key: 'createTime'
+          minWidth: '150px',
+          key: 'composer',
+          render(row: any) {
+            return (
+                <NDescriptions labelPlacement="left" column={1}>
+                  <NDescriptionsItem label="上传人">{row.createByName}</NDescriptionsItem>
+                  <NDescriptionsItem label="上传时间">{row.createTime}</NDescriptionsItem>
+                </NDescriptions>
+            )
+          }
         },
         {
           title: '状态',

+ 10 - 5
src/views/music-library/project-music-sheet/module/gyt/music-sheet-gyt.tsx

@@ -284,11 +284,16 @@ export default defineComponent({
         },
         {
           title: '上传人',
-          key: 'createByName'
-        },
-        {
-          title: '上传时间',
-          key: 'createTime'
+          minWidth: '150px',
+          key: 'composer',
+          render(row: any) {
+            return (
+                <NDescriptions labelPlacement="left" column={1}>
+                  <NDescriptionsItem label="上传人">{row.createByName}</NDescriptionsItem>
+                  <NDescriptionsItem label="上传时间">{row.createTime}</NDescriptionsItem>
+                </NDescriptions>
+            )
+          }
         },
         {
           title: '状态',

+ 10 - 5
src/views/music-library/project-music-sheet/module/klx/music-sheet-klx.tsx

@@ -354,11 +354,16 @@ export default defineComponent({
         },
         {
           title: '上传人',
-          key: 'createByName'
-        },
-        {
-          title: '上传时间',
-          key: 'createTime'
+          minWidth: '150px',
+          key: 'composer',
+          render(row: any) {
+            return (
+                <NDescriptions labelPlacement="left" column={1}>
+                  <NDescriptionsItem label="上传人">{row.createByName}</NDescriptionsItem>
+                  <NDescriptionsItem label="上传时间">{row.createTime}</NDescriptionsItem>
+                </NDescriptions>
+            )
+          }
         },
         {
           title: '状态',

+ 10 - 5
src/views/music-library/project-music-sheet/module/kt/music-sheet-kt.tsx

@@ -302,11 +302,16 @@ export default defineComponent({
         // },
         {
           title: '上传人',
-          key: 'createByName'
-        },
-        {
-          title: '上传时间',
-          key: 'createTime'
+          minWidth: '150px',
+          key: 'composer',
+          render(row: any) {
+            return (
+                <NDescriptions labelPlacement="left" column={1}>
+                  <NDescriptionsItem label="上传人">{row.createByName}</NDescriptionsItem>
+                  <NDescriptionsItem label="上传时间">{row.createTime}</NDescriptionsItem>
+                </NDescriptions>
+            )
+          }
         },
         {
           title: '状态',