| | |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]"> |
| | | <avue-crud class="tablesss" :option="option" :data="data" :page.sync="page" ref="crud" :permission="permissionList" |
| | | <avue-crud class="tablesss" :option="option" v-model="form" :data="data" :page.sync="page" ref="crud" :permission="permissionList" |
| | | :search.sync="questionBankSearch" @on-load="onLoad" :table-loading="loading" @row-save="rowSave" |
| | | @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" @row-del="rowDel" |
| | | @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" @row-del="rowDel" :before-open="beforeOpen" |
| | | @selection-change="selectionChange" @refresh-change="refreshChange"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.clock_delete" |
| | |
| | | getList, |
| | | add, |
| | | update, |
| | | remove |
| | | remove, |
| | | getDetail |
| | | } from "@/api/check/postFiling"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | form:{}, |
| | | query: {}, |
| | | questionBankSearch: {}, |
| | | data: [], |
| | |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "经度", |
| | | prop: "x", |
| | | span: 12, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入经度", |
| | | trigger: "click" |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: "纬度", |
| | | prop: "y", |
| | | span: 12, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入纬度", |
| | | trigger: "click" |
| | | } |
| | | ], |
| | | label:"巡岗地点", |
| | | prop:"position", |
| | | display:false |
| | | }, |
| | | { |
| | | label: "上岗时间", |
| | |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | { |
| | | label:"巡岗地点", |
| | | prop:"address", |
| | | type: "map", |
| | | span:24, |
| | | hide:true, |
| | | }, |
| | | |
| | | // { |
| | | // label: "经度", |
| | | // prop: "x", |
| | | // span: 12, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入经度", |
| | | // trigger: "click" |
| | | // } |
| | | // ], |
| | | // }, |
| | | // { |
| | | // label: "纬度", |
| | | // prop: "y", |
| | | // span: 12, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入纬度", |
| | | // trigger: "click" |
| | | // } |
| | | // ], |
| | | // }, |
| | | |
| | | ], |
| | | ...this.$store.state.control.clearOtherBut |
| | | } |
| | |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | this.form['address'] = [this.form.lon,this.form.lat,this.form.position] |
| | | |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | |
| | | sizeChange(val) { |
| | | this.page1.currentPage = 1; |
| | | this.page1.pageSize = val; |
| | |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | form['type'] = 1; |
| | | |
| | | form.lon = form.address[0] |
| | | form.lat = form.address[1] |
| | | form.position = form.address[2] |
| | | add(form).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | |
| | | row.lon = row.address[0] |
| | | row.lat = row.address[1] |
| | | row.position = row.address[2] |
| | | |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params = this.questionBankSearch; |
| | | if (this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "民警" || this.userInfo.role_name == "administrator") { |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | if (this.userInfo.role_name == "保安公司管理员" || this.userInfo.role_name == "分公司管理员") { |
| | | params["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | |
| | | |
| | | const { releaseTimeRange } = this.query; |
| | | let values = { |
| | |
| | | ...params, |
| | | beginTime: releaseTimeRange[0], |
| | | endTime: releaseTimeRange[1], |
| | | ...this.query |
| | | ...this.query, |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } |
| | | this.loading = true; |
| | | //固定岗 |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(values, this.query) |
| | | Object.assign({type:1},values, this.query) |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |