| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getdata1, adddata1, update1, remove1,getDispatcherUnitByDeptId} from "@/api/dispatch/dispatch"; |
| | | import { |
| | | getdata1, |
| | | adddata1, |
| | | update1, |
| | | remove1, |
| | | getDispatcherUnitByDeptId, |
| | | } from "@/api/dispatch/dispatch"; |
| | | import { getListByDeptId } from "@/api/system/user"; |
| | | import { mapState } from "vuex"; |
| | | |
| | |
| | | }; |
| | | }, |
| | | created () { |
| | | |
| | | |
| | | if(this.userInfo.role_name=="保安公司管理员"){ |
| | | const deptColumn = this.findObject(this.option1.column, "deptId"); |
| | | |
| | | deptColumn.search = false; |
| | | |
| | | }else{ |
| | | const deptColumn = this.findObject(this.option1.column, "dispatcherUnitId"); |
| | | deptColumn.search = false; |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }), |
| | | deps(){ |
| | | return this.form.deptId; |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | getListByDeptId(that.userInfo.dept_id).then((res)=>{ |
| | | const userColumn = that.findObject(this.option1.column, "userIds"); |
| | | userColumn.dicData = res.data.data; |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | this.initFlag = true; |
| | |
| | | var that = this; |
| | | if(type==1){ |
| | | getDispatcherUnitByDeptId(null).then((res)=>{ |
| | | const dispatcherUnitIdColumn = that.findObject(this.option1.column, "dispatcherUnitId"); |
| | | const dispatcherUnitIdColumn = that.findObject( |
| | | this.option1.column, |
| | | "dispatcherUnitId" |
| | | ); |
| | | console.log(res.data.data,111); |
| | | dispatcherUnitIdColumn.dicData = res.data.data; |
| | | |
| | | }) |
| | | }); |
| | | } |
| | | if(type==2){ |
| | | getDispatcherUnitByDeptId(that.userInfo.dept_id).then((res)=>{ |
| | | const dispatcherUnitIdColumn = that.findObject(this.option1.column, "dispatcherUnitId"); |
| | | const dispatcherUnitIdColumn = that.findObject( |
| | | this.option1.column, |
| | | "dispatcherUnitId" |
| | | ); |
| | | dispatcherUnitIdColumn.dicData = res.data.data; |
| | | }) |
| | | } |
| | | }); |
| | | getListByDeptId(that.userInfo.dept_id).then((res) => { |
| | | const userIdsColumn = that.findObject(this.option1.column, "userIds"); |
| | | userIdsColumn.dicData = res.data.data; |
| | | }); |
| | | } |
| | | }, |
| | | watch: { |
| | | // "form.deptId"() { |
| | | // this.initData(); |
| | | }, |
| | | // watch: { |
| | | // // "form.deptId"() { |
| | | // // this.initData(); |
| | | // // } |
| | | // deps(){ |
| | | // console.log(this.deps,5646646) |
| | | // } |
| | | deps(){ |
| | | console.log(this.deps,5646646) |
| | | } |
| | | }, |
| | | // }, |
| | | mounted() { |
| | | this.onLoad1(this.page1, this.query1); |
| | | }, |
| | |
| | | |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | style="display:none" |
| | | type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | |
| | | form: {}, |
| | | questionBankOption: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: true, |
| | | editBtn: true, |
| | | addBtn: true, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | selection: true, |
| | | menu: true, |
| | | // 导出按钮 |
| | | excelBtn: false, |
| | | viewBtn: true, |
| | | viewBtn: false, |
| | | |
| | | // title: '题库', |
| | | |
| | |
| | | ).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); |
| | | |
| | | |
| | | |
| | | //1:保安公司 2:公安 3:培训公司 |
| | | if(deptCategory == 1 || deptCategory == 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(deptCategory == 2){ |
| | | 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"); |
| | |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }); |
| | | // }); |
| | | }, |
| | | }, |
| | | }; |