| | |
| | | <template> |
| | | <basic-container class="desk"> |
| | | <basic-container class="desk1"> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="deptCategory" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | |
| | | </template> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | v-if="deptCategory" |
| | | :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | >附件上传 |
| | | </el-button> |
| | | <el-button |
| | | <!-- <el-button |
| | | v-if="!deptCategory" |
| | | :size="size" |
| | | :type="type" |
| | | @click="handleUploadPage(row)" |
| | | >附件查看 |
| | | </el-button> |
| | | </el-button> --> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | |
| | | defaultValue: "1", |
| | | prop: "category", |
| | | search: true, |
| | | searchSpan:5, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permissionAdd, false), |
| | | viewBtn: this.vaildData(this.permissionView, false), |
| | | delBtn: this.vaildData(this.permissionDelete, false), |
| | | editBtn: this.vaildData(this.permissionEdit, false), |
| | | addBtn: this.vaildData(this.permissionAdd, true), |
| | | viewBtn: this.vaildData(this.permissionView, true), |
| | | delBtn: this.vaildData(this.permissionDelete, true), |
| | | editBtn: this.vaildData(this.permissionEdit, true), |
| | | }; |
| | | }, |
| | | ids() { |
| | |
| | | ? (that.deptCategory = true) |
| | | : (that.deptCategory = false); |
| | | |
| | | if (that.deptCategory) { |
| | | // if (that.deptCategory) { |
| | | that.permissionAdd = this.permission.notice_add; |
| | | that.permissionView = this.permission.notice_view; |
| | | that.permissionDelete = this.permission.notice_delete; |
| | | that.permissionEdit = this.permission.notice_edit; |
| | | } |
| | | // } |
| | | }); |
| | | }, |
| | | //跳转到附近列表页面 |
| | |
| | | ? (that.deptCategory = true) |
| | | : (that.deptCategory = false); |
| | | |
| | | if (that.deptCategory) { |
| | | // if (that.deptCategory) { |
| | | that.permissionAdd = this.permission.notice_add; |
| | | that.permissionView = this.permission.notice_view; |
| | | that.permissionDelete = this.permission.notice_delete; |
| | | that.permissionEdit = this.permission.notice_edit; |
| | | } |
| | | // } |
| | | |
| | | const { releaseTimeRange } = this.query; |
| | | if (that.deptCategory) { |
| | | // if (that.deptCategory) { |
| | | params["deptId"] = this.deptId; |
| | | params["jurisdiction"] = this.jurisdiction; |
| | | } |
| | | // } |
| | | let values = { |
| | | ...params, |
| | | }; |
| | |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.data.forEach((item) => { |
| | | if (item.category == 2) { |
| | | that.option.addBtn = false; |
| | | that.option.editBtn = false; |
| | | that.option.delBtn = false; |
| | | } |
| | | if (item.category == 1) { |
| | | that.option.addBtn = true; |
| | | that.option.editBtn = true; |
| | | that.option.delBtn = true; |
| | | } |
| | | }); |
| | | // this.data.forEach((item) => { |
| | | // if (item.category == 2) { |
| | | // that.option.addBtn = false; |
| | | // that.option.editBtn = false; |
| | | // that.option.delBtn = false; |
| | | // } |
| | | // if (item.category == 1) { |
| | | // that.option.addBtn = true; |
| | | // that.option.editBtn = true; |
| | | // that.option.delBtn = true; |
| | | // } |
| | | // }); |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |