| | |
| | | <el-row> |
| | | <!-- 列表模块 --> |
| | | <el-table ref="table" v-loading="loading" :size="option.size" @selection-change="selectionChange" :data="data" |
| | | style="width: 100%" |
| | | :border="option.border"> |
| | | style="width: 100%" :border="option.border"> |
| | | <el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column> |
| | | <el-table-column type="expand" v-if="option.expand" align="center"></el-table-column> |
| | | <el-table-column v-if="option.index" label="#" type="index" width="50" align="center"> |
| | | </el-table-column> |
| | | <template v-for="(item,index) in option.column"> |
| | | <!-- table字段 --> |
| | | <el-table-column v-if="item.hide!==true" |
| | | :prop="item.prop" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | <el-table-column v-if="item.hide!==true" :prop="item.prop" :label="item.label" :width="item.width" |
| | | :key="index"> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <!-- 分页模块 --> |
| | | <el-pagination |
| | | align="right" background |
| | | @size-change="sizeChange" |
| | | @current-change="currentChange" |
| | | :current-page="page.currentPage" |
| | | :page-sizes="[10, 20, 30, 40, 50, 100]" |
| | | :page-size="page.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="page.total"> |
| | | <el-pagination align="right" background @size-change="sizeChange" @current-change="currentChange" |
| | | :current-page="page.currentPage" :page-sizes="[10, 20, 30, 40, 50, 100]" :page-size="page.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" :total="page.total"> |
| | | </el-pagination> |
| | | </el-row> |
| | | <!-- 表单模块 --> |
| | |
| | | </el-form> |
| | | <!-- 表单按钮 --> |
| | | <span v-if="!view" slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" icon="el-icon-circle-check" :size="option.size" @click="handleSubmit">提 交</el-button> |
| | | <el-button type="primary" icon="el-icon-circle-check" :size="option.size" @click="handleSubmit">提 |
| | | 交</el-button> |
| | | <el-button icon="el-icon-circle-close" :size="option.size" @click="box = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/discuss/publicDiscuss"; |
| | | import { |
| | | getList, |
| | | getDetail, |
| | | add, |
| | | // update, |
| | | // remove |
| | | } from "@/api/discuss/publicDiscuss"; |
| | | import option from "@/option/discuss/publicDiscuss"; |
| | | import {mapGetters} from "vuex"; |
| | | import {getDictionary} from '@/api/system/dict' |
| | | import { |
| | | mapGetters |
| | | } from "vuex"; |
| | | import { |
| | | getDictionary |
| | | } from '@/api/system/dict' |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | }, |
| | | init() {}, |
| | | searchHide() { |
| | | this.search = !this.search; |
| | | }, |
| | |
| | | }); |
| | | }); |
| | | } else { |
| | | update(this.form).then(() => { |
| | | this.box = false; |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }) |
| | | // update(this.form).then(() => { |
| | | // this.box = false; |
| | | // this.onLoad(this.page); |
| | | // this.$message({ |
| | | // type: "success", |
| | | // message: "操作成功!" |
| | | // }); |
| | | // }) |
| | | } |
| | | }, |
| | | handleAdd() { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | // return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.selectionClear(); |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | // return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList" |
| | | :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" |
| | | @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 type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.userTopics_delete" |
| | | <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.userTopics_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/discuss/userTopics"; |
| | | import { |
| | | getList, |
| | | getDetail, |
| | | add, |
| | | update, |
| | | remove |
| | | } from "@/api/discuss/userTopics"; |
| | | import option from "@/option/discuss/userTopics"; |
| | | import {mapGetters} from "vuex"; |
| | | import { |
| | | mapGetters |
| | | } from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | remove, |
| | | update, |
| | | add, |
| | | getNotice, |
| | | // getNotice, |
| | | upcomment |
| | | } from "@/api/patrol/placeChek" |
| | | |
| | |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | var names = data.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | data.url = urls.join(",") |
| | | } |
| | | data.articleList = JSON.parse(data.articleRange) |
| | | this.form = data |
| | | }) |
| | | // getNotice(this.form.id).then((res) => { |
| | | // let data = res.data.data |
| | | // // data.forEach(item=>{ |
| | | // if (data.url.length > 0) { |
| | | // var urls = [] |
| | | // var names = data.url.split(",") |
| | | // names.forEach(name => { |
| | | // urls.push(website.minioUrl + name) |
| | | // }) |
| | | // data.url = urls.join(",") |
| | | // } |
| | | // data.articleList = JSON.parse(data.articleRange) |
| | | // this.form = data |
| | | // }) |
| | | } |
| | | // con |
| | | done() |
| | |
| | | <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" |
| | | v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <template slot-scope="{type,size,row }" slot="menu"> |
| | |
| | | remove, |
| | | update, |
| | | add, |
| | | getNotice, |
| | | upcomment |
| | | } from "@/api/patrol/placeChek" |
| | | |
| | |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | let data = res.data.data |
| | | // data.forEach(item=>{ |
| | | if (data.url.length > 0) { |
| | | var urls = [] |
| | | var names = data.url.split(",") |
| | | names.forEach(name => { |
| | | urls.push(website.minioUrl + name) |
| | | }) |
| | | data.url = urls.join(",") |
| | | } |
| | | data.articleList = JSON.parse(data.articleRange) |
| | | this.form = data |
| | | }) |
| | | } |
| | | // con |
| | | done() |
| | | }, |
| | | |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | done() |
| | | // done() |
| | | }, |
| | | (error) => { |
| | | window.console.log(error) |
| | | loading() |
| | | // loading() |
| | | } |
| | | ) |
| | | }, |
| | |
| | | handleImport() { |
| | | this.excelBox = true |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | uploadAfter(res, done, loading) { |
| | | this.excelBox = false |
| | | this.onLoad(this.page) |
| | | this.$message({ |