Explorar o código

增加网站管理

hfxc226 %!s(int64=2) %!d(string=hai) anos
pai
achega
5a339e3364

+ 1 - 1
public/utf8-jsp/ueditor.config.js

@@ -41,7 +41,7 @@
             'directionalityltr', 'directionalityrtl', 'indent', '|',
             'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
             'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
-            'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
+            /*'simpleupload', 'insertimage',*/ 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
             'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
             'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
             'print', 'preview', 'searchreplace', 'drafts', 'help'

+ 2 - 2
src/api/qykh/plan.js

@@ -72,9 +72,9 @@ export function fetchPlan (parameter) {
  * @param parameter
  * @returns {*}
  */
-export function fetchProductTree (parameter) {
+export function fetchPlanTree (parameter) {
   return axios({
-    url: '/qykh/products/tree?' + stringify(parameter),
+    url: '/qykh/plans/tree?' + stringify(parameter),
     method: 'get',
     headers: {
       'Content-Type': 'application/json;charset=UTF-8'

+ 17 - 27
src/views/qykh/plan/Plan.vue

@@ -22,15 +22,12 @@
       <a-button v-if="$auth('operate-articles-add')" type="primary" icon="plus" @click="$refs.baseModal.base()">新增</a-button>
     </div>
 
-    <s-table
+    <a-table
       ref="table"
       size="default"
       rowKey="id"
       :columns="columns"
-      :data="loadData"
-      :alert="options.alert"
-      :rowSelection="options.rowSelection"
-      showPagination="auto"
+      :data-source="dataSource"
     >
       <span slot="action" slot-scope="record">
         <template>
@@ -39,8 +36,8 @@
           <a @click="handleEdit(record)">修改</a>
         </template>
       </span>
-    </s-table>
-    <base-form ref="baseModal"  @ok="handleOk"/>
+    </a-table>
+    <base-form ref="baseModal" @ok="handleOk"/>
     <detail ref="detailModal" />
   </a-card>
 </template>
@@ -50,10 +47,9 @@ import { STable, Ellipsis } from '@/components'
 import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
 import {
-  getPlanPage,
-  fetchPlan
+  fetchPlan,
+  fetchPlanTree
 } from '@/api/qykh/plan'
-import DictCache from '@/utils/dict'
 
 export default {
   name: 'PlanDetailList',
@@ -65,6 +61,7 @@ export default {
   },
   data () {
     return {
+      dataSource: [],
       // 查询参数
       queryParam: {
       },
@@ -72,26 +69,15 @@ export default {
       columns: [
         {
           title: '序号',
-          dataIndex: 'index',
-          customRender: (text, record, index) => {
-            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
-          }
+          dataIndex: 'id'
         },
         {
           title: '标题',
-          dataIndex: 'planname'
-        },
-     /*   {
-          title: '摘要',
-          dataIndex: 'shortdesc'
-        },*/
-        {
-          title: '排序',
-          dataIndex: 'ord'
+          dataIndex: 'title'
         },
         {
           title: 'pid',
-          dataIndex: 'pid'
+          dataIndex: 'parentId'
         },
         {
           title: '操作',
@@ -110,7 +96,7 @@ export default {
             sortName: 'time'
           }
         }
-        return getPlanPage(Object.assign(parameter, this.queryParam))
+        return fetchPlanTree(Object.assign(parameter, this.queryParam))
           .then(res => {
             return res.data
           })
@@ -129,9 +115,13 @@ export default {
     }
   },
   created () {
+    this.tableOption()
   },
   methods: {
     tableOption () {
+      fetchPlanTree().then(res => {
+        this.dataSource = res.data
+      })
       if (!this.optionAlertShow) {
         this.options = {
           alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
@@ -141,7 +131,7 @@ export default {
             getCheckboxProps: record => ({
               props: {
                 disabled: false,
-                name: record.id + ''
+                name: record.id
               }
             })
           }
@@ -178,7 +168,7 @@ export default {
       this.queryParam = {
       }
       this.$refs.table.refresh(true)
-    },
+    }
   }
 }
 </script>

+ 1 - 1
src/views/qykh/plan/modules/BaseForm.vue

@@ -94,7 +94,7 @@ export default {
       type: null,
       editorConfig: {
         UEDITOR_HOME_URL: '/utf8-jsp/',
-        serverUrl: uploadUrl
+        serverUrl: 'http://localhost:8000/api/upms/files/upload'
       }
     }
   },