| | |
| | | |
| | | <script> |
| | | import { workreportColumn } from "./data"; |
| | | import { mapState } from "vuex"; |
| | | import { |
| | | getListPage, |
| | | remove, |
| | |
| | | searchMenuSpan: 6, |
| | | border: true, //liu |
| | | addBtnText: "发起", |
| | | saveBtnText: "发起", |
| | | addTitle: "发起", |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | |
| | | ...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: { |
| | |
| | | ).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((res) => { |
| | | // var deptCategory = res.data.data.deptCategory; |
| | | // deptCategory == 1 |
| | | // ? (that.deptCategory = true) |
| | | // : (that.deptCategory = false); |
| | | |
| | | // const { releaseTimeRange } = this.query; |
| | | // if (that.deptCategory) { |
| | | |
| | | |
| | | //1:保安公司 2:公安 3:培训公司 |
| | | if(this.userInfo.role_name=="保安公司管理员" |
| | | || this.userInfo.role_name=="保安" |
| | | || this.userInfo.role_name=="未持证保安" |
| | | ){ |
| | | const column = that.findObject(that.option.column, "category"); |
| | | column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=securityWorkReportCategory"; |
| | | const columnReceivedIds = that.findObject(that.option.column, "receivedIds"); |
| | | columnReceivedIds.dicUrl = "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId="+that.userInfo.dept_id; |
| | | } |
| | | if(this.userInfo.role_name=="公安管理员"){ |
| | | const column = that.findObject(that.option.column, "category"); |
| | | column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=workReportCategory"; |
| | | const columnReceivedIds = that.findObject(that.option.column, "receivedIds"); |
| | | columnReceivedIds.dicUrl = "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId="+that.userInfo.dept_id; |
| | | } |
| | | 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; |
| | | getListPage(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }); |
| | | // }); |
| | | }, |
| | | }, |
| | | }; |