Browse Source

文章管理改造前端

danch 3 weeks ago
parent
commit
176611a777

+ 3 - 0
src/views/kms/knowledge/article/Article.api.ts

@@ -6,6 +6,7 @@ const {createConfirm} = useMessage();
 
 enum Api {
   list = '/kms/article/list',
+  listManage = '/kms/article/listManage',
   save = '/kms/article/add',
   edit = '/kms/article/edit',
   deleteOne = '/kms/article/delete',
@@ -35,6 +36,8 @@ export const getImportUrl = Api.importExcel;
  */
 export const list = (params) =>
   defHttp.get({url: Api.list, params});
+export const listManage = (params) =>
+  defHttp.get({url: Api.listManage, params});
 /**
  * 删除单个
  */

+ 27 - 0
src/views/kms/knowledge/article/ArticleManage.data.ts

@@ -30,6 +30,21 @@ export const columns: BasicColumn[] = [
     align: "center",
     dataIndex: 'status_dictText'
   },
+  {
+    title: '作者',
+    align: "center",
+    dataIndex: 'createBy_dictText'
+  },
+  {
+    title: '部门',
+    align: "center",
+    dataIndex: 'sysOrgCode_dictText'
+  },
+  {
+    title: '日期',
+    align: "center",
+    dataIndex: 'createTime'
+  },
 ];
 //查询数据
 export const searchFormSchema: FormSchema[] = [
@@ -38,6 +53,7 @@ export const searchFormSchema: FormSchema[] = [
     field: "title",
     component: 'JInput',
     colProps: {span: 6},
+
   },
   {
     label: "状态",
@@ -46,9 +62,20 @@ export const searchFormSchema: FormSchema[] = [
     component: 'JDictSelectTag',
     componentProps: {
       dictCode: 'kms_knowledge_article_status',
+      showSearch: true,
       stringToNumber: true,
     },
   },
+  {
+    label: '作者',
+    field: "createBy",
+    colProps: {span: 6},
+    component: 'JDictSelectTag',
+    componentProps: {
+      showSearch: true,
+      dictCode: 'sys_user,realname,username,status="1"',
+    },
+  },
 ];
 //表单数据
 export const formSchema: FormSchema[] = [

+ 2 - 2
src/views/kms/knowledge/article/ArticleManage.vue

@@ -57,7 +57,7 @@ import {useListPage} from '/@/hooks/system/useListPage'
 import ArticleModal from './components/ArticleModal.vue'
 import {columns, searchFormSchema} from './ArticleManage.data';
 import {
-  list,
+  listManage,
   deleteOne,
   batchDelete,
   getImportUrl,
@@ -74,7 +74,7 @@ const [registerModal, {openModal}] = useModal();
 const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
   tableProps: {
     title: '知识管理-文章',
-    api: list,
+    api: listManage,
     columns,
     canResize: false,
     formConfig: {