代码合并
commit
3200af628c
15
.env.dev
15
.env.dev
|
|
@ -1,19 +1,12 @@
|
|||
NODE_ENV = development
|
||||
|
||||
#VUE_APP_BASE_API =http://192.168.10.123:9159/api
|
||||
#VUE_APP_BASE_IMG_URL = http://192.168.10.123:9159
|
||||
|
||||
|
||||
|
||||
# 正式服务器
|
||||
#VUE_APP_BASE_API =http://223.99.16.253:9001/api
|
||||
#VUE_APP_BASE_IMG_URL =http://223.99.16.253:9001
|
||||
|
||||
|
||||
# APP_BASE_WS_URL = ws://221.2.83.254:9002/ws
|
||||
# 测试服务区
|
||||
VUE_APP_BASE_API = http://123.132.248.154:9224/api
|
||||
VUE_APP_BASE_IMG_URL = http://123.132.248.154:9224
|
||||
|
||||
|
||||
#VUE_APP_BASE_API = http://123.132.248.154:9224/api
|
||||
#VUE_APP_BASE_IMG_URL = http://123.132.248.154:9224
|
||||
APP_BASE_WS_URL = ws://123.132.248.154:9225/ws
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,10 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="'所属乡镇'">
|
||||
<treeselect :options="orgsTree" :default-expand-level="3" :multiple="true" :flat="true" :open-on-click="true"
|
||||
:open-on-focus="true" :clear-on-select="true" v-model="selectOrgs" style="z-index: 2026;">
|
||||
</treeselect>
|
||||
<el-select v-model="addForm.street" multiple placeholder="请选择">
|
||||
<el-option v-for="item in zrcList" :key="item.id" :label="item.areaName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-top: 16%;">
|
||||
<el-button @click="close()">取消</el-button>
|
||||
|
|
@ -39,7 +40,6 @@
|
|||
name: "AddForm",
|
||||
props: ['detailInfo'],
|
||||
components: {
|
||||
Treeselect,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -60,9 +60,7 @@
|
|||
],
|
||||
},
|
||||
dialogFormVisible: false,
|
||||
orgsTree: [], // 用户可访问到的所有机构组成的树
|
||||
selectRoles: [], // 用户分配的角色
|
||||
selectRoleNames: '',
|
||||
zrcList:[]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -75,39 +73,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
selectOrgs: {
|
||||
get: function () {
|
||||
console.log(this.detailInfo)
|
||||
if (this.detailInfo.length == 1) {
|
||||
return this.addForm.street
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
set: function (v) {
|
||||
console.log('set org:', v)
|
||||
var _this = this
|
||||
_this.addForm.street = v
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let _this = this;
|
||||
var querys = {
|
||||
regionName: localStorage.getItem("areaENName")
|
||||
}
|
||||
getMethodCommon("/Grid/LoadAllGrid", querys).then(res => {
|
||||
console.log("data", res.data);
|
||||
if (res.code == 200) {
|
||||
var list = res.data
|
||||
var arr = this.traverse(list)
|
||||
console.log(arr)
|
||||
_this.orgsTree = arr;
|
||||
}
|
||||
})
|
||||
this.getZRC()
|
||||
},
|
||||
methods: {
|
||||
getZRC() {
|
||||
getMethodCommon("/FireCodeApp/LoadZRC", {}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.zrcList = res.data
|
||||
if (this.addForm.Sex == 0) {
|
||||
this.addForm.Sex = '男'
|
||||
} else {
|
||||
this.addForm.Sex = '女'
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
getMethodCommon("/FireGrid/GetSingleFireFighter?id=" + this.detailInfo[0].id, {}).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
|
|
|||
|
|
@ -14,10 +14,9 @@
|
|||
<!-- <treeselect :options="orgsTree" :default-expand-level="3" :multiple="true" :flat="true" :open-on-click="true"
|
||||
:open-on-focus="true" :clear-on-select="true" v-model="selectOrgs" style="z-index: 2026;">
|
||||
</treeselect> -->
|
||||
<el-select v-model="addForm.areaId" multiple placeholder="请选择">
|
||||
<el-option v-for="item in zrcList" :key="item.id" :label="item.areaName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<treeselect :options="orgsTree" :default-expand-level="3" :multiple="true" :flat="true" :open-on-click="true"
|
||||
:open-on-focus="true" :clear-on-select="true" v-model="selectOrgs" style="z-index: 2026;">
|
||||
</treeselect>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-top: 16%;">
|
||||
<el-button @click="close()">取消</el-button>
|
||||
|
|
@ -40,6 +39,7 @@
|
|||
name: "AddForm",
|
||||
props: ['detailInfo'],
|
||||
components: {
|
||||
Treeselect,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -63,7 +63,6 @@
|
|||
orgsTree: [], // 用户可访问到的所有机构组成的树
|
||||
selectRoles: [], // 用户分配的角色
|
||||
selectRoleNames: '',
|
||||
zrcList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -81,7 +80,7 @@
|
|||
get: function () {
|
||||
console.log(this.detailInfo)
|
||||
if (this.detailInfo.length == 1) {
|
||||
return this.addForm.street
|
||||
return this.addForm.areaId
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
|
|
@ -89,26 +88,27 @@
|
|||
set: function (v) {
|
||||
console.log('set org:', v)
|
||||
var _this = this
|
||||
_this.addForm.street = v
|
||||
_this.addForm.areaId = v
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getZRC()
|
||||
let _this = this;
|
||||
var querys = {
|
||||
regionName: localStorage.getItem("areaENName")
|
||||
}
|
||||
getMethodCommon("/Grid/LoadAllGrid", querys).then(res => {
|
||||
console.log("data", res.data);
|
||||
if (res.code == 200) {
|
||||
var list = res.data
|
||||
var arr = this.traverse(list)
|
||||
console.log(arr)
|
||||
_this.orgsTree = arr;
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getZRC() {
|
||||
getMethodCommon("/FireCodeApp/LoadZRC", {}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.zrcList = res.data
|
||||
if (this.addForm.Sex == 0) {
|
||||
this.addForm.Sex = '男'
|
||||
} else {
|
||||
this.addForm.Sex = '女'
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDetail() {
|
||||
getMethodCommon("/FireCodeApp/GetForestryUserById?id=" + this.detailInfo[0].Id, {}).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export default {
|
|||
let _this = this;
|
||||
if ("WebSocket" in window) {
|
||||
// 打开一个 web socket
|
||||
var ws = new WebSocket("ws://123.132.248.154:9225/ws");
|
||||
var ws = new WebSocket(process.env.NODE_ENV.APP_BASE_WS_URL);
|
||||
var heartCheck;
|
||||
ws.onopen = function () {
|
||||
//Web Socket 已连接上,使用 send() 方法发送数据
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
if ("WebSocket" in window) {
|
||||
|
||||
// 打开一个 web socket
|
||||
var ws = new WebSocket("ws://123.132.248.154:9225/ws");
|
||||
var ws = new WebSocket(process.env.NODE_ENV.APP_BASE_WS_URL);
|
||||
var heartCheck;
|
||||
ws.onopen = function () {
|
||||
//Web Socket 已连接上,使用 send() 方法发送数据
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<div class="box">
|
||||
<div class="box-title">火情线索</div>
|
||||
<div class="close-button" @click="close">
|
||||
<!-- <div class="close-button" @click="close">
|
||||
<i class='el-icon el-icon-close'></i>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="box-container">
|
||||
<div class="draw" v-show="active == 1">
|
||||
<div class="news" v-for="(item,index) in list" :key="index" >
|
||||
|
|
@ -282,9 +282,10 @@
|
|||
initWebSocket(){
|
||||
let _this = this;
|
||||
if ("WebSocket" in window) {
|
||||
|
||||
|
||||
// 打开一个 web socket
|
||||
var ws = new WebSocket("ws://123.132.248.154:9225/ws");
|
||||
|
||||
var ws = new WebSocket(process.env.NODE_ENV.APP_BASE_WS_URL);
|
||||
ws.onopen = function () {
|
||||
//Web Socket 已连接上,使用 send() 方法发送数据
|
||||
console.log('WEBSOCKET-ONLINE')
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ export default {
|
|||
let _this = this;
|
||||
if ("WebSocket" in window) {
|
||||
// 打开一个 web socket
|
||||
var ws = new WebSocket("ws://123.132.248.154:9225/ws");
|
||||
var ws = new WebSocket(process.env.NODE_ENV.APP_BASE_WS_URL);
|
||||
var heartCheck;
|
||||
ws.onopen = function () {
|
||||
//Web Socket 已连接上,使用 send() 方法发送数据
|
||||
|
|
|
|||
Loading…
Reference in New Issue