k94314517
2024-07-11 a52f8c508d08014d1a153cfc02e12b5fc185a3a4
admin/src/views/business/newsDz.vue
@@ -20,7 +20,7 @@
    <!-- 表格和分页 -->
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="['business:news:create', 'business:news:delete']">
        <li><el-button type="primary" @click="$refs.operaNewsWindow.open('新建资讯和定制服务信息表')" icon="el-icon-plus" v-permissions="['business:news:create']">新建</el-button></li>
        <li><el-button type="primary" @click="$refs.operaNewsWindow.open('新建定制服务信息')" icon="el-icon-plus" v-permissions="['business:news:create']">新建</el-button></li>
        <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:news:delete']">删除</el-button></li>
      </ul>
      <el-table
@@ -30,8 +30,22 @@
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="title" label="标题" min-width="100px"></el-table-column>
        <el-table-column prop="subTitle" label="副标题" min-width="100px"></el-table-column>
        <el-table-column prop="title" label="标题" fixed min-width="100px"></el-table-column>
        <el-table-column prop="subTitle" label="副标题" fixed min-width="100px"></el-table-column>
        <el-table-column prop="fileList" label="附件"  align="center" fixed min-width="100px">>
          <template slot-scope="{row}">
            <div v-if="row.fileList!=null && row.fileList.length" class="image-container">
              <el-image
                  v-if="row.fileList[0].type !=1 && row.fileList[0].fileurlFull"
                  class="image-item"
                  :src="row.fileList[0].fileurlFull"
                  fit="fill"
                  :preview-src-list="[row.fileList[0].fileurlFull]">
              </el-image>
              <video v-if="row.fileList[0].type ==1 && row.fileList[0].fileurlFull"  style="width: 60px;height: 60px"  controls autoplay :src="row.fileList[0].fileurlFull"></video>
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="linkType" label="跳转类型" min-width="100px">
          <template slot-scope="{row}">
            <span v-if="row.linkType ==0">富文本</span>
@@ -45,14 +59,10 @@
          </template>
        </el-table-column>
        <el-table-column prop="lookNum" label="浏览量" min-width="80px"></el-table-column>
        <el-table-column prop="donwloadNum" label="下载量" min-width="80px"></el-table-column>
        <el-table-column prop="sortnum" label="排序码" min-width="100px"></el-table-column>
        <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column>
        <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="editDate" label="操作时间" min-width="100px"></el-table-column>
        <el-table-column prop="publishDate" label="最近发布时间" min-width="100px"></el-table-column>
        <el-table-column prop="publishUserName" label="最近发布人" min-width="100px"></el-table-column>
        <el-table-column prop="publishInfo" label="最近发布备注" min-width="100px"></el-table-column>
        <el-table-column
          v-if="containPermissions(['business:news:update', 'business:news:delete'])"
          label="操作"
@@ -60,7 +70,7 @@
          fixed="right"
        >
          <template slot-scope="{row}">
            <el-button type="text" @click="$refs.operaNewsWindow.open('编辑资讯和定制服务信息表', row)" icon="el-icon-edit" v-permissions="['business:news:update']">编辑</el-button>
            <el-button type="text" @click="$refs.operaNewsWindow.open('编辑定制服务信息', row)" icon="el-icon-edit" v-permissions="['business:news:update']">编辑</el-button>
            <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:news:delete']">删除</el-button>
          </template>
        </el-table-column>
@@ -73,7 +83,7 @@
      </pagination>
    </template>
    <!-- 新建/修改 -->
    <OperaNewsWindow ref="operaNewsWindow" @success="handlePageChange"/>
    <OperaNewsDzWindow ref="operaNewsWindow" @success="handlePageChange"/>
  </TableLayout>
</template>
@@ -81,11 +91,11 @@
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaNewsWindow from '@/components/business/OperaNewsWindow'
import OperaNewsDzWindow from '@/components/business/OperaNewsDzWindow'
export default {
  name: 'News',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaNewsWindow },
  components: { TableLayout, Pagination, OperaNewsDzWindow },
  data () {
    return {
      // 搜索