| | |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.workreport_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { workreportColumn } from "./data"; |
| | | import { |
| | | getListPage, |
| | | remove, |
| | |
| | | } from "@/api/workreport/workreport"; |
| | | import { getDept } from "@/api/system/dept"; |
| | | import { mapGetters } from "vuex"; |
| | | import { mapState } from "vuex"; |
| | | import { workreportColumn } from "./data"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | excelBtn: false, |
| | | menuWidth: 320, |
| | | dialogClickModal: false, |
| | | column: workreportColumn, |
| | | column:workreportColumn, |
| | | }, |
| | | data: [], |
| | | }; |
| | |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.notice_add, false), |
| | | viewBtn: this.vaildData(this.permission.notice_view, false), |
| | | delBtn: this.vaildData(this.permission.notice_delete, false), |
| | | editBtn: this.vaildData(this.permission.notice_edit, false), |
| | | addBtn: this.vaildData(this.permission.workreport_add, false), |
| | | viewBtn: this.vaildData(this.permission.workreport_view, false), |
| | | delBtn: this.vaildData(this.permission.workreport_delete, false), |
| | | editBtn: this.vaildData(this.permission.workreport_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | | }), |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | |
| | | rowUpdate(row, index, done, loading) { |
| | | row.deptId = this.deptId; |
| | | row.userId = this.userId; |
| | | row.category = 3; |
| | | // row.receivedIds = row.receivedIds.join(","); |
| | | update(row).then( |
| | | () => { |
| | |
| | | ).content.user_id; |
| | | |
| | | var that = this; |
| | | getDept(this.deptId).then((res) => { |
| | | var deptCategory = res.data.data.deptCategory; |
| | | deptCategory == 1 |
| | | ? (that.deptCategory = true) |
| | | : (that.deptCategory = false); |
| | | getDept(this.deptId).then(() => { |
| | | const columnReceivedIds = that.findObject(that.option.column, "receivedIds"); |
| | | columnReceivedIds.dicUrl = "/api/blade-system/dept/lazy-tree-users?type=3&deptId="+that.deptId; |
| | | params["deptId"] = that.deptId; |
| | | params["userId"] = that.userId; |
| | | |
| | | // const { releaseTimeRange } = this.query; |
| | | // if (that.deptCategory) { |
| | | params["deptId"] = this.deptId; |
| | | params["userId"] = this.userId; |
| | | // } |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | // if (releaseTimeRange) { |
| | | // values = { |
| | | // ...params, |
| | | // startTime: releaseTimeRange[0], |
| | | // endTime: releaseTimeRange[1], |
| | | // ...this.query, |
| | | // }; |
| | | // values.releaseTimeRange = null; |
| | | // } |
| | | this.loading = true; |
| | | that.loading = true; |
| | | getListPage(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(); |
| | | that.page.total = data.total; |
| | | that.data = data.records; |
| | | that.loading = false; |
| | | that.selectionClear(); |
| | | }); |
| | | }); |
| | | }, |