From 1c7a34a34497107eb5bb4501bfd7ee0b72e5c9f7 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 19 六月 2025 16:56:52 +0800
Subject: [PATCH] ss
---
 admin/src/api/business/information.js                    |   42 +++
 admin/src/api/business/carousel.js                       |   51 +++
 server/src/main/java/com/doumee/ContextFinalizer.java    |   33 ++
 admin/src/components/business/OperaCarouselWindow.vue    |  141 ++++++++++
 admin/src/views/business/information.vue                 |  184 ++++++++++++++
 admin/src/components/business/OperaInformationWindow.vue |  123 +++++++++
 admin/src/views/business/carousel.vue                    |  191 ++++++++++++++
 7 files changed, 765 insertions(+), 0 deletions(-)
diff --git a/admin/src/api/business/carousel.js b/admin/src/api/business/carousel.js
new file mode 100644
index 0000000..dd961b8
--- /dev/null
+++ b/admin/src/api/business/carousel.js
@@ -0,0 +1,51 @@
+import request from '../../utils/request'
+
+// 鏌ヨ
+export function fetchList (data) {
+  return request.post('/business/carousel/page', data, {
+    trim: true
+  })
+}
+
+// 瀵煎嚭Excel
+export function exportExcel (data) {
+  return request.post('/business/carousel/exportExcel', data, {
+    trim: true,
+    download: true
+  })
+}
+
+// 鍒涘缓
+export function create (data) {
+  return request.post('/business/carousel/create', data)
+}
+
+// 淇敼
+export function updateById (data) {
+  return request.post('/business/carousel/updateById', data)
+}
+export function updateStatus (data) {
+  return request.post('/business/carousel/updateStatus', data)
+}
+// 鍒犻櫎
+export function deleteById (id) {
+  return request.get(`/business/carousel/delete/${id}`)
+}
+
+// 鎵归噺鍒犻櫎
+export function deleteByIdInBatch (ids) {
+  return request.get('/business/carousel/delete/batch', {
+    params: {
+      ids
+    }
+  })
+}
+
+export function getFoodDataVO () {
+  return request.get('/business/carousel/getFoodDataVO')
+}
+
+// 淇敼搴曢儴璁块厤缃�
+export function updFoodData (data) {
+  return request.post('/business/carousel/updFoodData', data)
+}
diff --git a/admin/src/api/business/information.js b/admin/src/api/business/information.js
new file mode 100644
index 0000000..ed95d8b
--- /dev/null
+++ b/admin/src/api/business/information.js
@@ -0,0 +1,42 @@
+import request from '../../utils/request'
+
+// 鏌ヨ
+export function fetchList (data) {
+  return request.post('/business/information/page', data, {
+    trim: true
+  })
+}
+
+// 瀵煎嚭Excel
+export function exportExcel (data) {
+  return request.post('/business/information/exportExcel', data, {
+    trim: true,
+    download: true
+  })
+}
+
+// 鍒涘缓
+export function create (data) {
+  return request.post('/business/information/create', data)
+}
+
+// 淇敼
+export function updateById (data) {
+  return request.post('/business/information/updateById', data)
+}
+export function updateStatus (data) {
+  return request.post('/business/information/updateStatus', data)
+}
+// 鍒犻櫎
+export function deleteById (id) {
+  return request.get(`/business/information/delete/${id}`)
+}
+
+// 鎵归噺鍒犻櫎
+export function deleteByIdInBatch (ids) {
+  return request.get('/business/information/delete/batch', {
+    params: {
+      ids
+    }
+  })
+}
diff --git a/admin/src/components/business/OperaCarouselWindow.vue b/admin/src/components/business/OperaCarouselWindow.vue
new file mode 100644
index 0000000..75b8ccf
--- /dev/null
+++ b/admin/src/components/business/OperaCarouselWindow.vue
@@ -0,0 +1,141 @@
+<template>
+  <GlobalWindow
+    :title="title"
+    width="60%"
+    :visible.sync="visible"
+    :confirm-working="isWorking"
+    @confirm="confirm"
+  >
+    <el-form :model="form" ref="form" :rules="rules">
+      <el-form-item label="鏍囬" prop="title">
+        <el-input v-model="form.title" placeholder="璇疯緭鍏ユ爣棰�" v-trim/>
+      </el-form-item>
+      <el-form-item label="姒傝堪" prop="detail">
+        <el-input  type="textarea"  v-model="form.detail" placeholder="璇疯緭鍏ユ弿杩�" v-trim/>
+      </el-form-item>
+      <div style="display: flex">
+        <el-form-item label="缂╃暐鍥�" prop="thumbnailImgurl" style="display:inline-block;flex: 1">
+          <div class="upload_wrap">
+            <UploadAvatarImage :file="{ 'imgurlfull': form.fullThumbnailImgurl, 'imgurl': form.thumbnailImgurl }" :uploadData="{folder:''}"
+                               @uploadSuccess="uploadAvatarSuccess1"   />
+          </div>
+        </el-form-item>
+        <el-form-item label="楂樻竻鍥�" prop="imgurl"  style="display:inline-block;flex: 3">
+          <div class="upload_wrap">
+            <UploadAvatarImage :file="{ 'imgurlfull': form.fullImgurl, 'imgurl': form.imgurl }" :uploadData="{folder:''}"
+                               @uploadSuccess="uploadAvatarSuccess"   />
+          </div>
+        </el-form-item>
+      </div>
+
+      <el-form-item label="鍐呭绫诲瀷" prop="jumpType" >
+        <el-radio-group v-model="form.jumpType">
+          <el-radio :label="0" :value="0">澶栭摼</el-radio>
+          <el-radio :label="1" :value="1">瀵屾枃鏈�</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item label="璺宠浆鍐呭" prop="content"   >
+        <RichEditor v-if="form.jumpType === 1"  :richData="form.content" :styleEditor="styleEditor"  @getWangedditor="getWangedditor" :readonly="false"/>
+        <el-input v-if="form.jumpType === 0"  v-model="form.content" placeholder="璇疯緭鍏ヨ烦杞摼鎺ュ湴鍧�" v-trim/>
+      </el-form-item>
+      <el-form-item label="鐘舵��" prop="status" required class="form-item-status">
+        <el-switch v-model="form.status" :active-value="0" :inactive-value="1" active-color="#13ce66"/>
+      </el-form-item>
+      <el-form-item label="鎺掑簭鐮侊紙闄嶅簭锛�" prop="sortnum">
+        <el-input v-model="form.sortnum" placeholder="璇疯緭鍏ユ帓搴忕爜" v-trim/>
+      </el-form-item>
+      <el-form-item label="澶囨敞" prop="remark">
+        <el-input v-model="form.remark" type="textarea" placeholder="璇疯緭鍏ュ娉�" v-trim/>
+      </el-form-item>
+    </el-form>
+  </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import RichEditor from '@/components/common/RichEditor'
+import UploadAvatarImage from '@/components/common/UploadAvatarImage'
+export default {
+  name: 'OperaCarouselWindow',
+  extends: BaseOpera,
+  components: { GlobalWindow, UploadAvatarImage, RichEditor },
+  data () {
+    return {
+      // 琛ㄥ崟鏁版嵁
+      styleEditor: 'border: 1px solid #ccc;display: inline-block;height:500px',
+      form: {
+        id: null,
+        remark: '',
+        title: '',
+        detail: '',
+        imgurl: '',
+        fullImgurl: '',
+        thumbnailImgurl: '',
+        fullThumbnailImgurl: '',
+        jumpType: 0,
+        content: '',
+        sortnum: '',
+        status: 0
+      },
+      // 楠岃瘉瑙勫垯
+      rules: {
+        title: [
+          { required: true, message: '璇疯緭鍏ユ爣棰�' }
+        ]
+      }
+    }
+  },
+  created () {
+    this.config({
+      api: '/business/carousel',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    open (title, target) {
+      this.title = title
+      this.visible = true
+      // 鏂板缓
+      if (target == null) {
+        this.$nextTick(() => {
+          this.$refs.form.resetFields()
+          this.form= {
+            id: null,
+            remark: '',
+            title: '',
+            detail: '',
+            imgurl: '',
+            imgurlFull: '',
+            thumbnailImgurl: '',
+            thumbnailImgurlFull: '',
+            jumpType: 0,
+            content: '',
+            sortnum: '',
+            status: 0
+          }
+        })
+        return
+      }
+      // 缂栬緫
+      this.$nextTick(() => {
+        for (const key in this.form) {
+          this.form[key] = target[key]
+        }
+      })
+    },
+    // 涓婁紶鍥剧墖
+    getWangedditor (val) {
+      this.form.content = val
+    },
+    uploadAvatarSuccess (file) {
+      this.form.imgurl = file.imgurl
+      this.form.fullImgurl = file.imgurlfull
+    },
+    uploadAvatarSuccess1 (file) {
+      this.form.thumbnailImgurl = file.imgurl
+      this.form.fullThumbnailImgurl = file.imgurlfull
+    }
+  }
+}
+</script>
diff --git a/admin/src/components/business/OperaInformationWindow.vue b/admin/src/components/business/OperaInformationWindow.vue
new file mode 100644
index 0000000..981dcbc
--- /dev/null
+++ b/admin/src/components/business/OperaInformationWindow.vue
@@ -0,0 +1,123 @@
+<template>
+  <GlobalWindow
+      :title="title"
+      width="60%"
+      :visible.sync="visible"
+      :confirm-working="isWorking"
+      @confirm="confirm"
+  >
+    <el-form :model="form" ref="form" :rules="rules">
+      <el-form-item label="鏍囬" prop="title">
+        <el-input v-model="form.title" placeholder="璇疯緭鍏ユ爣棰�" v-trim/>
+      </el-form-item>
+      <el-form-item label="鍒楄〃鍥�" prop="imgurl" >
+        <div class="upload_wrap">
+          <UploadAvatarImage :file="{ 'imgurlfull': form.fullImgurl, 'imgurl': form.imgurl }" :uploadData="{folder:''}"   @uploadSuccess="uploadAvatarSuccess"   />
+        </div>
+      </el-form-item>
+      <el-form-item label="绠�浠�" prop="detail">
+        <el-input  type="textarea"  v-model="form.detail" placeholder="璇疯緭鍏ョ畝浠�" v-trim/>
+      </el-form-item>
+      <el-form-item label="鍙戝竷鏃ユ湡" prop="releaseDate" >
+        <el-date-picker v-model="form.releaseDate" value-format="yyyy-MM-dd HH:mm:ss" type="datetime">  </el-date-picker>
+      </el-form-item>
+      <el-form-item label="鍐呭" prop="content"   >
+        <RichEditor    :richData="form.content" :styleEditor="styleEditor"  @getWangedditor="getWangedditor" :readonly="false"/>
+      </el-form-item>
+      <el-form-item label="鐘舵��" prop="status" required class="form-item-status">
+        <el-switch v-model="form.status" :active-value="0" :inactive-value="1" active-color="#13ce66"/>
+      </el-form-item>
+      <el-form-item label="鎺掑簭鐮侊紙闄嶅簭锛�" prop="sortnum">
+        <el-input v-model="form.sortnum" placeholder="璇疯緭鍏ユ帓搴忕爜" v-trim/>
+      </el-form-item>
+      <el-form-item label="澶囨敞" prop="remark">
+        <el-input v-model="form.remark" type="textarea" placeholder="璇疯緭鍏ュ娉�" v-trim/>
+      </el-form-item>
+    </el-form>
+  </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import RichEditor from '@/components/common/RichEditor'
+import UploadAvatarImage from '@/components/common/UploadAvatarImage'
+export default {
+  name: 'OperaInformationWindow',
+  extends: BaseOpera,
+  components: { GlobalWindow, UploadAvatarImage, RichEditor },
+  data () {
+    return {
+      // 琛ㄥ崟鏁版嵁
+      styleEditor: 'border: 1px solid #ccc;display: inline-block;height:500px',
+      form: {
+        id: null,
+        remark: '',
+        title: '',
+        detail: '',
+        imgurl: '',
+        fullImgurl: '',
+        jumpType: 0,
+        content: '',
+        releaseDate: new Date(),
+        sortnum: '',
+        status: 0
+      },
+      // 楠岃瘉瑙勫垯
+      rules: {
+        title: [
+          { required: true, message: '璇疯緭鍏ユ爣棰�' }
+        ]
+      }
+    }
+  },
+  created () {
+    this.config({
+      api: '/business/information',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    open (title, target) {
+      this.title = title
+      this.visible = true
+      // 鏂板缓
+      if (target == null) {
+        this.$nextTick(() => {
+          this.$refs.form.resetFields()
+          this.form= {
+            id: null,
+            remark: '',
+            title: '',
+            detail: '',
+            releaseDate: new Date(),
+            imgurl: '',
+            imgurlFull: '',
+            thumbnailImgurl: '',
+            thumbnailImgurlFull: '',
+            jumpType: 0,
+            content: '',
+            sortnum: '',
+            status: 0
+          }
+        })
+        return
+      }
+      // 缂栬緫
+      this.$nextTick(() => {
+        for (const key in this.form) {
+          this.form[key] = target[key]
+        }
+      })
+    },
+    // 涓婁紶鍥剧墖
+    getWangedditor (val) {
+      this.form.content = val
+    },
+    uploadAvatarSuccess (file) {
+      this.form.imgurl = file.imgurl
+      this.form.fullImgurl = file.imgurlfull
+    }
+  }
+}
+</script>
diff --git a/admin/src/views/business/carousel.vue b/admin/src/views/business/carousel.vue
new file mode 100644
index 0000000..f26948b
--- /dev/null
+++ b/admin/src/views/business/carousel.vue
@@ -0,0 +1,191 @@
+<template>
+  <TableLayout :permissions="['business:carousel:query']">
+    <!-- 鎼滅储琛ㄥ崟 -->
+    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+      <el-form-item label="鏍囬" prop="title">
+        <el-input v-model="searchForm.title" clearable placeholder="璇疯緭鍏ユ爣棰�" @keypress.enter.native="search"></el-input>
+      </el-form-item>
+      <el-form-item label="鐘舵��" prop="status">
+        <el-select v-model="searchForm.status" clearable @change="search" placeholder="鐘舵��">
+          <el-option label="姝e父" value="1"></el-option>
+          <el-option label="绂佺敤" value="0"></el-option>
+        </el-select>
+      </el-form-item>
+      <section>
+        <el-button type="primary" @click="search">鎼滅储</el-button>
+        <el-button @click="reset">閲嶇疆</el-button>
+      </section>
+    </el-form>
+    <!-- 琛ㄦ牸鍜屽垎椤� -->
+    <template v-slot:table-wrap>
+      <ul class="toolbar" v-permissions="['business:carousel:create', 'business:carousel:delete']">
+        <li><el-button type="primary" @click="$refs.operaCarouselWindow.open('鏂板缓杞挱鍥�')" icon="el-icon-plus" v-permissions="['business:carousel:create']">鏂板缓</el-button></li>
+        <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:carousel:delete']">鍒犻櫎</el-button></li>
+      </ul>
+      <el-table
+        v-loading="isWorking.search"
+        :data="tableData.list"
+        stripe
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column prop="title" label="鏍囬" min-width="150px"></el-table-column>
+        <el-table-column prop="thumbnailImgurl" label="缂╃暐鍥�" min-width="100px">
+          <template slot-scope="{row}">
+            <el-image v-if="row.fullThumbnailImgurl" style="width: 60px; height: 60px" :src="row.fullThumbnailImgurl"
+                      :preview-src-list="[row.fullThumbnailImgurl]">
+            </el-image>
+          </template>
+        </el-table-column>
+        <el-table-column prop="imgurl" label="楂樻竻鍥�" min-width="100px">
+          <template slot-scope="{row}">
+            <el-image v-if="row.fullImgurl" style="width: 60px; height: 60px" :src="row.fullImgurl"
+                      :preview-src-list="[row.fullImgurl]">
+            </el-image>
+          </template>
+        </el-table-column>
+        <el-table-column prop="detail" label="姒傝堪" min-width="200px"></el-table-column>
+        <el-table-column prop="jumpType" label="璺宠浆绫诲瀷" align="center" min-width="150px">
+          <template slot-scope="{row}">
+              <span v-if="row.jumpType == 0 && row.content!=null && row.content!=''"><a :href="row.content" target="_blank">鐐瑰嚮璺宠浆</a></span>
+              <span v-else-if="row.jumpType == 1 && row.content!=null && row.content!=''"><el-button @click="showContentDo(row)" >鏌ョ湅鍐呭</el-button></span>
+              <span v-else>-</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="status" label="鐘舵��" min-width="100px">
+          <template slot-scope="{row}">
+            <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
+                       inactive-color="#ff4949" :active-value="0" :inactive-value="1">
+            </el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column prop="remark" label="澶囨敞" min-width="100px"></el-table-column>
+        <el-table-column prop="sortnum" label="鎺掑簭鐮�" min-width="80px"></el-table-column>
+        <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150px"></el-table-column>
+        <el-table-column prop="editDate" label="鏇存柊鏃堕棿" min-width="150px"></el-table-column>
+        <el-table-column
+          v-if="containPermissions(['business:carousel:update', 'business:carousel:delete'])"
+          label="鎿嶄綔"
+          min-width="120"
+          fixed="right"
+        >
+          <template slot-scope="{row}">
+            <el-button type="text" @click="$refs.operaCarouselWindow.open('缂栬緫杞挱鍥�', row)" icon="el-icon-edit" v-permissions="['business:carousel:update']">缂栬緫</el-button>
+            <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:carousel:delete']">鍒犻櫎</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        @size-change="handleSizeChange"
+        @current-change="handlePageChange"
+        :pagination="tableData.pagination"
+      >
+      </pagination>
+    </template>
+    <!-- 鏂板缓/淇敼 -->
+    <OperaCarouselWindow ref="operaCarouselWindow" @success="handlePageChange"/>
+
+    <el-dialog
+        class="center-title"
+        :title="showTitle||'鏄剧ず鍐呭'"
+        width="70%"
+        height="70%"
+        text="鍐呭"
+        :visible.sync="visible1"
+        append-to-body
+    >
+      <div class="agree-list"  v-html="showContent">
+      </div>
+      <template  v-slot:footer>
+        <el-button @click="visible1=false">杩斿洖</el-button>
+      </template>
+    </el-dialog>
+  </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaCarouselWindow from '@/components/business/OperaCarouselWindow'
+export default {
+  name: 'Carousel',
+  extends: BaseTable,
+  components: { TableLayout, Pagination, OperaCarouselWindow },
+  data () {
+    return {
+      // 鎼滅储
+      visible1: false,
+      showContent: '',
+      showTitle: '',
+      searchForm: {
+        id: '',
+        creator: '',
+        createDate: '',
+        editor: '',
+        editDate: '',
+        isdeleted: '',
+        remark: '',
+        title: '',
+        describe: '',
+        imgurl: '',
+        thumbnailImgurl: '',
+        type: '',
+        jumpType: '',
+        contnet: '',
+        sortnum: '',
+        status: ''
+      }
+    }
+  },
+  created () {
+    this.config({
+      module: '杞挱鍥�',
+      api: '/business/carousel',
+      'field.id': 'id',
+      'field.main': 'id'
+    })
+    this.search()
+  },
+  methods: {
+    showContentDo(row){
+      this.showTitle=row.showTitle
+      this.showContent=row.content
+      this.visible1=true
+    },
+    changeStatus (e, row) {
+      this.canvisiting = true
+      this.api.updateStatus({ id: row.id, status: e })
+        .then(res => {
+          this.$tip.apiSuccess(res || '鎿嶄綔鎴愬姛')
+          this.search()
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+        .finally(() => {
+          this.canvisiting = false
+        })
+        .catch(() => { })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.agree-list{
+  height: 550px;
+  //max-height: 50%;
+  overflow: auto;
+}
+
+/deep/ .window__body {
+  .table-content {
+    padding: 0;
+    .table-wrap {
+      padding-top: 0;
+    }
+  }
+
+}
+</style>
diff --git a/admin/src/views/business/information.vue b/admin/src/views/business/information.vue
new file mode 100644
index 0000000..131fb7c
--- /dev/null
+++ b/admin/src/views/business/information.vue
@@ -0,0 +1,184 @@
+<template>
+  <TableLayout :permissions="['business:information:query']">
+    <!-- 鎼滅储琛ㄥ崟 -->
+    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+      <el-form-item label="鏍囬" prop="title">
+        <el-input v-model="searchForm.title" clearable placeholder="璇疯緭鍏ユ爣棰�" @keypress.enter.native="search"></el-input>
+      </el-form-item>
+      <el-form-item label="鐘舵��" prop="status">
+        <el-select v-model="searchForm.status" clearable @change="search" placeholder="鐘舵��">
+          <el-option label="姝e父" value="1"></el-option>
+          <el-option label="绂佺敤" value="0"></el-option>
+        </el-select>
+      </el-form-item>
+      <section>
+        <el-button type="primary" @click="search">鎼滅储</el-button>
+        <el-button @click="reset">閲嶇疆</el-button>
+      </section>
+    </el-form>
+    <!-- 琛ㄦ牸鍜屽垎椤� -->
+    <template v-slot:table-wrap>
+      <ul class="toolbar" v-permissions="['business:information:create', 'business:information:delete']">
+        <li><el-button type="primary" @click="$refs.operaInformationWindow.open('鏂板缓鍔ㄦ�佽祫璁�')" icon="el-icon-plus" v-permissions="['business:information:create']">鏂板缓</el-button></li>
+        <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:information:delete']">鍒犻櫎</el-button></li>
+      </ul>
+      <el-table
+          v-loading="isWorking.search"
+          :data="tableData.list"
+          stripe
+          @selection-change="handleSelectionChange"
+      >
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column prop="title" label="鏍囬" min-width="150px"></el-table-column>
+        <el-table-column prop="releaseDate" label="鍙戝竷鏃堕棿" min-width="150px"></el-table-column>
+        <el-table-column prop="imgurl" label="鍒楄〃鍥�" min-width="100px">
+          <template slot-scope="{row}">
+            <el-image v-if="row.fullImgurl" style="width: 60px; height: 60px" :src="row.fullImgurl"
+                      :preview-src-list="[row.fullImgurl]">
+            </el-image>
+          </template>
+        </el-table-column>
+        <el-table-column prop="detail" label="绠�浠�" min-width="200px"></el-table-column>
+        <el-table-column prop="jumpType" label="鍐呭" align="center" min-width="150px">
+          <template slot-scope="{row}">
+            <span v-if=  "row.content!=null && row.content!=''"><el-button @click="showContentDo(row)" >鏌ョ湅鍐呭</el-button></span>
+            <span v-else>-</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="status" label="鐘舵��" min-width="100px">
+          <template slot-scope="{row}">
+            <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
+                       inactive-color="#ff4949" :active-value="0" :inactive-value="1">
+            </el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column prop="remark" label="澶囨敞" min-width="100px"></el-table-column>
+        <el-table-column prop="sortnum" label="鎺掑簭鐮�" min-width="80px"></el-table-column>
+        <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150px"></el-table-column>
+        <el-table-column prop="editDate" label="鏇存柊鏃堕棿" min-width="150px"></el-table-column>
+        <el-table-column
+            v-if="containPermissions(['business:information:update', 'business:information:delete'])"
+            label="鎿嶄綔"
+            min-width="120"
+            fixed="right"
+        >
+          <template slot-scope="{row}">
+            <el-button type="text" @click="$refs.operaInformationWindow.open('缂栬緫鍔ㄦ�佽祫璁�', row)" icon="el-icon-edit" v-permissions="['business:information:update']">缂栬緫</el-button>
+            <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:information:delete']">鍒犻櫎</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+          @size-change="handleSizeChange"
+          @current-change="handlePageChange"
+          :pagination="tableData.pagination"
+      >
+      </pagination>
+    </template>
+    <!-- 鏂板缓/淇敼 -->
+    <OperaInformationWindow ref="operaInformationWindow" @success="handlePageChange"/>
+
+    <el-dialog
+        class="center-title"
+        :title="showTitle||'鏄剧ず鍐呭'"
+        width="70%"
+        height="70%"
+        text="鍐呭"
+        :visible.sync="visible1"
+        append-to-body
+    >
+      <div class="agree-list"  v-html="showContent">
+      </div>
+      <template  v-slot:footer>
+        <el-button @click="visible1=false">杩斿洖</el-button>
+      </template>
+    </el-dialog>
+  </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaInformationWindow from '@/components/business/OperaInformationWindow'
+export default {
+  name: 'Information',
+  extends: BaseTable,
+  components: { TableLayout, Pagination, OperaInformationWindow },
+  data () {
+    return {
+      // 鎼滅储
+      visible1: false,
+      showContent: '',
+      showTitle: '',
+      searchForm: {
+        id: '',
+        creator: '',
+        createDate: '',
+        editor: '',
+        editDate: '',
+        isdeleted: '',
+        remark: '',
+        title: '',
+        describe: '',
+        imgurl: '',
+        thumbnailImgurl: '',
+        type: '',
+        jumpType: '',
+        contnet: '',
+        sortnum: '',
+        status: ''
+      }
+    }
+  },
+  created () {
+    this.config({
+      module: '鍔ㄦ�佸挩璇�',
+      api: '/business/information',
+      'field.id': 'id',
+      'field.main': 'id'
+    })
+    this.search()
+  },
+  methods: {
+    showContentDo (row) {
+      this.showTitle = row.showTitle
+      this.showContent = row.content
+      this.visible1 = true
+    },
+    changeStatus (e, row) {
+      this.canvisiting = true
+      this.api.updateStatus({ id: row.id, status: e })
+        .then(res => {
+          this.$tip.apiSuccess(res || '鎿嶄綔鎴愬姛')
+          this.search()
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+        .finally(() => {
+          this.canvisiting = false
+        })
+        .catch(() => { })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.agree-list{
+  height: 550px;
+  //max-height: 50%;
+  overflow: auto;
+}
+
+/deep/ .window__body {
+  .table-content {
+    padding: 0;
+    .table-wrap {
+      padding-top: 0;
+    }
+  }
+
+}
+</style>
diff --git a/server/src/main/java/com/doumee/ContextFinalizer.java b/server/src/main/java/com/doumee/ContextFinalizer.java
new file mode 100644
index 0000000..be7ee32
--- /dev/null
+++ b/server/src/main/java/com/doumee/ContextFinalizer.java
@@ -0,0 +1,33 @@
+package com.doumee;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.annotation.WebListener;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Enumeration;
+import com.mysql.cj.jdbc.AbandonedConnectionCleanupThread;
+
+//@WebListener
+public class ContextFinalizer implements ServletContextListener{
+
+    public void contextInitialized(ServletContextEvent sce) {}
+
+    public void contextDestroyed(ServletContextEvent sce) {
+        Enumeration<Driver> drivers = DriverManager.getDrivers();
+        Driver d = null;
+        while (drivers.hasMoreElements()) {
+            try {
+                d = drivers.nextElement();
+                DriverManager.deregisterDriver(d);
+            } catch (SQLException ex) {
+            }
+        }
+        try {
+            // 娉ㄦ剰锛歮ysql8鐗堟湰鐨刯ar濂藉儚shutdown鏂规硶绉佹湁浜嗭紝鍙兘璋冪敤checkedShutdown鎴杣ncheckedShutdown
+            AbandonedConnectionCleanupThread.checkedShutdown();
+        } catch ( Exception e) {
+            e.printStackTrace();
+        }
+    }
+}
--
Gitblit v1.9.3