| | |
| | | <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">删 |
| | | 除 |
| | |
| | | 参与用户 |
| | | </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> |
| | |
| | | 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, |
| | |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | column: [ |
| | | { |
| | | overHidden: true, |
| | | label: "议事标题", |
| | | prop: "title", |
| | | span: 24, |
| | |
| | | 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", |
| | |
| | | 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: { |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布时间", |
| | | prop: "createTime", |
| | | type: "date", |
| | |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | searchSpan: 3, |
| | | width: 80, |
| | | searchSpan: 4, |
| | | value: "0", |
| | | slot: true, |
| | | search: true, |
| | |
| | | }) |
| | | 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) { |