| | |
| | | }) |
| | | } |
| | | |
| | | export const getAll = () => { |
| | | return request({ |
| | | url: '/api/security/security/all', |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/security/security/details', |
| | |
| | | |
| | | <script> |
| | | import {getPage, getDetails, add, update, remove} from "@/api/securityManage/securityManage"; |
| | | import {getAll} from "@/api/security/security"; |
| | | import {mapGetters} from "vuex"; |
| | | import MapBox from "@/components/map/mapBox"; |
| | | |
| | |
| | | prop:"securityId", |
| | | search: true, |
| | | type:"select", |
| | | dicUrl:"/api/security/security/all", |
| | | dicData:[], |
| | | props:{ |
| | | label:"name", |
| | | value:"id" |
| | | } |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属活动", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "警员", |
| | |
| | | label: "所属机构", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | disabled:true, |
| | | dicUrl: "api/blade-system/dept/lazy-list", |
| | | props:{ |
| | | label:'deptName', |
| | |
| | | }, |
| | | search: true, |
| | | searchSpan:4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属机构", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "类型", |
| | |
| | | data: [], |
| | | isDetail:false, |
| | | routeRange:"", |
| | | securityList:[], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSecurityList() |
| | | }, |
| | | watch:{ |
| | | //根据活动回显机构 |
| | | 'form.securityId':{ |
| | | handler(newVal,oldVal){ |
| | | this.securityList.forEach(e=>{ |
| | | if (e.id == newVal){ |
| | | this.form.deptId = e.deptId |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | //获取所有活动集合 |
| | | getSecurityList(){ |
| | | getAll().then(res=>{ |
| | | if (res.data.code == 200){ |
| | | this.securityList = res.data.data |
| | | const securityIdColumn = this.findObject(this.option.column,"securityId") |
| | | securityIdColumn.dicData = this.securityList |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | |
| | | import {getPage, getDetail, add, update, remove} from "@/api/securityManageCar/securityManageCar"; |
| | | import {mapGetters} from "vuex"; |
| | | import MapBox from "@/components/map/mapBox"; |
| | | import {getAll} from "@/api/security/security"; |
| | | |
| | | export default { |
| | | components: {MapBox}, |
| | |
| | | prop: "securityId", |
| | | type: "select", |
| | | search:true, |
| | | dicUrl:"/api/security/security/all", |
| | | dicData:[], |
| | | props:{ |
| | | label:"name", |
| | | value:"id" |
| | | } |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属活动", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "警车", |
| | |
| | | }, |
| | | search: true, |
| | | searchSpan:4, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属机构", |
| | | trigger: "blur" |
| | | }] |
| | | disabled:true, |
| | | }, |
| | | { |
| | | label: "位置或范围", |
| | |
| | | data: [], |
| | | isDetail:false, |
| | | routeRange:"", |
| | | securityList:[], |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSecurityList() |
| | | }, |
| | | watch:{ |
| | | //根据活动回显机构 |
| | | 'form.securityId':{ |
| | | handler(newVal,oldVal){ |
| | | this.securityList.forEach(e=>{ |
| | | if (e.id == newVal){ |
| | | this.form.deptId = e.deptId |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | //获取所有活动集合 |
| | | getSecurityList(){ |
| | | getAll().then(res=>{ |
| | | if (res.data.code == 200){ |
| | | this.securityList = res.data.data |
| | | const securityIdColumn = this.findObject(this.option.column,"securityId") |
| | | securityIdColumn.dicData = this.securityList |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }; |