shuishen
2024-01-08 a2432973a0671d5b41d0ff7b1d79ac3961ad09bc
议事管理调整
1 files modified
79 ■■■■ changed files
src/views/article/discussionManage.vue 79 ●●●● patch | view | raw | blame | history
src/views/article/discussionManage.vue
@@ -1,9 +1,10 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
          除
@@ -23,22 +24,24 @@
          参与用户
        </el-button>
        <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
                <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type"
                    @click.stop="updateFb(row)">
          撤销
        </el-button>
        <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)">
                <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type"
                    @click.stop="updateFb(row)">
          发布
        </el-button>
      </template>
      <template slot-scope="{ row }" slot="publish">
        <el-tag>{{ row.publish == "1" ? "已发布" : row.publish == "0" ? "未发布" : "未发布" }}
            <template slot-scope="{ row, size }" slot="publish">
                <el-tag :size="size" :type="showStatus(row.publish, 1).type" v-text="showStatus(row.publish, 1).text">
        </el-tag>
      </template>
      <template slot-scope="{ row }" slot="iscomment">
        <el-tag>{{ row.iscomment == "1" ? "开启" : row.iscomment == "0" ? "关闭" : "关闭" }}
            <template slot-scope="{ row, size }" slot="iscomment">
                <el-tag :size="size" :type="showStatus(row.publish, 2).type" v-text="showStatus(row.publish, 2).text">
        </el-tag>
      </template>
    </avue-crud>
@@ -117,13 +120,16 @@
        datetime: "",
        selectionList: [],
        option: {
                labelWidth: 96,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 500,
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 500,
          border: false,
          //stripe:true,
          index: true,
@@ -131,7 +137,9 @@
          selection: true,
          excelBtn: true,
          dialogClickModal: false,
          column: [{
                column: [
                    {
                        overHidden: true,
              label: "议事标题",
              prop: "title",
              span: 24,
@@ -165,29 +173,10 @@
              hide: true,
            },
            {
              label: "发布时间",
              prop: "dateTime",
              type: "datetime",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              searchSpan: 5,
              searchRange: true,
              hide: true,
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              search: true,
              rules: [{
                required: true,
                message: "请选择发布时间",
                trigger: "blur",
              }, ],
            },
            {
                        width: 110,
              label: "封面",
              prop: "url",
              // align:'center',
              width: 80,
              type: "upload",
              listType: "picture-img",
              action: "/api/blade-resource/oss/endpoint/put-file",
@@ -199,12 +188,13 @@
              span: 24,
            },
            {
                        width: 110,
              label: "文章类型",
              prop: "articleType",
              addDisplay: true,
              editDisplay: true,
              viewDisplay: true,
              searchSpan: 3,
                        searchSpan: 4,
              checkStrictly: true,
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=investigateType",
              props: {
@@ -220,6 +210,7 @@
              }, ],
            },
            {
                        width: 100,
              label: "发布时间",
              prop: "createTime",
              type: "date",
@@ -227,10 +218,10 @@
              valueFormat: "yyyy-MM-dd HH:mm:ss",
            },
            {
                        width: 100,
              label: "发布状态",
              prop: "publish",
              searchSpan: 3,
              width: 80,
                        searchSpan: 4,
              value: "0",
              slot: true,
              search: true,
@@ -457,6 +448,22 @@
        })
        return ids.join(",")
      },
        showStatus () {
            return (data, type) => {
                if (data == 0) {
                    return {
                        text: type == 1 ? '未发布' : '关闭',
                        type: 'info'
                    }
                } else if (data == 1) {
                    return {
                        text: type == 1 ? '已发布' : '开启',
                        type: 'success'
                    }
                }
            }
        }
    },
    methods: {
      openEditPopup(row) {