| | |
| | | }) |
| | | } |
| | | |
| | | export const getAll = (params) => { |
| | | return request({ |
| | | url: '/api/blade-fire/fire/all', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/blade-fire/fire/detail', |
| | |
| | | this.pointVector.getSource().addFeature(feature_Point) |
| | | let center = [Number(pointLonLat[0]), Number(pointLonLat[1])] |
| | | let view = this.map.getView() |
| | | view.setZoom(14) |
| | | view.setZoom(20) |
| | | view.animate({ |
| | | center: center, |
| | | duration: 5, |
| | |
| | | indexTitle: 'Saber Admin', |
| | | clientId: 'saber', // 客户端id |
| | | clientSecret: 'saber_secret', // 客户端密钥 |
| | | tenantMode: true, // 是否开启租户模式 |
| | | tenantMode: false, // 是否开启租户模式 |
| | | tenantId: "000000", // 管理组租户编号 |
| | | captchaMode: false, // 是否开启验证码模式 |
| | | switchMode: false, // 是否开启部门切换模式 |
| | |
| | | done(); |
| | | } |
| | | }, |
| | | //获取地图经纬度 |
| | | getMapData(data){ |
| | | this.form.lon = data[0][0] |
| | | this.form.lat = data[0][1] |
| | |
| | | </el-button> |
| | | </template> |
| | | |
| | | <!-- <template slot-scope="{row}" slot="location">--> |
| | | <!-- {{row.$location.split("|").join("")}}--> |
| | | <!-- </template>--> |
| | | <template slot-scope="{row}" slot="level"> |
| | | <span style="color: red" v-if="row.level == '1' ">{{row.$level}}</span> |
| | | <span style="color: #f65f44" v-if="row.level == '2' ">{{row.$level}}</span> |
| | | <span style="color: #f6a944" v-if="row.level == '3' ">{{row.$level}}</span> |
| | | <span style="color: #70b603" v-if="row.level == '4' ">{{row.$level}}</span> |
| | | <span style="color: #2cff00" v-if="row.level == '5' ">{{row.$level}}</span> |
| | | </template> |
| | | |
| | | <template slot-scope="{type,size,row,index}" slot="menu"> |
| | | <el-button icon="el-icon-edit" :size="size" :type="type" @click="goToViewDetail(row)">详 情</el-button> |
| | | <el-button icon="el-icon-delete" :size="size" :type="type" @click="goToFireSupplement(row)">补 录</el-button> |
| | | <el-button icon="el-icon-delete" :size="size" :type="type" :disabled="row.supplementId !='' " @click="goToFireSupplement(row)">补 录</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | |
| | | prop: "no", |
| | | type: "input", |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | }, |
| | | { |
| | | label: "行政区域", |
| | | prop: "location", |
| | | span: 24, |
| | | type: "cascader", |
| | | props: { |
| | | label: 'title', |
| | | value: 'key' |
| | | }, |
| | | dicUrl: 'api/blade-system/region/lazy-tree', |
| | | slot: true |
| | | label: "火灾位置", |
| | | prop: "address", |
| | | type: "input", |
| | | search: true, |
| | | searchSpan: 3, |
| | | }, |
| | | { |
| | | label: "发现方式", |
| | |
| | | value: "dictKey" |
| | | }, |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | }, |
| | | { |
| | | label: "处置状态", |
| | | prop: "status", |
| | | type: "select", |
| | | dicUrl: '/api/blade-system/dict-biz/dictionary?code=fire_handle_status', |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | search: true, |
| | | searchSpan: 3, |
| | | }, |
| | | |
| | | { |
| | | label: "行政区域", |
| | | prop: "location", |
| | | span: 24, |
| | | type: "cascader", |
| | | props: { |
| | | label: 'title', |
| | | value: 'key' |
| | | }, |
| | | dicUrl: 'api/blade-system/region/lazy-tree', |
| | | slot: true, |
| | | search:true, |
| | | hide:true, |
| | | searchSpan:3, |
| | | dicFormatter(res){ |
| | | res.data.shift() |
| | | return res.data |
| | | } |
| | | }, |
| | | { |
| | | label: "火灾等级", |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: "处置状态", |
| | | prop: "status", |
| | | type: "select", |
| | | dicUrl: '/api/blade-system/dict-biz/dictionary?code=fire_handle_status', |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | search: true, |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | label: "报警人", |
| | | prop: "caller", |
| | | type: "input", |
| | | }, |
| | | { |
| | | label: "报警时间", |
| | | type: 'datetimerange', |
| | | prop:'alarmTimeRange', |
| | | format:'yyyy-MM-dd HH:mm:ss', |
| | | valueFormat:'yyyy-MM-dd HH:mm:ss', |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | hide: true, |
| | | search: true, |
| | | searchRange:true, |
| | | searchSpan: 3 |
| | | }, |
| | | { |
| | | label: "报警时间", |
| | | prop: "alarmTime", |
| | | type: "input", |
| | | search: true, |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | label: "火灾描述", |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | if (this.query.alarmTimeRange &&this.query.alarmTimeRange.length>0){ |
| | | this.query.alarmTimeStart = this.query.alarmTimeRange[0] |
| | | this.query.alarmTimeEnd = this.query.alarmTimeRange[1] |
| | | } |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | //展示详情 |
| | | goToViewDetail(data) { |
| | | getSupplementDetail(data.id).then(res => { |
| | | if (res.data.code == 200) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | //跳转到火灾补录 |
| | | goToFireSupplement(data) { |
| | | //要使跳转页接收到值,必须用name |
| | | this.$router.push({ |
| | |
| | | params: data |
| | | }) |
| | | }, |
| | | //跳转到列表页 |
| | | goToList(){ |
| | | this.isDetail = !this.isDetail |
| | | } |
| | |
| | | </div> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <avue-form ref="form" v-model="form" :option="option"></avue-form> |
| | | <avue-form ref="form" v-model="form" :option="option"> |
| | | <template slot="no"> |
| | | <el-autocomplete class="inline-input" |
| | | v-model="form.no" |
| | | :fetch-suggestions="querySearch" |
| | | placeholder="请输入火灾编号" |
| | | :trigger-on-focus="false" |
| | | @select="handleSelect" |
| | | ></el-autocomplete> |
| | | </template> |
| | | </avue-form> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <OpenLayersMap ref="olMap" :mapLocation="mapLocation"></OpenLayersMap> |
| | |
| | | <script> |
| | | import {add} from "@/api/fireSupplement/fireSupplement"; |
| | | import OpenLayersMap from "@/components/OpenLayersMap/index"; |
| | | import {getAll} from "@/api/fire/fire"; |
| | | |
| | | export default { |
| | | name: "fireSupplieMent", |
| | |
| | | prop: 'no', |
| | | span: 24, |
| | | type: 'input', |
| | | disabled: true, |
| | | slot:true |
| | | }, |
| | | { |
| | | label: "行政区域", |
| | | disabled:true, |
| | | prop: "location", |
| | | span: 24, |
| | | type: "cascader", |
| | |
| | | label: 'title', |
| | | value: 'key' |
| | | }, |
| | | separator: '', |
| | | lazy: true, |
| | | lazyLoad(node, resolve) { |
| | | let stop_level = 2; |
| | | let level = node.level; |
| | | let data = node.data || {} |
| | | let code = data.key; |
| | | let list = []; |
| | | let callback = () => { |
| | | resolve((list || []).map(ele => { |
| | | return Object.assign(ele, { |
| | | leaf: level >= stop_level |
| | | }) |
| | | })); |
| | | } |
| | | if (level == 0) { |
| | | axios.get(`${baseUrl}00`).then(res => { |
| | | list = res.data.data; |
| | | callback() |
| | | }) |
| | | } else if (level == 1) { |
| | | axios.get(`${baseUrl}${code}`).then(res => { |
| | | list = res.data.data; |
| | | callback() |
| | | }) |
| | | } else if (level == 2) { |
| | | axios.get(`${baseUrl}${code}`).then(res => { |
| | | list = res.data.data; |
| | | callback() |
| | | }) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | dicUrl: 'api/blade-system/region/lazy-tree', |
| | | slot: true |
| | | }, |
| | | { |
| | | label: '具体地址', |
| | | disabled:true, |
| | | prop: 'address', |
| | | span: 24, |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: "发现方式", |
| | | disabled:true, |
| | | prop: "findWay", |
| | | type: "select", |
| | | row: true, |
| | |
| | | }, |
| | | { |
| | | label: "火灾等级", |
| | | disabled:true, |
| | | prop: "level", |
| | | type: "select", |
| | | row: true, |
| | |
| | | }, |
| | | { |
| | | label: "发现时间", |
| | | disabled:true, |
| | | prop: "alarmTime", |
| | | type: "datetime", |
| | | }, |
| | | { |
| | | label: '报警人', |
| | | disabled:true, |
| | | prop: 'caller', |
| | | span: 24, |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '火灾描述', |
| | | disabled:true, |
| | | prop: 'description', |
| | | span: 24, |
| | | type: 'textarea' |
| | | }, |
| | | { |
| | | label: '现场图片', |
| | | disabled:true, |
| | | prop: 'images', |
| | | listType: 'picture-card', |
| | | type: 'upload', |
| | |
| | | }, |
| | | { |
| | | label: '重伤人数', |
| | | prop: 'seriousInjuredPerson', |
| | | prop: 'seriousInjuryPerson', |
| | | span: 8, |
| | | type: 'input', |
| | | append: '人' |
| | |
| | | policeResourcesForm: {}, |
| | | isDetail: false, |
| | | mapLocation:{ |
| | | isDetail:false |
| | | isDetail:true |
| | | }, |
| | | } |
| | | }, |
| | |
| | | if (this.info) { |
| | | this.initDetail() |
| | | } else { |
| | | this.form = this.$route.params |
| | | this.initSupplement() |
| | | } |
| | | }, |
| | | methods: { |
| | | submit(form, done) { |
| | | form.fireId = this.form.id |
| | | if (!form.fireId){ |
| | | this.$message.warning("请填写需要补录的火灾编号"); |
| | | return |
| | | } |
| | | form.economicLoss = this.economicData |
| | | form.damageArea = this.damageAreaData |
| | | form.policeResources = this.policeResourcesData |
| | |
| | | location:[this.form.lon,this.form.lat] |
| | | } |
| | | }, |
| | | //补录 |
| | | initSupplement(){ |
| | | this.form = this.$route.params |
| | | if (this.form.id){ |
| | | this.option.detail = true |
| | | this.mapLocation = { |
| | | isDetail: true, |
| | | location:[this.form.lon,this.form.lat] |
| | | } |
| | | } |
| | | |
| | | }, |
| | | //返回列表页 |
| | | goToList() { |
| | | this.isDetail = false |
| | | this.$emit('goToList') |
| | | }, |
| | | //自动补全 |
| | | querySearch(queryString, cb){ |
| | | getAll({no:queryString}).then(res=>{ |
| | | if (res.data.code == 200){ |
| | | let data = res.data.data |
| | | data.forEach(e=>{ |
| | | e.value = e.no |
| | | }) |
| | | cb(data) |
| | | } |
| | | }) |
| | | }, |
| | | //选择事件 |
| | | handleSelect(item){ |
| | | Object.assign(this.form,item) |
| | | this.mapLocation = { |
| | | isDetail:true, |
| | | location:[this.form.lon,this.form.lat] |
| | | } |
| | | this.$refs.olMap.addPoint(this.mapLocation.location) |
| | | } |
| | | }, |
| | | destroyed() { |
| | | //点击其他菜单时会关闭当前页,防止出现多个相同tab |
| | | this.$router.$avueRouter.closeTag("/fire/fireSupplement") |
| | | } |
| | | } |
| | | </script> |
| | |
| | | required: true, |
| | | message: "请选择所属角色", |
| | | trigger: "click" |
| | | }] |
| | | }], |
| | | display: false |
| | | }, |
| | | { |
| | | label: "用户名", |
| | |
| | | required: true, |
| | | message: "请选择所属单位", |
| | | trigger: "click" |
| | | }] |
| | | }], |
| | | display: false |
| | | }, |
| | | { |
| | | label: "启用状态", |
| | | prop: "status", |
| | | type: "select", |
| | | dicUrl: '/api/blade-system/dict-biz/dictionary?code=user_status', |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | display: false |
| | | }, |
| | | ], |
| | | group: [ |
| | |
| | | if (!website.tenantMode) { |
| | | this.initData(website.tenantId); |
| | | } |
| | | getRoleTree(this.userInfo.tenant_id).then(res => { |
| | | const column = this.findObject(this.option.column, "roleId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | getDeptTree(this.userInfo.tenant_id).then(res => { |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | |
| | | getRoleTree(tenantId).then(res => { |
| | | const column = this.findObject(this.option.group, "roleId"); |
| | | column.dicData = res.data.data; |
| | | const columnRole = this.findObject(this.option.column, "roleId"); |
| | | columnRole.dicData = res.data.data; |
| | | }); |
| | | getDeptTree(tenantId).then(res => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | const columnDept = this.findObject(this.option.column, "deptId"); |
| | | columnDept.dicData = res.data.data; |
| | | }); |
| | | // getPostList(tenantId).then(res => { |
| | | // const column = this.findObject(this.option.group, "postId"); |
| | |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.data.forEach(e=>{ |
| | | e.status = e.status + "" |
| | | }) |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | |
| | | //下面的方法业务都不需要 |
| | | platformRowUpdate(row, index, done, loading) { |
| | | updatePlatform(row.id, row.userType, row.userExt).then(() => { |
| | | this.platformOnLoad(this.platformPage); |