Browse Source

修改作者列表

Young 2 years ago
parent
commit
ec8b12df9b

+ 0 - 24
src/api/article.js

@@ -8,14 +8,6 @@ export function fetchList (query) {
   })
 }
 
-export function fetchByteBlogsList (query) {
-  return axios({
-    url: '/posts/byte-blogs/v1/list',
-    method: 'get',
-    params: query
-  })
-}
-
 export function fetchArticle (id) {
   return axios({
     url: `/posts/posts/v1/${id}`,
@@ -31,14 +23,6 @@ export function createArticle (data) {
   })
 }
 
-export function crawlerArticle (data) {
-  return axios({
-    url: '/posts/posts/v1/crawler',
-    method: 'post',
-    timeout: 500000,
-    data
-  })
-}
 
 export function updateArticle (data) {
   return axios({
@@ -62,11 +46,3 @@ export function deletePosts (id) {
     method: 'delete'
   })
 }
-
-export function publishByteBlogs (data) {
-  return axios({
-    url: '/posts/byte-blogs/v1/publish',
-    method: 'post',
-    data
-  })
-}

+ 33 - 0
src/api/author.js

@@ -0,0 +1,33 @@
+import { axios } from '@/utils/request'
+
+export function fetchList (query) {
+  return axios({
+    url: '/admin/author/page',
+    method: 'get',
+    params: query
+  })
+}
+
+export function saveAuthor (data) {
+  return axios({
+    url: '/admin/author/save',
+    method: 'post',
+    data
+  })
+}
+
+export function fetchAuthor (id) {
+  return axios({
+    url: `/admin/author/${id}`,
+    method: 'get'
+  })
+}
+
+export function deleteAuthor (id) {
+  return axios({
+    url: `/admin/author/${id}`,
+    method: 'delete'
+  })
+}
+
+

+ 0 - 23
src/api/comment.js

@@ -8,14 +8,6 @@ export function fetchCommentLists (query) {
   })
 }
 
