From ec7cc88fca8de4b3c56f8ebee074fb7ce71ebf1e Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 02 七月 2025 10:39:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/views/business/informationCase.vue | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 172 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/business/informationCase.vue b/admin/src/views/business/informationCase.vue
new file mode 100644
index 0000000..28d16a1
--- /dev/null
+++ b/admin/src/views/business/informationCase.vue
@@ -0,0 +1,172 @@
+<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="0"></el-option>
+ <el-option label="绂佺敤" value="1"></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('鏂板缓瀹㈡埛妗堜緥',null,searchForm.type)" 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
+ :height="tableHeightNew"
+ 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,searchForm.type)" 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: {
+ type: 1,
+ title: '',
+ status: null
+ }
+ }
+ },
+ 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>
--
Gitblit v1.9.3