| | |
| | | <template> |
| | | <basic-container |
| | | :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']" |
| | | :class="[ |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | class="tablesss" |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | |
| | | remove, |
| | | update, |
| | | add, |
| | | getDetail, |
| | | getDetail |
| | | } from "@/api/workreport/workreport"; |
| | | import { getDept } from "@/api/system/dept"; |
| | | import { mapGetters } from "vuex"; |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | |
| | | menuWidth: 320, |
| | | dialogClickModal: false, |
| | | column: workreplyColumn, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | ...this.$store.state.control.clearOtherBut |
| | | }, |
| | | data: [], |
| | | data: [] |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(this.permission.workreply_view, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(this.permission.workreply_edit, false), |
| | | editBtn: this.vaildData(this.permission.workreply_edit, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | row.category = 1; |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then((res) => { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | ).content.user_id; |
| | | |
| | | var that = this; |
| | | getDept(this.deptId).then((res) => { |
| | | getDept(this.deptId).then(res => { |
| | | var deptCategory = res.data.data.deptCategory; |
| | | deptCategory == 1 |
| | | ? (that.deptCategory = true) |
| | |
| | | params["userId"] = this.userId; |
| | | // } |
| | | let values = { |
| | | ...params, |
| | | ...params |
| | | }; |
| | | // if (releaseTimeRange) { |
| | | // values = { |
| | |
| | | // values.releaseTimeRange = null; |
| | | // } |
| | | this.loading = true; |
| | | getListPageReply(page.currentPage, page.pageSize, values).then( |
| | | (res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | } |
| | | ); |
| | | getListPageReply(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.selectionClear(); |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style></style> |