-export function fetchCommentList (query) {
-  return axios({
-    url: '/comments/comments/v1/list',
-    method: 'get',
-    params: query
-  })
-}
-
 export function replyComment (data) {
   return axios({
     url: '/comments/admin/v1/reply',
@@ -24,21 +16,6 @@ export function replyComment (data) {
   })
 }
 
-export function fetchComment (id) {
-  return axios({
-    url: `/comments/comments/v1/${id}`,
-    method: 'get'
-  })
-}
-
-export function updateComment (data) {
-  return axios({
-    url: '/comments/comments/v1/update',
-    method: 'put',
-    data
-  })
-}
-
 export function deleteComment (id) {
   return axios({
     url: `/comments/comments/v1/${id}`,

+ 0 - 8
src/api/user.js

@@ -57,14 +57,6 @@ export function logout () {
   })
 }
 
-export function getOauthLoginByGithub (params) {
-  return axios({
-    url: '/auth/github/v1/get',
-    method: 'get',
-    params
-  })
-}
-
 export function deleteUser (id) {
   return axios({
     url: `/auth/user/v1/${id}`,

+ 17 - 130
src/config/router.config.js

@@ -1,6 +1,6 @@
 // eslint-disable-next-line
 import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts'
-import { bxAnaalyse } from '@/core/icons'
+// import { bxAnaalyse } from '@/core/icons'
 
 export const asyncRouterMap = [
 
@@ -9,24 +9,24 @@ export const asyncRouterMap = [
     name: 'index',
     component: BasicLayout,
     meta: { title: '首页' },
-    redirect: '/dashboard/analysis',
+    redirect: '/author/list',
     children: [
       // dashboard
-      {
-        path: '/dashboard',
-        name: 'dashboard',
-        redirect: '/dashboard/analysis',
-        component: RouteView,
-        meta: { title: '仪表盘', keepAlive: true, icon: bxAnaalyse, permission: [ 'dashboard' ] },
-        children: [
-          {
-            path: '/dashboard/analysis',
-            name: 'Analysis',
-            component: () => import('@/views/dashboard/Analysis'),
-            meta: { title: '分析页', keepAlive: false, permission: [ 'dashboard' ] }
-          }
-        ]
-      },
+      // {
+      //   path: '/dashboard',
+      //   name: 'dashboard',
+      //   redirect: '/dashboard/analysis',
+      //   component: RouteView,
+      //   meta: { title: '仪表盘', keepAlive: true, icon: bxAnaalyse, permission: [ 'dashboard' ] },
+      //   children: [
+      //     {
+      //       path: '/dashboard/analysis',
+      //       name: 'Analysis',
+      //       component: () => import('@/views/dashboard/Analysis'),
+      //       meta: { title: '分析页', keepAlive: false, permission: [ 'dashboard' ] }
+      //     }
+      //   ]
+      // },
       // forms
       {
         path: '/author',
@@ -74,21 +74,6 @@ export const asyncRouterMap = [
           }
         ]
       },
-      // links
-      {
-        path: '/links',
-        redirect: '/links/list',
-        component: PageView,
-        meta: { title: '友链管理', icon: 'share-alt' },
-        children: [
-          {
-            path: '/links/list',
-            name: 'LinksList',
-            component: () => import('@/views/links/LinksList'),
-            meta: { title: '友链列表', keepAlive: false }
-          }
-        ]
-      },
       // user
       {
         path: '/auth',
@@ -104,104 +89,6 @@ export const asyncRouterMap = [
           }
         ]
       },
-      // logs
-      {
-        path: '/logs',
-        redirect: '/logs/list',
-        component: PageView,
-        meta: { title: '日志管理', icon: 'snippets' },
-        children: [
-          {
-            path: '/logs/list',
-            name: 'logsList',
-            component: () => import('@/views/logs/LogsList'),
-            meta: { title: '日志列表', keepAlive: false }
-          }
-        ]
-      },
-      // menu
-      {
-        path: '/menu',
-        redirect: '/menu/list',
-        component: PageView,
-        meta: { title: '菜单管理', icon: 'snippets' },
-        children: [
-          {
-            path: '/menu/list',
-            name: 'menuList',
-            component: () => import('@/views/menu/MenuList'),
-            meta: { title: '菜单列表', keepAlive: false }
-          }
-        ]
-      },
-      // social
-      {
-        path: '/social',
-        redirect: '/social/list',
-        component: PageView,
-        meta: { title: '社交管理', icon: 'snippets' },
-        children: [
-          {
-            path: '/social/list',
-            name: 'socialList',
-            component: () => import('@/views/social/SocialList'),
-            meta: { title: '社交列表', keepAlive: false }
-          }
-        ]
-      },
-      // config
-      {
-        path: '/config',
-        redirect: '/config/list',
-        component: PageView,
-        meta: { title: '系统配置', icon: 'tool' },
-        children: [
-          {
-            path: '/config/site',
-            name: 'BasicForm',
-            component: () => import('@/views/config/BasicForm'),
-            meta: { title: '站点信息', keepAlive: false }
-          },
-          {
-            path: '/config/file',
-            redirect: '/config/list/file',
-            component: RouteView,
-            meta: { title: '文件存储配置', keepAlive: false },
-            children: [
-              {
-                path: '/config/default/oss',
-                name: 'DefaultForm',
-                component: () => import('@/views/config/file/DefaultForm'),
-                meta: { title: '服务器OSS配置', keepAlive: false }
-              },
-              {
-                path: '/config/qiniu/oss',
-                name: 'QnyForm',
-                component: () => import('@/views/config/file/QnyForm'),
-                meta: { title: '七牛云OSS配置', keepAlive: false }
-              },
-              {
-                path: '/config/aliyun/oss',
-                name: 'ALiYunOSSFrom',
-                component: () => import('@/views/config/file/ALiYunOSSForm'),
-                meta: { title: '阿里云OSS配置', keepAlive: false }
-              },
-              {
-                path: '/config/cos/oss',
-                name: 'COSForm',
-                component: () => import('@/views/config/file/COSForm'),
-                meta: { title: '腾讯云COS配置', keepAlive: false }
-              }
-            ]
-          },
-          {
-            path: '/config/cloudMusic',
-            name: 'cloudMusicForm',
-            component: () => import('@/views/config/MusicForm'),
-            meta: { title: '歌单配置', keepAlive: false }
-          }
-        ]
-      },
       // account
       {
         path: '/account',

+ 0 - 17
src/views/auth/UserList.vue

@@ -30,23 +30,6 @@
             <a v-if="text === 1">锁定</a>
           </template>
         </span>
-
-        <span slot="action" slot-scope="text, record">
-          <template>
-            <a v-if="record.status === 0 && record.roleId === 1" @click="handleEditStatus(record,1)">锁定</a>
-            <a v-if="record.status === 1 && record.roleId === 1" @click="handleEditStatus(record,0)">解锁</a>
-            <a-divider v-if="record.roleId === 1" type="vertical" />
-            <a-popconfirm
-              title="确定删除这个用户?"
-              @confirm="handleDelete(record)"
-              @cancel="cancel"
-              okText="Yes"
-              cancelText="No"
-            >
-              <a v-if="record.roleId === 1" href="#">删除</a>
-            </a-popconfirm>
-          </template>
-        </span>
       </s-table>
     </a-card>
   </div>

+ 1 - 38
src/views/auth/auth-constants.js

@@ -22,14 +22,6 @@ const table = {
       align: 'center',
       dataIndex: 'status',
       scopedSlots: { customRender: 'status' }
-    },
-    {
-      title: '操作',
-      dataIndex: 'action',
-      align: 'center',
-      fixed: 'right',
-      width: '250px',
-      scopedSlots: { customRender: 'action' }
     }
   ]
 }
@@ -66,34 +58,5 @@ const filters = {
   }
 }
 
-// md配置
-const markdownOption = {
-  bold: true, // 粗体
-  italic: true, // 斜体
-  header: true, // 标题
-  underline: true, // 下划线
-  strikethrough: false, // 中划线
-  mark: true, // 标记
-  superscript: false, // 上角标
-  subscript: false, // 下角标
-  quote: true, // 引用
-  ol: true, // 有序列表
-  ul: true, // 无序列表
-  link: true, // 链接
-  imagelink: true, // 图片链接
-  code: true, // code
-  table: true, // 表格
-  fullscreen: false, // 全屏编辑
-  readmodel: false, // 沉浸式阅读
-  help: true, // 帮助
-  undo: true, // 上一步
-  redo: true, // 下一步
-  trash: true, // 清空
-  save: true, // 保存(触发events中的save事件)
-  navigation: true, // 导航目录
-  subfield: true, // 单双栏模式
-  preview: true, // 预览
-  htmlcode: true// 展示html源码
-}
 
-export { table, filters, markdownOption }
+export { table, filters }

+ 3 - 43
src/views/author/AuthorList.vue

@@ -22,22 +22,12 @@
         <span slot="summary" slot-scope="text">
           <ellipsis :length="10" tooltip>{{ text }}</ellipsis>
         </span>
-        <span slot="createTime" slot-scope="text">
-          {{ text | dayjs }}
-        </span>
-        <span slot="titles" slot-scope="text">
-          <ellipsis :length="15" tooltip>{{ text }}</ellipsis>
-        </span>
         <span slot="action" slot-scope="text, record">
           <template>
             <a @click="handleEdit(record)">编辑</a>
             <a-divider type="vertical" />
-            <a-divider type="vertical" />
-            <a v-if="record.status === 1" @click="handleModifyStatus(record,2)">发布</a>
-            <a v-if="record.status === 2" @click="handleModifyStatus(record,1)">草稿箱</a>
-            <a-divider type="vertical" />
             <a-popconfirm
-              title="确定删除这篇文章?"
+              title="确定删除这个作者?"
               @confirm="handleDelete(record)"
               @cancel="cancel"
               okText="Yes"
@@ -61,7 +51,7 @@
 </template>
 
 <script>
-import { fetchList, updateArticleStatus, deletePosts } from '@/api/article'
+import { fetchList, deleteAuthor } from '@/api/author'
 import { STable, Ellipsis } from '@/components'
 import CreateAuthorForm from './modules/CreateForm'
 import SearchForm from './modules/SearchForm'
@@ -124,19 +114,8 @@ export default {
       this.queryParam = queryParam
       this.refreshTable()
     },
-    handleModifyStatus (record, status) {
-      updateArticleStatus({
-        id: record.id,
-        status: status
-      }).then(res => {
-        this.$notification.success({
-          message: '更新状态成功'
-        })
-        this.$refs.table.refresh()
-      })
-    },
     handleDelete (row) {
-      deletePosts(row.id).then(res => {
+      deleteAuthor(row.id).then(res => {
         this.$notification.success({
           message: '删除成功'
         })
@@ -144,25 +123,6 @@ export default {
       })
     },
     cancel () {
-    },
-    goByteBlogsEdit () {
-      window.open('https://www.byteblogs.com/editor/posts', '_blank')
-    },
-    draftForm () {
-      if (this.postForm.content.length === 0 || this.postForm.title.length === 0) {
-        this.$message({
-          message: '请填写必要的标题和内容',
-          type: 'warning'
-        })
-        return
-      }
-      this.$message({
-        message: '保存成功',
-        type: 'success',
-        showClose: true,
-        duration: 1000
-      })
-      this.postForm.status = 1
     }
   }
 }

+ 39 - 67
src/views/author/author-constants.js

@@ -2,48 +2,64 @@
 const table = {
   columns: [
     {
-      title: 'ID',
+      title: 'finderUin',
       align: 'center',
-      dataIndex: 'id'
+      dataIndex: 'finderUin',
+      scopedSlots: { customRender: 'summary' }
     },
     {
-      title: '文章名称',
+      title: '来源渠道',
       align: 'center',
-      dataIndex: 'title',
-      scopedSlots: { customRender: 'titles' }
+      dataIndex: 'fromChannelName'
     },
     {
-      title: '创建时间',
+      title: '是否有账外账号',
       align: 'center',
-      dataIndex: 'createTime',
-      scopedSlots: { customRender: 'createTime' }
+      dataIndex: 'outSideAccountFlag',
+      scopedSlots: { customRender: 'status' }
     },
     {
-      title: '摘要',
-      dataIndex: 'summary',
+      title: '作者等级',
       align: 'center',
-      scopedSlots: { customRender: 'summary' }
+      dataIndex: 'level'
     },
     {
-      title: '文章状态',
-      dataIndex: 'status',
+      title: '作者微信号',
       align: 'center',
-      scopedSlots: { customRender: 'status' }
+      dataIndex: 'weChatAccount'
+    },
+    {
+      title: '视频账号',
+      align: 'center',
+      dataIndex: 'videoAccount'
+    },
+    {
+      title: '作者分类',
+      align: 'center',
+      dataIndex: 'categoryName'
+    },
+    {
+      title: '拟定认证信息',
+      align: 'center',
+      dataIndex: 'authInfo'
     },
     {
-      title: '浏览数',
+      title: '是否本地作者',
       align: 'center',
-      dataIndex: 'views'
+      dataIndex: 'isLocal',
+      scopedSlots: { customRender: 'status' }
     },
     {
-      title: '评论数',
+      title: '是否下发流量',
       align: 'center',
-      dataIndex: 'comments'
+      dataIndex: 'isSend',
+      scopedSlots: { customRender: 'status' }
     },
     {
-      title: '权重',
+      title: '影响力描述',
+      dataIndex: 'prove',
       align: 'center',
-      dataIndex: 'weight'
+      scopedSlots: { customRender: 'summary' }
     },
     {
       title: '操作',
@@ -58,24 +74,10 @@ const table = {
 
 // 表格里面的列key value
 const filters = {
-  syncStatusFilter (status) {
-    const statusMap = {
-      0: '未同步',
-      1: '已同步'
-    }
-    return statusMap[status]
-  },
-  syncStatusTypeFilter (status) {
-    const statusMap = {
-      0: 'error',
-      1: 'success'
-    }
-    return statusMap[status]
-  },
   statusFilter (status) {
     const statusMap = {
-      1: '草稿箱',
-      2: '已发布'
+      1: '是',
+      2: '否'
     }
     return statusMap[status]
   },
@@ -88,34 +90,4 @@ const filters = {
   }
 }
 
-// md配置
-const markdownOption = {
-  bold: true, // 粗体
-  italic: true, // 斜体
-  header: true, // 标题
-  underline: true, // 下划线
-  strikethrough: false, // 中划线
-  mark: true, // 标记
-  superscript: false, // 上角标
-  subscript: false, // 下角标
-  quote: true, // 引用
-  ol: true, // 有序列表
-  ul: true, // 无序列表
-  link: true, // 链接
-  imagelink: true, // 图片链接
-  code: true, // code
-  table: true, // 表格
-  fullscreen: false, // 全屏编辑
-  readmodel: false, // 沉浸式阅读
-  help: true, // 帮助
-  undo: true, // 上一步
-  redo: true, // 下一步
-  trash: true, // 清空
-  save: true, // 保存(触发events中的save事件)
-  navigation: true, // 导航目录
-  subfield: true, // 单双栏模式
-  preview: true, // 预览
-  htmlcode: true// 展示html源码
-}
-
-export { table, filters, markdownOption }
+export { table, filters }

+ 43 - 65
src/views/author/modules/CreateForm.vue

@@ -33,9 +33,8 @@
           <a-col :lg="8" :md="12" :sm="24">
             <a-form-item label="作者是否有站外账号">
               <a-select size="default" style="width: 200px" v-decorator="['outSideAccountFlag']">
-                <a-select-option value="是">是</a-select-option>
-                <a-select-option value="否">否</a-select-option>
-                <a-select-option value="其他">其他</a-select-option>
+                <a-select-option value="1">是</a-select-option>
+                <a-select-option value="0">否</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
@@ -165,11 +164,8 @@
 </template>
 
 <script>
-import {
-  createArticle,
-  updateArticle,
-  fetchArticle
-} from '@/api/article'
+
+import { saveAuthor,fetchAuthor } from '@/api/author'
 
 export default {
   name: 'CreateAuthorForm',
@@ -613,35 +609,22 @@ export default {
     handleSubmit (e) {
       e.preventDefault()
       this.form.validateFieldsAndScroll((err, values) => {
-        if (!err && this.content !== null) {
+        if (!err) {
           console.log('Received values of form: ', values)
           const createParams = { ...values }
 
-          const arr = []
-          if (createParams.tagsList !== undefined) {
-            createParams.tagsList.forEach((item, index) => {
-              this.dynamicTags.forEach(item1 => {
-                if (item1.id === Number(item)) {
-                  arr[index] = item1
-                }
-              })
-            })
+          if (createParams.categoryName !== undefined) {
+            createParams.categoryName = createParams.categoryName[createParams.categoryName.length - 1]
           }
 
-          createParams.tagsList = [...arr]
-          // 1 草稿 2 文章
-          createParams['status'] = 2
-          createParams['content'] = this.content
-
-          if (createParams.thumbnail !== undefined &&
-            createParams.thumbnail !== null &&
-            createParams.thumbnail.file !== null &&
-            createParams.thumbnail.file !== undefined) {
-            createParams.thumbnail = createParams.thumbnail.file.response.extra
+          if (createParams.authInfo !== undefined) {
+            createParams.authInfo = createParams.authInfo[createParams.authInfo.length - 1]
           }
 
+          createParams.outSideAccountFlag = createParams.outSideAccountFlag === '是' ? 1 : 0
+
           if (this.formType === 'create') {
-            createArticle(createParams)
+            saveAuthor(createParams)
               .then(response => {
                 this.$notification.success({
                   message: response.message
@@ -653,7 +636,7 @@ export default {
               })
           } else {
             createParams['id'] = this.id
-            updateArticle(createParams)
+            saveAuthor(createParams)
               .then(response => {
                 this.$notification.success({
                   message: response.message
@@ -674,55 +657,49 @@ export default {
     },
     handleEdit (record) {
       this.id = record.id
-      fetchArticle(record.id)
+      fetchAuthor(record.id)
         .then(response => {
           const postForm = response.model
           console.log(postForm)
-          this.tagsList = postForm.tagsList
-          this.content = postForm.content
-
-          if (postForm.thumbnail !== null && postForm.thumbnail !== undefined) {
-            this.fileList[0] = {
-              uid: '-1',
-              name: 'xxx.png',
-              status: 'done',
-              url: postForm.thumbnail
-            }
-          }
-
-          const arr = []
-          if (postForm.tagsList !== undefined && postForm.tagsList !== null) {
-            postForm.tagsList.forEach((item, index) => {
-              arr[index] = String(item.id)
-            })
-          }
+          this.isSend = postForm.isSend
 
           this.form.resetFields()
           this.form = this.$form.createForm(this, {
-            onFieldsChange: (_, changedFields) => {
-            },
+            onFieldsChange: (_, changedFields) => {},
             mapPropsToFields: () => {
               return {
-                title: this.$form.createFormField({
-                  value: postForm.title
+                finderUin: this.$form.createFormField({
+                  value: postForm.finderUin
+                }),
+                fromChannelName: this.$form.createFormField({
+                  value: postForm.fromChannelName
+                }),
+                outSideAccountFlag: this.$form.createFormField({
+                  value: postForm.outSideAccountFlag === 1 ? '是' : '否'
+                }),
+                level: this.$form.createFormField({
+                  value: postForm.level
+                }),
+                weChatAccount: this.$form.createFormField({
+                  value: postForm.weChatAccount
                 }),
-                thumbnail: this.$form.createFormField({
-                  value: postForm.thumbnail
+                videoAccount: this.$form.createFormField({
+                  value: postForm.videoAccount
                 }),
-                content: this.$form.createFormField({
-                  value: postForm.content
+                isLocal: this.$form.createFormField({
+                  value: postForm.isLocal
                 }),
-                isComment: this.$form.createFormField({
-                  value: postForm.isComment
+                isSend: this.$form.createFormField({
+                  value: postForm.isSend
                 }),
-                categoryId: this.$form.createFormField({
-                  value: postForm.categoryId === 0 || postForm.categoryId === undefined ? '' : postForm.categoryId + ''
+                sendCount: this.$form.createFormField({
+                  value: postForm.sendCount
                 }),
-                weight: this.$form.createFormField({
-                  value: postForm.weight
+                sendReason: this.$form.createFormField({
+                  value: postForm.sendReason
                 }),
-                tagsList: this.$form.createFormField({
-                  value: arr
+                prove: this.$form.createFormField({
+                  value: postForm.prove
                 })
               }
             },
@@ -742,6 +719,7 @@ export default {
       this.$emit('resetData', false)
     },
     resetForm () {
+      this.isSend = 0
       this.form.resetFields()
     },
     handleChange ({ fileList }) {

+ 0 - 144
src/views/links/LinksList.vue

@@ -1,144 +0,0 @@
-<template>
-  <div class="app-container">
-    <a-card :bordered="false">
-      <SearchForm ref="SearchForm" @reloadData="reloadData"/>
-      <div class="table-operator">
-        <a-button type="primary" icon="plus" @click="createHandler">新建</a-button>
-      </div>
-      <s-table
-        ref="table"
-        size="default"
-        rowKey="id"
-        :columns="columns"
-        :data="loadData"
-        :alert="options.alert"
-        :rowSelection="options.rowSelection"
-        showPagination="true"
-      >
-        <span slot="logo" slot-scope="text, record">
-          <template>
-            <avatar-list size="large" ><avatar-list-item :tips="record.name" :src="text"/></avatar-list>
-          </template>
-        </span>
-
-        <span slot="action" slot-scope="text, record">
-          <template>
-            <a @click="handleEdit(record)">编辑</a>
-            <a-divider type="vertical" />
-            <a-popconfirm
-              title="确定删除这个标签?"
-              @confirm="handleDelete(record)"
-              @cancel="cancel"
-              okText="Yes"
-              cancelText="No"
-            >
-              <a href="#">删除</a>
-            </a-popconfirm>
-          </template>
-        </span>
-      </s-table>
-      <CreateForm
-        :formType="formType"
-        :visible="visible"
-        ref="createLinksForm"
-        @resetData="resetData"
-        @refreshTable="refreshTable"
-      />
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { STable, Ellipsis } from '@/components'
-import { table, filters } from './links-constants'
-import { fetchLinkList, deleteLink } from '@/api/link'
-import CreateForm from './modules/CreateForm'
-import SearchForm from './modules/SearchForm'
-import AvatarList from '@/components/AvatarList'
-const AvatarListItem = AvatarList.AvatarItem
-
-export default {
-  name: 'LinksList',
-  components: {
-    STable,
-    Ellipsis,
-    CreateForm,
-    SearchForm,
-    AvatarList,
-    AvatarListItem
-  },
-  filters: filters,
-  data () {
-    return {
-      queryParam: {},
-      loadData: parameter => {
-        return fetchLinkList(Object.assign(parameter, this.queryParam))
-          .then(res => {
-            return res
-          })
-      },
-      options: {
-        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
-        rowSelection: {
-          selectedRowKeys: this.selectedRowKeys,
-          onChange: this.onSelectChange
-        }
-      },
-      columns: table.columns,
-      visible: false,
-      formType: 'create'
-    }
-  },
-  created () { },
-  beforeCreate () {},
-  methods: {
-    resetData (flag) {
-      this.visible = flag
-      this.record = null
-    },
-    refreshTable () {
-      this.$refs.table.refresh()
-    },
-    reloadData (queryParam) {
-      this.queryParam = queryParam
-      this.refreshTable()
-    },
-    handleSub () {
-      this.visible = true
-    },
-    createHandler () {
-      this.formType = 'create'
-      this.visible = true
-      this.$refs.createLinksForm.resetForm()
-    },
-    handleEdit (record) {
-      this.formType = 'edit'
-      this.visible = true
-      this.$refs.createLinksForm.handleEdit(record)
-    },
-    handleDelete (row) {
-      deleteLink(row.id).then(res => {
-        this.$notification.success({
-          message: '删除成功'
-        })
-        this.$refs.table.refresh()
-      })
-    },
-    cancel () { },
-    handleSelectChange (value) {
-      // console.log(`Selected: ${value}`)
-    }
-  }
-}
-</script>
-
-<style scoped>
-  .edit-input {
-    padding-right: 100px;
-  }
-  .cancel-btn {
-    position: absolute;
-    right: 15px;
-    top: 10px;
-  }
-</style>

+ 0 - 47
src/views/links/links-constants.js

@@ -1,47 +0,0 @@
-// 表格列信息
-const table = {
-  columns: [
-    {
-      title: 'ID',
-      align: 'center',
-      dataIndex: 'id'
-    },
-    {
-      title: '排序',
-      align: 'center',
-      dataIndex: 'sort'
-    },
-    {
-      title: '友链名称',
-      align: 'center',
-      dataIndex: 'name'
-    },
-    {
-      title: '友链标题',
-      align: 'center',
-      dataIndex: 'title'
-    },
-    {
-      title: 'logo',
-      dataIndex: 'logo',
-      align: 'center',
-      scopedSlots: { customRender: 'logo' }
-    },
-    {
-      title: '友链地址',
-      align: 'center',
-      dataIndex: 'href'
-    },
-    {
-      title: '操作',
-      dataIndex: 'action',
-      align: 'center',
-      width: '150px',
-      scopedSlots: { customRender: 'action' }
-    }
-  ]
-}
-
-// 表格里面的列key value
-const filters = {}
-export { table, filters }

+ 0 - 254
src/views/links/modules/CreateForm.vue

@@ -1,254 +0,0 @@
-<template>
-  <div>
-    <a-drawer
-      :title="title"
-      placement="right"
-      :closable="true"
-      @close="onClose"
-      :visible="drawerVisible"
-      :width="950">
-      <a-form @submit="handleSubmit" :form="linksForm" class="form">
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="友链名称">
-              <a-input
-                placeholder="请输入友链名称"
-                v-decorator="['name', { rules: [{ required: true, message: '请输入友链名称', whitespace: true }] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="友链标题">
-              <a-input
-                placeholder="请输入友链标题"
-                v-decorator="['title', { rules: [{ required: true, message: '请输入友链标题', whitespace: true }] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="友链Logo">
-              <UpLoadImage
-                v-model="this.logo"
-                @getImageUrl="getLogo"
-                :placeholder="`请选择图标`"
-                ref="handlerLogoRef"
-                :imageUrl="this.logo"
-              ></UpLoadImage>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="友链地址">
-              <a-input
-                placeholder="请输入友链地址"
-                v-decorator="['href', { rules: [{ required: true, message: '请输入友链地址', whitespace: true }] }]"
-              />
-            </a-form-item>
-          </a-col>
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="友链排序">
-              <a-input
-                placeholder="友链排序"
-                v-decorator="['sort']"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="网站简介">
-              <a-input
-                placeholder="请输入网站简介"
-                v-decorator="['description', { rules: [{ required: true, message: '请输入网站简介', whitespace: true }] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <div
-          :style="{
-            position: 'absolute',
-            left: 0,
-            bottom: 0,
-            width: '100%',
-            borderTop: '1px solid #e9e9e9',
-            padding: '10px 16px',
-            background: '#fff',
-            textAlign: 'right',
-            zIndex: '10'
-          }"
-        >
-          <a-button :style="{marginRight: '8px'}" @click="onClose">取消</a-button>
-          <a-button type="primary" @click="handleSubmit">提交</a-button>
-        </div>
-      </a-form>
-    </a-drawer>
-  </div>
-</template>
-
-<script>
-import { createLink, fetchLink, updateLink } from '@/api/link'
-import UpLoadImage from '@/components/UpLoadImageAndFillInput/UpLoadImage'
-
-export default {
-  name: 'CreateLinksForm',
-  components: {
-    UpLoadImage
-  },
-  props: {
-    formType: {
-      type: String,
-      default: 'create'
-    },
-    visible: {
-      type: Boolean
-    }
-  },
-  data () {
-    return {
-      title: '新增友链',
-      id: null,
-      logo: null,
-      drawerVisible: false,
-      linksForm: this.$form.createForm(this, { name: 'create_links' })
-    }
-  },
-  watch: {
-    visible (val) {
-      this.drawerVisible = val
-    },
-    formType (val) {
-      this.title = (val === 'create' ? '新增友链' : '更新友链')
-    }
-  },
-  beforeCreate () { },
-  created () { },
-  methods: {
-    handleSubmit (e) {
-      e.preventDefault()
-      this.linksForm.validateFieldsAndScroll((err, values) => {
-        if (!err) {
-          console.log('Received values of form: ', values)
-          const createParams = { ...values }
-          createParams['logo'] = this.logo
-          if (this.formType === 'create') {
-            createLink(createParams)
-              .then(res => {
-                this.$notification.success({
-                  message: '新增友链成功'
-                })
-                this.$emit('refreshTable')
-              })
-              .catch(err => {
-                console.log(err)
-                this.$notification.success({
-                  message: '新增友链失败'
-                })
-              })
-          } else {
-            createParams['id'] = this.id
-            updateLink(createParams)
-              .then(res => {
-                this.$notification.success({
-                  message: '编辑友链成功'
-                })
-                this.$emit('refreshTable')
-              })
-              .catch(err => {
-                console.log(err)
-                this.$notification.success({
-                  message: '编辑友链失败'
-                })
-              })
-          }
-          this.resetForm()
-          this.drawerVisible = false
-          this.$emit('resetData', false)
-        }
-      })
-    },
-    handleEdit (record) {
-      this.id = record.id
-      fetchLink(record.id)
-        .then(response => {
-          const postForm = response.model
-          this.$refs.handlerLogoRef.handleUrl(postForm.logo)
-          this.linksForm.resetFields()
-          this.linksForm = this.$form.createForm(this, {
-            onFieldsChange: (_, changedFields) => {},
-            mapPropsToFields: () => {
-              return {
-                name: this.$form.createFormField({
-                  value: postForm.name
-                }),
-                title: this.$form.createFormField({
-                  value: postForm.title
-                }),
-                href: this.$form.createFormField({
-                  value: postForm.href
-                }),
-                logo: this.$form.createFormField({
-                  value: postForm.logo
-                }),
-                description: this.$form.createFormField({
-                  value: postForm.description
-                }),
-                sort: this.$form.createFormField({
-                  value: postForm.sort
-                })
-              }
-            },
-            onValuesChange: (_, values) => {
-              console.log(values)
-            }
-          })
-        })
-        .catch(err => {
-          console.log(err)
-        })
-
-      this.drawerVisible = true
-    },
-    onClose () {
-      this.resetForm()
-      this.drawerVisible = false
-      this.$emit('resetData', false)
-    },
-    resetForm () {
-      this.linksForm.resetFields()
-      this.$refs.handlerLogoRef.handleUrl(null)
-    },
-    getLogo (logo) {
-      this.logo = logo
-    },
-    handleSelectChange (value) {
-      console.log(`Selected: ${value}`)
-    }
-  }
-}
-</script>
-<style>
-  .edit-input {
-    padding-right: 100px;
-  }
-  .cancel-btn {
-    position: absolute;
-    right: 15px;
-    top: 10px;
-  }
-  .ant-upload-select-picture-card i {
-    font-size: 32px;
-    color: #999;
-  }
-
-  .ant-upload-select-picture-card .ant-upload-text {
-    margin-top: 8px;
-    color: #666;
-  }
-</style>

+ 0 - 64
src/views/links/modules/SearchForm.vue

@@ -1,64 +0,0 @@
-<template>
-  <div>
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="48">
-          <a-col :md="8" :sm="24">
-            <a-form-item label="友链名称">
-              <a-input v-model="queryParam.name" placeholder="请输入友链名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="8" :sm="24">
-            <a-form-item label="友链地址">
-              <a-input v-model="queryParam.href" placeholder="请输入友链地址"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="!advanced && 8 || 24" :sm="24">
-            <span class="table-page-search-submitButtons" :style="advanced && { float: 'right', overflow: 'hidden' } || {} ">
-              <a-button type="primary" @click="handlerSearch">查询</a-button>
-              <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-  </div>
-</template>
-
-<script>
-import moment from 'moment'
-export default {
-  name: 'SearchForm',
-  props: {
-  },
-  components: {
-  },
-  data () {
-    return {
-      // 高级搜索 展开/关闭
-      advanced: false,
-      // 查询参数
-      queryParam: {}
-    }
-  },
-  methods: {
-    handlerSearch () {
-      this.$emit('reloadData', this.queryParam)
-    },
-    toggleAdvanced () {
-      this.advanced = !this.advanced
-    },
-    resetSearchForm () {
-      this.queryParam = {
-        createTime: moment(new Date())
-      }
-    }
-  },
-  mounted () {
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 135
src/views/logs/LogsList.vue

@@ -1,135 +0,0 @@
-<template>
-  <div class="app-container">
-    <a-card :bordered="false">
-      <SearchForm ref="searchForm" @reloadData="reloadData"/>
-      <s-table
-        ref="table"
-        size="default"
-        rowKey="id"
-        :scroll="{ x: 1300 }"
-        :columns="columns"
-        :data="loadData"
-        :alert="options.alert"
-        :rowSelection="options.rowSelection"
-        showPagination="true"
-      >
-        <span slot="url" slot-scope="text">
-          <ellipsis :length="10" tooltip>{{ text }}</ellipsis>
-        </span>
-        <span slot="parameter" slot-scope="text">
-          <ellipsis :length="10" tooltip>{{ text }}</ellipsis>
-        </span>
-        <span slot="url" slot-scope="text">
-          <ellipsis :length="10" tooltip>{{ text }}</ellipsis>
-        </span>
-        <span slot="createTime" slot-scope="text">
-          {{ text | dayjs }}
-        </span>
-
-        <span slot="action" slot-scope="text, record">
-          <template>
-            <a-popconfirm
-              title="确定删除?"
-              @confirm="handleDelete(record)"
-              @cancel="cancel"
-              okText="Yes"
-              cancelText="No"
-            >
-              <a href="#">删除</a>
-            </a-popconfirm>
-          </template>
-        </span>
-      </s-table>
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { fetchLogsList } from '@/api/logs'
-import { STable, Ellipsis } from '@/components'
-import SearchForm from './modules/SearchForm'
-import { filters, table } from './logs-constants'
-import { deleteLogs } from '../../api/logs'
-export default {
-  name: 'LogsList',
-  components: {
-    STable,
-    Ellipsis,
-    SearchForm
-  },
-  filters: filters,
-  data () {
-    return {
-      queryParam: {},
-      loadData: parameter => {
-        return fetchLogsList(Object.assign(parameter, this.queryParam)).then(res => {
-          return res
-        })
-      },
-      options: {
-        alert: {
-          show: true,
-          clear: () => {
-            this.selectedRowKeys = []
-          }
-        },
-        rowSelection: {
-          selectedRowKeys: this.selectedRowKeys,
-          onChange: this.onSelectChange
-        }
-      },
-      columns: table.columns,
-      visible: false,
-      formType: 'create'
-    }
-  },
-  created () {},
-  methods: {
-    createHandler () {
-      this.formType = 'create'
-      this.visible = true
-      this.$refs.createUserForm.resetForm()
-    },
-    handleDelete (row) {
-      deleteLogs(row.id).then(res => {
-        this.$notification.success({
-          message: '删除成功'
-        })
-        this.$refs.table.refresh()
-      })
-    },
-    resetData (flag) {
-      this.visible = flag
-      this.record = null
-    },
-    refreshTable () {
-      this.$refs.table.refresh()
-    },
-    reloadData (queryParam) {
-      this.queryParam = queryParam
-      this.refreshTable()
-    },
-    cancel () { }
-  }
-}
-</script>
-
-<style scoped>
-.edit-input {
-  padding-right: 100px;
-}
-.cancel-btn {
-  position: absolute;
-  right: 15px;
-  top: 10px;
-}
-.ant-upload-select-picture-card i {
-  font-size: 32px;
-  color: #999;
-}
-
-.ant-upload-select-picture-card .ant-upload-text {
-  margin-top: 8px;
-  color: #666;
-}
-</style>

+ 0 - 135
src/views/logs/logs-constants.js

@@ -1,135 +0,0 @@
-// 表格列信息
-const table = {
-  columns: [
-    {
-      title: 'ID',
-      align: 'center',
-      dataIndex: 'id'
-    },
-    {
-      title: '用户ID',
-      align: 'center',
-      dataIndex: 'userId'
-    },
-    {
-      title: '日志类型',
-      align: 'center',
-      dataIndex: 'codeName'
-    },
-    {
-      title: 'ip地址',
-      align: 'center',
-      dataIndex: 'ip'
-    },
-    {
-      title: '请求URL',
-      align: 'center',
-      dataIndex: 'url',
-      scopedSlots: { customRender: 'url' }
-    },
-    {
-      title: '请求参数',
-      align: 'center',
-      dataIndex: 'parameter',
-      scopedSlots: { customRender: 'parameter' }
-    },
-    {
-      title: '设备',
-      align: 'center',
-      dataIndex: 'device'
-    },
-    {
-      title: '执行时间',
-      align: 'center',
-      dataIndex: 'runTime'
-    },
-    {
-      title: '创建时间',
-      align: 'center',
-      dataIndex: 'createTime',
-      scopedSlots: { customRender: 'createTime' }
-    },
-    {
-      title: '浏览器名称',
-      align: 'center',
-      dataIndex: 'browserName'
-    },
-    {
-      title: '浏览器版本号',
-      align: 'center',
-      dataIndex: 'browserVersion'
-    },
-    {
-      title: '操作',
-      dataIndex: 'action',
-      align: 'center',
-      fixed: 'right',
-      width: '250px',
-      scopedSlots: { customRender: 'action' }
-    }
-  ]
-}
-
-// 表格里面的列key value
-const filters = {
-  syncStatusFilter (status) {
-    const statusMap = {
-      0: '未同步',
-      1: '已同步'
-    }
-    return statusMap[status]
-  },
-  syncStatusTypeFilter (status) {
-    const statusMap = {
-      0: 'error',
-      1: 'success'
-    }
-    return statusMap[status]
-  },
-  statusFilter (status) {
-    const statusMap = {
-      1: '草稿箱',
-      2: '已发布'
-    }
-    return statusMap[status]
-  },
-  statusTypeFilter (status) {
-    const statusMap = {
-      1: 'error',
-      2: 'success'
-    }
-    return statusMap[status]
-  }
-}
-
-// md配置
-const markdownOption = {
-  bold: true, // 粗体
-  italic: true, // 斜体
-  header: true, // 标题
-  underline: true, // 下划线
-  strikethrough: false, // 中划线
-  mark: true, // 标记
-  superscript: false, // 上角标
-  subscript: false, // 下角标
-  quote: true, // 引用
-  ol: true, // 有序列表
-  ul: true, // 无序列表
-  link: true, // 链接
-  imagelink: true, // 图片链接
-  code: true, // code
-  table: true, // 表格
-  fullscreen: false, // 全屏编辑
-  readmodel: false, // 沉浸式阅读
-  help: true, // 帮助
-  undo: true, // 上一步
-  redo: true, // 下一步
-  trash: true, // 清空
-  save: true, // 保存(触发events中的save事件)
-  navigation: true, // 导航目录
-  subfield: true, // 单双栏模式
-  preview: true, // 预览
-  htmlcode: true// 展示html源码
-}
-
-export { table, filters, markdownOption }

+ 0 - 99
src/views/logs/modules/SearchForm.vue

@@ -1,99 +0,0 @@
-<template>
-  <div>
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="48">
-          <a-col :md="8" :sm="24">
-            <a-form-item label="用户ID">
-              <a-input v-model="queryParam.userId" placeholder="请输入用户ID"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="8" :sm="24">
-            <a-form-item label="请求URL">
-              <a-input v-model="queryParam.url" placeholder="请输入请求URL"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
-            <a-col :md="8" :sm="24">
-              <a-form-item label="设备">
-                <a-input v-model="queryParam.device" placeholder="请输入设备"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="8" :sm="24">
-              <a-form-item label="创建时间">
-                <a-date-picker @change="dateChange" style="width: 100%" placeholder="请输入更新日期"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="8" :sm="24">
-              <a-form-item label="ip地址">
-                <a-input v-model="queryParam.ip" placeholder="请输入ip地址"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="8" :sm="24">
-              <a-form-item label="浏览器名称">
-                <a-input v-model="queryParam.browserName" placeholder="请输入浏览器名称"/>
-              </a-form-item>
-            </a-col>
-          </template>
-          <a-col :md="!advanced && 8 || 24" :sm="24">
-            <span class="table-page-search-submitButtons" :style="advanced && { float: 'right', overflow: 'hidden' } || {} ">
-              <a-button type="primary" @click="handlerSearch">查询</a-button>
-              <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
-              <a @click="toggleAdvanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-  </div>
-</template>
-
-<script>
-import moment from 'moment'
-export default {
-  name: 'SearchForm',
-  props: {
-  },
-  components: {
-  },
-  data () {
-    return {
-      // 高级搜索 展开/关闭
-      advanced: false,
-      // 查询参数
-      queryParam: {}
-    }
-  },
-  methods: {
-    handlerSearch () {
-      console.log('这里提交表单')
-      console.log(this.queryParam)
-      this.$emit('reloadData', this.queryParam)
-    },
-    toggleAdvanced () {
-      this.advanced = !this.advanced
-    },
-    resetSearchForm () {
-      this.queryParam = {
-        createTime: moment(new Date())
-      }
-    },
-    dateChange (date, dateString) {
-      if (dateString !== '') {
-        this.queryParam.createTime = new Date(dateString[0]).getTime()
-      } else {
-        this.queryParam.createTime = null
-      }
-    }
-  },
-  mounted () {
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 138
src/views/menu/MenuList.vue

@@ -1,138 +0,0 @@
-<template>
-  <div class="app-container">
-    <a-card :bordered="false">
-      <SearchForm ref="SearchForm" @reloadData="reloadData"/>
-      <div class="table-operator">
-        <a-button type="primary" icon="plus" @click="createHandler">新建</a-button>
-      </div>
-      <s-table
-        ref="table"
-        size="default"
-        rowKey="id"
-        :columns="columns"
-        :data="loadData"
-        :alert="options.alert"
-        :rowSelection="options.rowSelection"
-        showPagination="true"
-      >
-        <span slot="action" slot-scope="text, record">
-          <template>
-            <a @click="handleEdit(record)">编辑</a>
-            <a-divider type="vertical" />
-            <a-popconfirm
-              title="确定删除这个菜单?"
-              @confirm="handleDelete(record)"
-              @cancel="cancel"
-              okText="Yes"
-              cancelText="No"
-            >
-              <a href="#">删除</a>
-            </a-popconfirm>
-          </template>
-        </span>
-      </s-table>
-      <CreateForm
-        :formType="formType"
-        :visible="visible"
-        ref="createMenuForm"
-        @resetData="resetData"
-        @refreshTable="refreshTable"
-      />
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { STable, Ellipsis } from '@/components'
-import { table, filters } from './menu-constants'
-import { fetchMenuList, deleteMenu } from '@/api/menu'
-import CreateForm from './modules/CreateForm'
-import SearchForm from './modules/SearchForm'
-import AvatarList from '@/components/AvatarList'
-const AvatarListItem = AvatarList.AvatarItem
-
-export default {
-  name: 'MenuList',
-  components: {
-    STable,
-    Ellipsis,
-    CreateForm,
-    SearchForm,
-    AvatarList,
-    AvatarListItem
-  },
-  filters: filters,
-  data () {
-    return {
-      queryParam: {},
-      loadData: parameter => {
-        return fetchMenuList(Object.assign(parameter, this.queryParam))
-          .then(res => {
-            return res
-          })
-      },
-      options: {
-        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
-        rowSelection: {
-          selectedRowKeys: this.selectedRowKeys,
-          onChange: this.onSelectChange
-        }
-      },
-      columns: table.columns,
-      visible: false,
-      formType: 'create'
-    }
-  },
-  created () { },
-  beforeCreate () {},
-  methods: {
-    resetData (flag) {
-      this.visible = flag
-      this.record = null
-    },
-    refreshTable () {
-      this.$refs.table.refresh()
-    },
-    reloadData (queryParam) {
-      this.queryParam = queryParam
-      this.refreshTable()
-    },
-    handleSub () {
-      this.visible = true
-    },
-    createHandler () {
-      this.formType = 'create'
-      this.visible = true
-      this.$refs.createMenuForm.resetForm()
-    },
-    handleEdit (record) {
-      this.formType = 'edit'
-      this.visible = true
-      this.$refs.createMenuForm.handleEdit(record)
-    },
-    handleDelete (row) {
-      deleteMenu(row.id).then(res => {
-        this.$notification.success({
-          message: '删除成功'
-        })
-        this.$refs.table.refresh()
-      })
-    },
-    cancel () { },
-    handleSelectChange (value) {
-      // console.log(`Selected: ${value}`)
-    }
-  }
-}
-</script>
-
-<style scoped>
-  .edit-input {
-    padding-right: 100px;
-  }
-  .cancel-btn {
-    position: absolute;
-    right: 15px;
-    top: 10px;
-  }
-</style>

+ 0 - 46
src/views/menu/menu-constants.js

@@ -1,46 +0,0 @@
-// 表格列信息
-const table = {
-  columns: [
-    {
-      title: 'ID',
-      align: 'center',
-      dataIndex: 'id'
-    },
-    {
-      title: '排序',
-      align: 'center',
-      dataIndex: 'sort'
-    },
-    {
-      title: '父菜单ID',
-      align: 'center',
-      dataIndex: 'parentId'
-    },
-    {
-      title: '菜单名称',
-      align: 'center',
-      dataIndex: 'title'
-    },
-    {
-      title: 'icon',
-      dataIndex: 'icon',
-      align: 'center'
-    },
-    {
-      title: '跳转路径',
-      align: 'center',
-      dataIndex: 'url'
-    },
-    {
-      title: '操作',
-      dataIndex: 'action',
-      align: 'center',
-      width: '150px',
-      scopedSlots: { customRender: 'action' }
-    }
-  ]
-}
-
-// 表格里面的列key value
-const filters = {}
-export { table, filters }

+ 0 - 230
src/views/menu/modules/CreateForm.vue

@@ -1,230 +0,0 @@
-<template>
-  <div>
-    <a-drawer
-      :title="title"
-      placement="right"
-      :closable="true"
-      @close="onClose"
-      :visible="drawerVisible"
-      :width="950">
-      <a-form @submit="handleSubmit" :form="menuForm" class="form">
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="菜单名称">
-              <a-input
-                placeholder="请输入菜单名称"
-                v-decorator="['title', { rules: [{ required: true, message: '请输入菜单名称', whitespace: true }] }]"
-              />
-              <a href="https://3x.ant.design/components/icon/"> sakura 主题菜单ICON地址</a>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="菜单icon">
-              <a-input
-                placeholder="请输入菜单名称"
-                v-decorator="['icon', { rules: [{ required: true, message: '请输入菜单ICON', whitespace: true }] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="跳转链接">
-              <a-input
-                placeholder="请输入跳转链接"
-                v-decorator="['url', { rules: [{ required: true, message: '请输入跳转链接', whitespace: true }] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="12" :md="6" :sm="12">
-            <a-form-item label="排序">
-              <a-input
-                placeholder="请输入排序"
-                v-decorator="['sort']"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="12" :md="6" :sm="12">
-            <a-form-item label="父菜单id">
-              <a-input
-                placeholder="请输入父菜单id"
-                v-decorator="['parentId']"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <div
-          :style="{
-            position: 'absolute',
-            left: 0,
-            bottom: 0,
-            width: '100%',
-            borderTop: '1px solid #e9e9e9',
-            padding: '10px 16px',
-            background: '#fff',
-            textAlign: 'right',
-            zIndex: '10'
-          }"
-        >
-          <a-button :style="{marginRight: '8px'}" @click="onClose">取消</a-button>
-          <a-button type="primary" @click="handleSubmit">提交</a-button>
-        </div>
-      </a-form>
-    </a-drawer>
-  </div>
-</template>
-
-<script>
-import { createMenu, fetchMenu, updateMenu } from '../../../api/menu'
-import UpLoadImage from '@/components/UpLoadImageAndFillInput/UpLoadImage'
-
-export default {
-  name: 'CreateMenuForm',
-  components: {
-    UpLoadImage
-  },
-  props: {
-    formType: {
-      type: String,
-      default: 'create'
-    },
-    visible: {
-      type: Boolean
-    }
-  },
-  data () {
-    return {
-      title: '新增菜单',
-      id: null,
-      drawerVisible: false,
-      icon: null,
-      menuForm: this.$form.createForm(this, { name: 'create_menu' })
-    }
-  },
-  watch: {
-    visible (val) {
-      this.drawerVisible = val
-    },
-    formType (val) {
-      this.title = (val === 'create' ? '新增菜单' : '更新菜单')
-    }
-  },
-  beforeCreate () { },
-  created () { },
-  methods: {
-    handleSubmit (e) {
-      e.preventDefault()
-      this.menuForm.validateFieldsAndScroll((err, values) => {
-        if (!err) {
-          console.log('Received values of form: ', values)
-          const createParams = { ...values }
-          if (this.formType === 'create') {
-            createMenu(createParams)
-              .then(res => {
-                this.$notification.success({
-                  message: '新增菜单成功'
-                })
-                this.$emit('refreshTable')
-              })
-              .catch(err => {
-                console.log(err)
-              })
-          } else {
-            createParams['id'] = this.id
-            updateMenu(createParams)
-              .then(res => {
-                this.$notification.success({
-                  message: '编辑菜单成功'
-                })
-                this.$emit('refreshTable')
-              })
-              .catch(err => {
-                console.log(err)
-              })
-          }
-          this.resetForm()
-          this.drawerVisible = false
-          this.$emit('resetData', false)
-        }
-      })
-    },
-    handleEdit (record) {
-      this.id = record.id
-      fetchMenu(record.id)
-        .then(response => {
-          const postForm = response.model
-          this.menuForm.resetFields()
-          this.menuForm = this.$form.createForm(this, {
-            onFieldsChange: (_, changedFields) => {},
-            mapPropsToFields: () => {
-              return {
-                parentId: this.$form.createFormField({
-                  value: postForm.parentId
-                }),
-                title: this.$form.createFormField({
-                  value: postForm.title
-                }),
-                icon: this.$form.createFormField({
-                  value: postForm.icon
-                }),
-                url: this.$form.createFormField({
-                  value: postForm.url
-                }),
-                sort: this.$form.createFormField({
-                  value: postForm.sort
-                })
-              }
-            },
-            onValuesChange: (_, values) => {
-              console.log(values)
-            }
-          })
-        })
-        .catch(err => {
-          console.log(err)
-        })
-
-      this.drawerVisible = true
-    },
-    onClose () {
-      this.resetForm()
-      this.drawerVisible = false
-      this.$emit('resetData', false)
-    },
-    resetForm () {
-      this.menuForm.resetFields()
-    },
-    getIcon (icon) {
-      this.icon = icon
-    },
-    handleSelectChange (value) {
-      console.log(`Selected: ${value}`)
-    }
-  }
-}
-</script>
-<style>
-  .edit-input {
-    padding-right: 100px;
-  }
-  .cancel-btn {
-    position: absolute;
-    right: 15px;
-    top: 10px;
-  }
-  .ant-upload-select-picture-card i {
-    font-size: 32px;
-    color: #999;
-  }
-
-  .ant-upload-select-picture-card .ant-upload-text {
-    margin-top: 8px;
-    color: #666;
-  }
-</style>

+ 0 - 75
src/views/menu/modules/SearchForm.vue

@@ -1,75 +0,0 @@
-<template>
-  <div>
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="48">
-          <a-col :md="8" :sm="24">
-            <a-form-item label="菜单名称">
-              <a-input v-model="queryParam.title" placeholder="请输入菜单名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="8" :sm="24">
-            <a-form-item label="跳转链接">
-              <a-input v-model="queryParam.url" placeholder="请输入跳转链接"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
-            <a-col :md="8" :sm="24">
-              <a-form-item label="父菜单Id">
-                <a-input v-model="queryParam.parentId" placeholder="请输入父菜单Id"/>
-              </a-form-item>
-            </a-col>
-          </template>
-          <a-col :md="!advanced && 8 || 24" :sm="24">
-            <span class="table-page-search-submitButtons" :style="advanced && { float: 'right', overflow: 'hidden' } || {} ">
-              <a-button type="primary" @click="handlerSearch">查询</a-button>
-              <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
-              <a @click="toggleAdvanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-  </div>
-</template>
-
-<script>
-import moment from 'moment'
-export default {
-  name: 'SearchForm',
-  props: {
-  },
-  components: {
-  },
-  data () {
-    return {
-      // 高级搜索 展开/关闭
-      advanced: false,
-      // 查询参数
-      queryParam: {}
-    }
-  },
-  methods: {
-    handlerSearch () {
-      this.$emit('reloadData', this.queryParam)
-    },
-    toggleAdvanced () {
-      this.advanced = !this.advanced
-    },
-    resetSearchForm () {
-      this.queryParam = {
-        createTime: moment(new Date())
-      }
-    }
-  },
-  mounted () {
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 194
src/views/social/SocialList.vue

@@ -1,194 +0,0 @@
-<template>
-  <div class="app-container">
-    <a-card :bordered="false">
-      <SearchForm ref="searchForm" @reloadData="reloadData"/>
-      <div class="table-operator">
-        <a-button type="primary" icon="plus" @click="createHandler">新建</a-button>
-      </div>
-      <s-table
-        ref="table"
-        size="default"
-        rowKey="id"
-        :scroll="{ x: 1300 }"
-        :columns="columns"
-        :data="loadData"
-        :alert="options.alert"
-        :rowSelection="options.rowSelection"
-        showPagination="true"
-      >
-
-        <span slot="content" slot-scope="text, record">
-          <template>
-            <avatar-list v-if="record.showType===1" size="large" ><avatar-list-item :tips="text" :src="text"/></avatar-list>
-            <ellipsis v-if="record.showType!==1"  :length="10" tooltip>{{ text }}</ellipsis>
-          </template>
-        </span>
-
-        <span slot="icon" slot-scope="text">
-          <template>
-            <avatar-list size="large" ><avatar-list-item :tips="text" :src="text"/></avatar-list>
-          </template>
-        </span>
-
-        <span slot="showType" slot-scope="text">
-          <template>
-            <a v-if="text === 1">图片</a>
-            <a v-if="text === 2">文本信息</a>
-            <a v-if="text === 3">跳转链接</a>
-          </template>
-        </span>
-
-        <span slot="isEnabled" slot-scope="text">
-          <template>
-            <a v-if="text === 0">否</a>
-            <a v-if="text === 1">是</a>
-          </template>
-        </span>
-
-        <span slot="isHome" slot-scope="text">
-          <template>
-            <a v-if="text === 0">否</a>
-            <a v-if="text === 1">是</a>
-          </template>
-        </span>
-
-        <span slot="remark" slot-scope="text">
-          <ellipsis :length="10" tooltip>{{ text }}</ellipsis>
-        </span>
-
-        <span slot="createTime" slot-scope="text">
-          {{ text | dayjs }}
-        </span>
-
-        <span slot="updateTime" slot-scope="text">
-          {{ text | dayjs }}
-        </span>
-
-        <span slot="action" slot-scope="text, record">
-          <template>
-            <a @click="handleEdit(record)">编辑</a>
-            <a-divider type="vertical" />
-            <a-popconfirm
-              title="确定删除这个社交信息?"
-              @confirm="handleDelete(record)"
-              @cancel="cancel"
-              okText="Yes"
-              cancelText="No"
-            >
-              <a href="#">删除</a>
-            </a-popconfirm>
-          </template>
-        </span>
-      </s-table>
-
-      <CreateForm
-        :formType="formType"
-        :visible="visible"
-        ref="createSocialForm"
-        @resetData="resetData"
-        @refreshTable="refreshTable"
-      />
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { STable, Ellipsis } from '@/components'
-import CreateForm from './modules/CreateForm'
-import SearchForm from './modules/SearchForm'
-import { filters, table } from './social-constants'
-import AvatarList from '@/components/AvatarList'
-import { fetchSocialList } from '@/api/social'
-import { deleteSocial } from '../../api/social'
-
-const AvatarListItem = AvatarList.AvatarItem
-
-export default {
-  name: 'SocialList',
-  components: {
-    STable,
-    Ellipsis,
-    CreateForm,
-    SearchForm,
-    AvatarList,
-    AvatarListItem
-
-  },
-  filters: filters,
-  data () {
-    return {
-      queryParam: {},
-      loadData: parameter => {
-        return fetchSocialList(Object.assign(parameter, this.queryParam)).then(res => {
-          return res
-        })
-      },
-      options: {
-        alert: {
-          show: true,
-          clear: () => {
-            this.selectedRowKeys = []
-          }
-        },
-        rowSelection: {
-          selectedRowKeys: this.selectedRowKeys,
-          onChange: this.onSelectChange
-        }
-      },
-      columns: table.columns,
-      visible: false,
-      formType: 'create'
-    }
-  },
-  created () {},
-  methods: {
-    createHandler () {
-      this.formType = 'create'
-      this.visible = true
-      this.$refs.createSocialForm.resetForm()
-    },
-    handleEdit (record) {
-      this.$refs.createSocialForm.handleEdit(record)
-      this.formType = 'edit'
-      this.visible = true
-    },
-    handleDelete (row) {
-      deleteSocial(row.id).then(res => {
-        this.$refs.table.refresh()
-      })
-    },
-    resetData (flag) {
-      this.visible = flag
-      this.record = null
-    },
-    refreshTable () {
-      this.$refs.table.refresh()
-    },
-    reloadData (queryParam) {
-      this.queryParam = queryParam
-      this.refreshTable()
-    },
-    cancel () { }
-  }
-}
-</script>
-
-<style scoped>
-.edit-input {
-  padding-right: 100px;
-}
-.cancel-btn {
-  position: absolute;
-  right: 15px;
-  top: 10px;
-}
-.ant-upload-select-picture-card i {
-  font-size: 32px;
-  color: #999;
-}
-
-.ant-upload-select-picture-card .ant-upload-text {
-  margin-top: 8px;
-  color: #666;
-}
-</style>

+ 0 - 313
src/views/social/modules/CreateForm.vue

@@ -1,313 +0,0 @@
-<template>
-  <div>
-    <a-drawer
-      :title="title"
-      placement="right"
-      :closable="true"
-      @close="onClose"
-      :visible="drawerVisible"
-      :width="950">
-      <a-form @submit="handleSubmit" :form="socialFrom" class="form">
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="code">
-              <a-row class="form-row" :gutter="16" justify="space-between">
-                <a-col :lg="22" :md="12" :sm="24">
-                  <a-select placeholder="请选择code" v-show="!isAddCode" v-decorator="['code', { rules: [{ required: true, message: '请输入code', whitespace: true }] }]" >
-                    <a-select-option value="byteblogs">ByteBlogs</a-select-option>
-                    <a-select-option value="QQ">QQ</a-select-option>
-                    <a-select-option value="CSDN">CSDN</a-select-option>
-                    <a-select-option value="reward">打赏</a-select-option>
-                    <a-select-option value="qrCode">二维码</a-select-option>
-                    <a-select-option value="email">邮箱</a-select-option>
-                    <a-select-option value="sifou">思否</a-select-option>
-                    <a-select-option value="oschina">开源中国</a-select-option>
-                  </a-select>
-                  <a-input
-                    placeholder="请输入code"
-                    v-show="isAddCode"
-                    v-decorator="['code', { rules: [{ required: true, message: '请输入code', whitespace: true }] }]"
-                  />
-                </a-col>
-                <a-col :lg="2" :md="12" :sm="24">
-                  <a-button
-                    type="primary"
-                    :icon="isAddCode?'select':'plus-circle'"
-                    size="small"
-                    shape="circle"
-                    @click="handlerAddCode"></a-button>
-                </a-col>
-              </a-row>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="展示类型">
-              <a-radio-group v-decorator="['showType', { initialValue: 1 }]" @change="changeShowType">
-                <a-radio :value="1">图片</a-radio>
-                <a-radio :value="2">文本信息</a-radio>
-                <a-radio :value="3">跳转链接</a-radio>
-              </a-radio-group>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="是否启用">
-              <a-radio-group v-decorator="['isEnabled', { initialValue: 0 }]">
-                <a-radio :value="0">否</a-radio>
-                <a-radio :value="1">是</a-radio>
-              </a-radio-group>
-            </a-form-item>
-          </a-col>
-          <a-col :lg="8" :md="12" :sm="24">
-            <a-form-item label="是否主页社交信息">
-              <a-radio-group v-decorator="['isHome', { initialValue: 0 }]">
-                <a-radio :value="0">否</a-radio>
-                <a-radio :value="1">是</a-radio>
-              </a-radio-group>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="图标">
-              <UpLoadImage
-                @getImageUrl="getIcon"
-                :placeholder="`请选择图标`"
-                ref="handlerIconRef"
-                :imageUrl="this.icon"
-              ></UpLoadImage>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="备注">
-              <a-input
-                placeholder="请输入备注"
-                v-decorator="['remark']"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row class="form-row" :gutter="16">
-          <a-col :lg="24" :md="12" :sm="24">
-            <a-form-item label="社交内容">
-              <a-input v-show="!show" placeholder="请输入社交内容" v-decorator="['content']"/>
-              <UpLoadImage
-                v-show="show"
-                @getImageUrl="getContent"
-                ref="handlerContentRef"
-                :placeholder="`请输入社交内容`"
-                :imageUrl="this.content"
-                :style="show?'':'display: none'"></UpLoadImage>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <div
-          :style="{
-            position: 'absolute',
-            left: 0,
-            bottom: 0,
-            width: '100%',
-            borderTop: '1px solid #e9e9e9',
-            padding: '10px 16px',
-            background: '#fff',
-            textAlign: 'right',
-            zIndex: '10'
-          }"
-        >
-          <a-button :style="{marginRight: '8px'}" @click="onClose">取消</a-button>
-          <a-button type="primary" @click="handleSubmit">提交</a-button>
-        </div>
-      </a-form>
-    </a-drawer>
-  </div>
-</template>
-
-<script>
-import { fetchSocial, updateSocial } from '@/api/social'
-import { createSocial } from '../../../api/social'
-import UpLoadImage from '@/components/UpLoadImageAndFillInput/UpLoadImage'
-export default {
-  name: 'CreateSocialForm',
-  components: {
-    UpLoadImage
-  },
-  props: {
-    formType: {
-      type: String,
-      default: 'create'
-    },
-    visible: {
-      type: Boolean
-    }
-  },
-  data () {
-    return {
-      title: '新增社交信息',
-      id: null,
-      drawerVisible: false,
-      socialFrom: this.$form.createForm(this, { name: 'create_social' }),
-      content: null,
-      icon: null,
-      show: true,
-      iconShow: true,
-      isAddCode: false
-    }
-  },
-  watch: {
-    visible (val) {
-      this.drawerVisible = val
-    },
-    formType (val) {
-      this.title = (val === 'create' ? '新增社交信息' : '更新社交信息')
-    }
-  },
-  beforeCreate () {},
-  created () {},
-  methods: {
-    handleSubmit (e) {
-      e.preventDefault()
-      this.socialFrom.validateFieldsAndScroll((err, values) => {
-        if (!err) {
-          console.log('Received values of form: ', values)
-          const createParams = { ...values }
-          if (createParams['showType'] === 1) {
-            createParams['content'] = this.content
-          }
-          createParams['icon'] = this.icon
-
-          if (this.formType === 'create') {
-            createSocial(createParams)
-              .then(res => {
-                this.$notification.success({
-                  message: '新增社交信息成功'
-                })
-                this.$emit('refreshTable')
-              })
-              .catch(err => {
-                console.log(err)
-              })
-          } else {
-            createParams['id'] = this.id
-            updateSocial(createParams)
-              .then(res => {
-                this.$notification.success({
-                  message: '编辑社交信息成功'
-                })
-                this.$emit('refreshTable')
-              })
-              .catch(err => {
-              })
-          }
-          this.resetForm()
-          this.drawerVisible = false
-          this.$emit('resetData', false)
-        }
-      })
-    },
-    handleEdit (record) {
-      this.id = record.id
-      fetchSocial(record.id)
-        .then(response => {
-          const postForm = response.model
-          if (postForm.showType === 1) {
-            this.show = true
-            this.$refs.handlerContentRef.handleUrl(postForm.content)
-          } else {
-            this.show = false
-          }
-          this.$refs.handlerIconRef.handleUrl(postForm.icon)
-          this.socialFrom.resetFields()
-          this.socialFrom = this.$form.createForm(this, {
-            onFieldsChange: (_, changedFields) => {},
-            mapPropsToFields: () => {
-              return {
-                content: this.$form.createFormField({
-                  value: postForm.content
-                }),
-                showType: this.$form.createFormField({
-                  value: postForm.showType
-                }),
-                remark: this.$form.createFormField({
-                  value: postForm.remark
-                }),
-                icon: this.$form.createFormField({
-                  value: postForm.icon
-                }),
-                isEnabled: this.$form.createFormField({
-                  value: postForm.isEnabled
-                }),
-                isHome: this.$form.createFormField({
-                  value: postForm.isHome
-                }),
-                code: this.$form.createFormField({
-                  value: postForm.code
-                })
-              }
-            },
-            onValuesChange: (_, values) => {
-              console.log(values)
-            }
-          })
-        })
-        .catch(err => {
-          console.log(err)
-        })
-      this.drawerVisible = true
-    },
-    getContent (content) {
-      this.content = content
-    },
-    getIcon (icon) {
-      this.icon = icon
-    },
-    onClose () {
-      this.resetForm()
-      this.drawerVisible = false
-      this.$emit('resetData', false)
-    },
-    resetForm () {
-      this.show = true
-      this.socialFrom.resetFields()
-      this.$refs.handlerContentRef.handleUrl(null)
-      this.$refs.handlerIconRef.handleUrl(null)
-    },
-    handleSelectChange (value) {
-      console.log(`Selected: ${value}`)
-    },
-    changeShowType (e) {
-      if (e.target.value === 1) {
-        this.show = true
-      } else {
-        this.show = false
-      }
-    },
-    handlerAddCode () {
-      this.isAddCode = !this.isAddCode
-    }
-  }
-}
-</script>
-<style>
-  .edit-input {
-    padding-right: 100px;
-  }
-  .cancel-btn {
-    position: absolute;
-    right: 15px;
-    top: 10px;
-  }
-  .ant-upload-select-picture-card i {
-    font-size: 32px;
-    color: #999;
-  }
-
-  .ant-upload-select-picture-card .ant-upload-text {
-    margin-top: 8px;
-    color: #666;
-  }
-</style>

+ 0 - 74
src/views/social/modules/SearchForm.vue

@@ -1,74 +0,0 @@
-<template>
-  <div>
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="48">
-          <a-col :md="8" :sm="24">
-            <a-form-item label="code">
-              <a-input v-model="queryParam.code" placeholder="请输入code"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="8" :sm="24">
-            <a-form-item label="社交内容">
-              <a-input v-model="queryParam.content" placeholder="请输入社交内容"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
-            <a-col :md="8" :sm="24">
-              <a-form-item label="展示类型">
-                <a-select v-model="queryParam.showType" placeholder="请选择" default-value="0">
-                  <a-select-option value="1">图片</a-select-option>
-                  <a-select-option value="2">文本信息</a-select-option>
-                  <a-select-option value="3">跳转链接</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-          </template>
-          <a-col :md="!advanced && 8 || 24" :sm="24">
-            <span class="table-page-search-submitButtons" :style="advanced && { float: 'right', overflow: 'hidden' } || {} ">
-              <a-button type="primary" @click="handlerSearch">查询</a-button>
-              <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
-              <a @click="toggleAdvanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'SearchForm',
-  props: {},
-  components: {},
-  data () {
-    return {
-      // 高级搜索 展开/关闭
-      advanced: false,
-      // 查询参数
-      queryParam: {}
-    }
-  },
-  methods: {
-    handlerSearch () {
-      console.log(this.queryParam)
-      this.$emit('reloadData', this.queryParam)
-    },
-    toggleAdvanced () {
-      this.advanced = !this.advanced
-    },
-    resetSearchForm () {
-      this.queryParam = {}
-    }
-  },
-  mounted () {}
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 76
src/views/social/social-constants.js

@@ -1,76 +0,0 @@
-// 表格列信息
-const table = {
-  columns: [
-    {
-      title: 'ID',
-      align: 'center',
-      dataIndex: 'id'
-    },
-    {
-      title: 'code',
-      align: 'center',
-      dataIndex: 'code'
-    },
-    {
-      title: '社交内容',
-      align: 'center',
-      dataIndex: 'content',
-      scopedSlots: { customRender: 'content' }
-    },
-    {
-      title: '图标',
-      align: 'center',
-      dataIndex: 'icon',
-      scopedSlots: { customRender: 'icon' }
-    },
-    {
-      title: '展示类型',
-      align: 'center',
-      dataIndex: 'showType',
-      scopedSlots: { customRender: 'showType' }
-    },
-    {
-      title: '备注',
-      align: 'center',
-      dataIndex: 'remark',
-      scopedSlots: { customRender: 'remark' }
-    },
-    {
-      title: '主页社交信息',
-      align: 'center',
-      dataIndex: 'isHome',
-      scopedSlots: { customRender: 'isHome' }
-    },
-    {
-      title: '启用',
-      align: 'center',
-      dataIndex: 'isEnabled',
-      scopedSlots: { customRender: 'isEnabled' }
-    },
-    {
-      title: '创建时间',
-      align: 'center',
-      dataIndex: 'createTime',
-      scopedSlots: { customRender: 'createTime' }
-    },
-    {
-      title: '更新时间',
-      align: 'center',
-      dataIndex: 'updateTime',
-      scopedSlots: { customRender: 'updateTime' }
-    },
-    {
-      title: '操作',
-      dataIndex: 'action',
-      align: 'center',
-      fixed: 'right',
-      width: '250px',
-      scopedSlots: { customRender: 'action' }
-    }
-  ]
-}
-
-// 表格里面的列key value
-const filters = { }
-
-export { table, filters }