Quellcode durchsuchen

增加网站管理

hfxc226 vor 2 Jahren
Ursprung
Commit
7b7da6dfad

+ 20 - 8
src/views/qykh/hotspot-help/HotspotHelp.vue

@@ -8,6 +8,20 @@
               <a-input v-model.trim="queryParam.title" placeholder="请输入名称/类型名称"/>
             </a-form-item>
           </a-col>
+          <a-col :md="8" :sm="24">
+            <a-form-item label="类型">
+              <a-tree-select
+                style="width: 100%"
+                :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+                :treeData="treeData"
+                :treeNodeFilterProp="'title'"
+                :showSearch="true"
+                v-model="queryParam.hid"
+                placeholder="请选择"
+              >
+              </a-tree-select>
+            </a-form-item>
+          </a-col>
           <a-col :md="8 || 24" :sm="24">
             <span class="table-page-search-submitButtons">
               <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
@@ -54,6 +68,7 @@ import {
   fetchHotspotHelp
 } from '@/api/qykh/hotspothelp'
 
+import { fetchHotspotTree } from '@/api/qykh/hotspot'
 export default {
   name: 'PlanDetailList',
   components: {
@@ -64,6 +79,7 @@ export default {
   },
   data () {
     return {
+      treeData: [],
       // 查询参数
       queryParam: {
       },
@@ -71,19 +87,12 @@ 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: 'title'
         },
-     /*   {
-          title: '摘要',
-          dataIndex: 'shortdesc'
-        },*/
         {
           title: 'hid',
           dataIndex: 'hid'
@@ -136,6 +145,9 @@ export default {
     }
   },
   created () {
+    fetchHotspotTree().then(res => {
+      this.treeData = res.data
+    })
   },
   methods: {
     tableOption () {

+ 14 - 34
src/views/qykh/hotspot/Hotspot.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,7 +36,7 @@
           <a @click="handleEdit(record)">修改</a>
         </template>
       </span>
-    </s-table>
+    </a-table>
     <base-form ref="baseModal" @ok="handleOk"/>
     <detail ref="detailModal" />
   </a-card>
@@ -51,7 +48,8 @@ import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
 import {
   getHotspotPage,
-  fetchHotspot
+  fetchHotspot,
+  fetchHotspotTree
 } from '@/api/qykh/hotspot'
 
 export default {
@@ -64,6 +62,7 @@ export default {
   },
   data () {
     return {
+      dataSource: [],
       // 查询参数
       queryParam: {
       },
@@ -71,38 +70,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: 'hname'
-        },
-        {
-          title: 'desrc',
-          dataIndex: 'desrc'
-        },
-        /* {
-          title: '摘要',
-          dataIndex: 'shortdesc'
-        },
-        {
-          title: 'purl',
-          dataIndex: 'purl'
+          dataIndex: 'title'
         },
         {
-          title: 'bannerurl',
-          dataIndex: 'bannerurl'
-        }, */
-        {
-          title: '关键字',
-          dataIndex: 'keywords'
-        },
-        {
-          title: '排序',
-          dataIndex: 'ord'
+          title: '父类型id',
+          dataIndex: 'parentId'
         },
         {
           title: '操作',
@@ -140,9 +116,13 @@ export default {
     }
   },
   created () {
+    this.tableOption()
   },
   methods: {
     tableOption () {
+      fetchHotspotTree().then(res => {
+        this.dataSource = res.data
+      })
       if (!this.optionAlertShow) {
         this.options = {
           alert: { show: true, clear: () => { this.selectedRowKeys = [] } },

+ 8 - 3
src/views/qykh/hotspot/modules/BaseForm.vue

@@ -33,10 +33,12 @@
         :labelCol="labelCol"
         :wrapperCol="wrapperCol"
       >
-        <wang-editor
+<!--        <wang-editor
           :content="desrc"
           @catchData="catchData"
-        ></wang-editor>
+        ></wang-editor>-->
+        <vue-ueditor-wrap v-model="descr" :config="editorConfig" editor-id="editor-demo-01"></vue-ueditor-wrap>
+
       </a-form-item>
     </a-form>
     <template slot="footer">
@@ -77,7 +79,10 @@ export default {
       visible: false,
       desrc: '',
       resultContent: '',
-      type: null
+      type: null,
+      editorConfig: {
+        UEDITOR_HOME_URL: '/utf8-jsp/'
+      }
     }
   },
   props: {

+ 20 - 4
src/views/qykh/information-help/InformationHelp.vue

@@ -8,6 +8,20 @@
               <a-input v-model.trim="queryParam.title" placeholder="请输入名称/类型名称"/>
             </a-form-item>
           </a-col>
+          <a-col :md="8" :sm="24">
+            <a-form-item label="类型">
+              <a-tree-select
+                style="width: 100%"
+                :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+                :treeData="treeData"
+                :treeNodeFilterProp="'title'"
+                :showSearch="true"
+                v-model="queryParam.pid"
+                placeholder="请选择"
+              >
+              </a-tree-select>
+            </a-form-item>
+          </a-col>
           <a-col :md="8 || 24" :sm="24">
             <span class="table-page-search-submitButtons">
               <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
@@ -54,6 +68,7 @@ import {
   fetchInformationHelp
 } from '@/api/qykh/informationhelp'
 
+import { fetchInformationTree } from '@/api/qykh/information'
 export default {
   name: 'PlanDetailList',
   components: {
@@ -64,6 +79,7 @@ export default {
   },
   data () {
     return {
+      treeData: [],
       // 查询参数
       queryParam: {
       },
@@ -71,10 +87,7 @@ 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: '标题',
@@ -136,6 +149,9 @@ export default {
     }
   },
   created () {
+    fetchInformationTree().then(res => {
+      this.treeData = res.data
+    })
   },
   methods: {
     tableOption () {

+ 8 - 3
src/views/qykh/information-help/modules/BaseForm.vue

@@ -50,10 +50,12 @@
         :labelCol="labelCol"
         :wrapperCol="wrapperCol"
       >
-        <wang-editor
+<!--        <wang-editor
           :content="descr"
           @catchData="catchData"
-        ></wang-editor>
+        ></wang-editor>-->
+        <vue-ueditor-wrap v-model="descr" :config="editorConfig" editor-id="editor-demo-01"></vue-ueditor-wrap>
+
       </a-form-item>
     </a-form>
     <template slot="footer">
@@ -94,7 +96,10 @@ export default {
       visible: false,
       descr: '',
       resultContent: '',
-      type: null
+      type: null,
+      editorConfig: {
+        UEDITOR_HOME_URL: '/utf8-jsp/'
+      }
     }
   },
   props: {

+ 14 - 34
src/views/qykh/information/Information.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,7 +36,7 @@
           <a @click="handleEdit(record)">修改</a>
         </template>
       </span>
-    </s-table>
+    </a-table>
     <base-form ref="baseModal" @ok="handleOk"/>
     <detail ref="detailModal" />
   </a-card>
@@ -51,7 +48,8 @@ import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
 import {
   getInformationPage,
-  fetchInformation
+  fetchInformation,
+  fetchInformationTree
 } from '@/api/qykh/information'
 
 export default {
@@ -64,6 +62,7 @@ export default {
   },
   data () {
     return {
+      dataSource: [],
       // 查询参数
       queryParam: {
       },
@@ -71,38 +70,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: 'inforname'
-        },
-        {
-          title: '摘要',
-          dataIndex: 'infordes'
-        },
-        {
-          title: 'purl',
-          dataIndex: 'purl'
-        },
-        {
-          title: 'pid',
-          dataIndex: 'pid'
-        },
-        {
-          title: '等级',
-          dataIndex: 'level'
+          dataIndex: 'title'
         },
         {
-          title: '关键字',
-          dataIndex: 'keywords'
-        },
-        {
-          title: '排序',
-          dataIndex: 'ord'
+          title: '父类型id',
+          dataIndex: 'parentId'
         },
         {
           title: '操作',
@@ -140,9 +116,13 @@ export default {
     }
   },
   created () {
+    this.tableOption()
   },
   methods: {
     tableOption () {
+      fetchInformationTree().then(res => {
+        this.dataSource = res.data
+      })
       if (!this.optionAlertShow) {
         this.options = {
           alert: { show: true, clear: () => { this.selectedRowKeys = [] } },

+ 8 - 3
src/views/qykh/information/modules/BaseForm.vue

@@ -33,10 +33,12 @@
         :labelCol="labelCol"
         :wrapperCol="wrapperCol"
       >
-        <wang-editor
+<!--        <wang-editor
           :content="infordes"
           @catchData="catchData"
-        ></wang-editor>
+        ></wang-editor>-->
+        <vue-ueditor-wrap v-model="infordes" :config="editorConfig" editor-id="editor-demo-01"></vue-ueditor-wrap>
+
       </a-form-item>
     </a-form>
     <template slot="footer">
@@ -77,7 +79,10 @@ export default {
       visible: false,
       infordes: '',
       resultContent: '',
-      type: null
+      type: null,
+      editorConfig: {
+        UEDITOR_HOME_URL: '/utf8-jsp/'
+      }
     }
   },
   props: {

+ 23 - 9
src/views/qykh/plan-detail/PlanDetail.vue

@@ -8,6 +8,20 @@
               <a-input v-model.trim="queryParam.plantitle" placeholder="请输入名称/类型名称"/>
             </a-form-item>
           </a-col>
+          <a-col :md="8" :sm="24">
+            <a-form-item label="类型">
+              <a-tree-select
+                style="width: 100%"
+                :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+                :treeData="treeData"
+                :treeNodeFilterProp="'title'"
+                :showSearch="true"
+                v-model="queryParam.planid"
+                placeholder="请选择"
+              >
+              </a-tree-select>
+            </a-form-item>
+          </a-col>
           <a-col :md="8 || 24" :sm="24">
             <span class="table-page-search-submitButtons">
               <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
@@ -40,7 +54,7 @@
         </template>
       </span>
     </s-table>
-    <base-form ref="baseModal"  @ok="handleOk"/>
+    <base-form ref="baseModal" @ok="handleOk"/>
     <detail ref="detailModal" />
   </a-card>
 </template>
@@ -51,11 +65,10 @@ import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
 import {
   getPlanDetailPage,
-  fetchPlanDetail,
-  deletePlanDetails
+  fetchPlanDetail
 } from '@/api/qykh/plandetails'
-import DictCache from '@/utils/dict'
 
+import { fetchPlanTree } from '@/api/qykh/plan'
 export default {
   name: 'PlanDetailList',
   components: {
@@ -66,6 +79,7 @@ export default {
   },
   data () {
     return {
+      treeData: [],
       // 查询参数
       queryParam: {
       },
@@ -73,10 +87,7 @@ 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: '标题',
@@ -134,6 +145,9 @@ export default {
     }
   },
   created () {
+    fetchPlanTree().then(res => {
+      this.treeData = res.data
+    })
   },
   methods: {
     tableOption () {
@@ -183,7 +197,7 @@ export default {
       this.queryParam = {
       }
       this.$refs.table.refresh(true)
-    },
+    }
   }
 }
 </script>

+ 1 - 1
src/views/qykh/plan/Plan.vue

@@ -76,7 +76,7 @@ export default {
           dataIndex: 'title'
         },
         {
-          title: 'pid',
+          title: '父类型id',
           dataIndex: 'parentId'
         },
         {

+ 0 - 3
src/views/qykh/plan/modules/BaseForm.vue

@@ -59,15 +59,12 @@
 <script>
 import pick from 'lodash.pick'
 import { addPlan, updatePlan } from '@/api/qykh/plan'
-import WangEditor from '@/components/Editor/WangEditor'
 import UploadImg from '@/components/Upload/UploadImg'
 import UploadArticleFile from '@/components/Upload/UploadArticleFile'
-import { uploadUrl } from '@/api/upms/file'
 
 export default {
   name: 'BaseForm',
   components: {
-    WangEditor,
     UploadImg,
     UploadArticleFile
   },

+ 20 - 10
src/views/qykh/product-help/ProductHelp.vue

@@ -8,6 +8,20 @@
               <a-input v-model.trim="queryParam.title" placeholder="请输入名称/类型名称"/>
             </a-form-item>
           </a-col>
+          <a-col :md="8" :sm="24">
+            <a-form-item label="类型">
+              <a-tree-select
+                style="width: 100%"
+                :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+                :treeData="treeData"
+                :treeNodeFilterProp="'title'"
+                :showSearch="true"
+                v-model="queryParam.pid"
+                placeholder="请选择"
+              >
+              </a-tree-select>
+            </a-form-item>
+          </a-col>
           <a-col :md="8 || 24" :sm="24">
             <span class="table-page-search-submitButtons">
               <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
@@ -53,8 +67,7 @@ import {
   getProductHelpPage,
   fetchProductHelp
 } from '@/api/qykh/producthelp'
-import DictCache from '@/utils/dict'
-
+import { fetchProductTree } from '@/api/qykh/product'
 export default {
   name: 'PlanDetailList',
   components: {
@@ -65,6 +78,7 @@ export default {
   },
   data () {
     return {
+      treeData: [],
       // 查询参数
       queryParam: {
       },
@@ -72,19 +86,12 @@ 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: 'title'
         },
-        /*    {
-          title: '摘要',
-          dataIndex: 'digest'
-        }, */
         {
           title: '关键字',
           dataIndex: 'keywords'
@@ -133,6 +140,9 @@ export default {
     }
   },
   created () {
+    fetchProductTree().then(res => {
+      this.treeData = res.data
+    })
   },
   methods: {
     tableOption () {

+ 14 - 31
src/views/qykh/product/Product.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,7 +36,7 @@
           <a @click="handleEdit(record)">修改</a>
         </template>
       </span>
-    </s-table>
+    </a-table>
     <base-form ref="baseModal" @ok="handleOk"/>
     <detail ref="detailModal" />
   </a-card>
@@ -51,9 +48,9 @@ import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
 import {
   getProductPage,
-  fetchProduct
+  fetchProduct,
+  fetchProductTree
 } from '@/api/qykh/product'
-import DictCache from '@/utils/dict'
 
 export default {
   name: 'PlanDetailList',
@@ -65,6 +62,7 @@ export default {
   },
   data () {
     return {
+      dataSource: [],
       // 查询参数
       queryParam: {
       },
@@ -72,34 +70,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: 'pname'
-        },
-        /* {
-          title: '摘要',
-          dataIndex: 'shortdesc'
-        },
-        {
-          title: 'purl',
-          dataIndex: 'purl'
+          dataIndex: 'title'
         },
         {
-          title: 'bannerurl',
-          dataIndex: 'bannerurl'
-        }, */
-        {
-          title: '关键字',
-          dataIndex: 'keywords'
-        },
-        {
-          title: '排序',
-          dataIndex: 'ord'
+          title: '父类型id',
+          dataIndex: 'parentId'
         },
         {
           title: '操作',
@@ -137,9 +116,13 @@ export default {
     }
   },
   created () {
+    this.tableOption()
   },
   methods: {
     tableOption () {
+      fetchProductTree().then(res => {
+        this.dataSource = res.data
+      })
       if (!this.optionAlertShow) {
         this.options = {
           alert: { show: true, clear: () => { this.selectedRowKeys = [] } },