Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZiBoYingJI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kimber
ZiBoYingJI
Commits
81915e80
Commit
81915e80
authored
Jul 24, 2024
by
Kimber
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rev2'
parents
31cebfca
971c40f9
Changes
56
Hide whitespace changes
Inline
Side-by-side
Showing
56 changed files
with
2003 additions
and
253 deletions
+2003
-253
data.js
src/api/newResource/data.js
+43
-0
machine.js
src/api/newResource/machine.js
+27
-0
dept.js
src/api/system/dept.js
+8
-0
menu.js
src/api/system/menu.js
+9
-1
user.js
src/api/system/user.js
+9
-0
Navbar.vue
src/layout/components/Navbar.vue
+99
-51
Logo.vue
src/layout/components/Sidebar/Logo.vue
+17
-17
index.vue
src/layout/components/Sidebar/index.vue
+23
-23
routers.js
src/router/routers.js
+6
-0
api.js
src/store/modules/api.js
+3
-1
request.js
src/utils/request.js
+21
-1
home.vue
src/views/home.vue
+6
-5
home4Center.vue
src/views/home4Center.vue
+4
-4
home4Enterprise.vue
src/views/home4Enterprise.vue
+1
-0
home4Index.vue
src/views/home4Index.vue
+200
-0
home4Mine.vue
src/views/home4Mine.vue
+4
-4
index.vue
src/views/kd/c/enterprise/index.vue
+4
-4
dangerousWork.vue
src/views/kd/e/dangerousWork.vue
+4
-4
drill.vue
src/views/kd/e/emergency/drill.vue
+4
-4
plan.vue
src/views/kd/e/emergency/plan.vue
+4
-4
supplies.vue
src/views/kd/e/emergency/supplies.vue
+4
-4
team.vue
src/views/kd/e/emergency/team.vue
+4
-4
machine.vue
src/views/kd/e/iot/environment/machine.vue
+4
-4
machine.vue
src/views/kd/e/iot/groundPressure/machine.vue
+4
-4
hcMonitor.vue
src/views/kd/e/iot/hc/hcMonitor.vue
+4
-4
area.vue
src/views/kd/e/iot/person/area.vue
+4
-4
baseStation.vue
src/views/kd/e/iot/person/baseStation.vue
+4
-4
card.vue
src/views/kd/e/iot/person/card.vue
+4
-4
underfloorPlan.vue
src/views/kd/e/iot/person/underfloorPlan.vue
+4
-4
machine.vue
src/views/kd/e/iot/tailings/machine.vue
+4
-4
classes.vue
src/views/kd/e/leader/classes.vue
+4
-4
log.vue
src/views/kd/e/leader/log.vue
+4
-4
scheduling.vue
src/views/kd/e/leader/scheduling.vue
+4
-4
index.vue
src/views/kd/e/notice/index.vue
+4
-4
noticeMix.vue
src/views/kd/e/noticeMix.vue
+4
-4
department.vue
src/views/kd/e/staff/department.vue
+4
-4
job.vue
src/views/kd/e/staff/job.vue
+4
-4
special.vue
src/views/kd/e/staff/special.vue
+4
-4
staff.vue
src/views/kd/e/staff/staff.vue
+19
-18
videoAi.vue
src/views/kd/e/video/videoAi.vue
+4
-4
videoLive.vue
src/views/kd/e/video/videoLive.vue
+4
-4
videoWvp.vue
src/views/kd/e/video/videoWvp.vue
+4
-4
login.vue
src/views/login.vue
+4
-3
data.vue
src/views/newResource/displace/data.vue
+169
-0
machine.vue
src/views/newResource/displace/machine.vue
+156
-0
data.vue
src/views/newResource/temperature/data.vue
+156
-0
machine.vue
src/views/newResource/temperature/machine.vue
+157
-0
data.vue
src/views/newResource/windspeed/data.vue
+156
-0
machine.vue
src/views/newResource/windspeed/machine.vue
+157
-0
data.vue
src/views/newWater/precipitation/data.vue
+161
-0
machine.vue
src/views/newWater/precipitation/machine.vue
+156
-0
index.vue
src/views/system/dept/index.vue
+1
-0
index.vue
src/views/system/menu/index.vue
+5
-5
index.vue
src/views/system/role/index.vue
+19
-4
center.vue
src/views/system/user/center.vue
+5
-0
index.vue
src/views/system/user/index.vue
+102
-16
No files found.
src/api/newResource/data.js
0 → 100644
View file @
81915e80
import
request
from
'
@/utils/request
'
export
default
{
// 绑定我的
addMy
:
(
iotMachine
)
=>
{
return
request
({
url
:
'
api/iot-machine/add/my
'
,
method
:
'
post
'
,
data
:
iotMachine
})
},
// 移除我的
removeMy
:
()
=>
{
return
request
({
url
:
'
api/iot-machine/remove-all/my
'
,
method
:
'
post
'
})
},
// 查询我的
getDataList
:(
params
)
=>
{
return
request
({
url
:
'
data/mp/history
'
,
method
:
'
get
'
,
params
})
},
// 查询风速、温度
getDataList4windSpeed
:
(
params
)
=>
{
return
request
({
url
:
'
data/sz/history
'
,
method
:
'
get
'
,
params
})
},
// 查询降雨量
getDataList4waterPrecipitation
:
(
params
)
=>
{
return
request
({
url
:
'
data/rg/history
'
,
method
:
'
get
'
,
params
})
}
}
src/api/newResource/machine.js
0 → 100644
View file @
81915e80
import
request
from
'
@/utils/request
'
export
default
{
// 绑定我的
addMy
:
(
iotMachine
)
=>
{
return
request
({
url
:
'
api/iot-machine/add/my
'
,
method
:
'
post
'
,
data
:
iotMachine
})
},
// 移除我的
removeMy
:
()
=>
{
return
request
({
url
:
'
api/iot-machine/remove-all/my
'
,
method
:
'
post
'
})
},
// 查询我的
getDataList
:(
params
)
=>
{
return
request
({
url
:
'
tab/drybeachequipinfor
'
,
method
:
'
get
'
,
params
})
}
}
src/api/system/dept.js
View file @
81915e80
...
@@ -8,6 +8,14 @@ export function getDepts(params) {
...
@@ -8,6 +8,14 @@ export function getDepts(params) {
})
})
}
}
export
function
getDeptList
(
params
)
{
return
request
({
url
:
'
api/dept/tree
'
,
method
:
'
get
'
,
params
})
}
export
function
getDeptSuperior
(
ids
)
{
export
function
getDeptSuperior
(
ids
)
{
const
data
=
ids
.
length
||
ids
.
length
===
0
?
ids
:
Array
.
of
(
ids
)
const
data
=
ids
.
length
||
ids
.
length
===
0
?
ids
:
Array
.
of
(
ids
)
return
request
({
return
request
({
...
...
src/api/system/menu.js
View file @
81915e80
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
export
function
getMenusHome
(
pid
)
{
// 获取中间页菜单列表
return
request
({
url
:
'
/api/menus/home
'
,
method
:
'
get
'
})
}
export
function
getMenusTree
(
pid
)
{
export
function
getMenusTree
(
pid
)
{
return
request
({
return
request
({
url
:
'
api/menus/lazy?pid=
'
+
pid
,
url
:
'
api/menus/lazy?pid=
'
+
pid
,
...
@@ -62,4 +70,4 @@ export function edit(data) {
...
@@ -62,4 +70,4 @@ export function edit(data) {
})
})
}
}
export
default
{
add
,
edit
,
del
,
getMenusTree
,
getMenuSuperior
,
getMenus
,
getChild
}
export
default
{
add
,
edit
,
del
,
getMenusTree
,
getMenuSuperior
,
getMenus
,
getChild
,
getMenusHome
}
src/api/system/user.js
View file @
81915e80
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
import
{
encrypt
}
from
'
@/utils/rsaEncrypt
'
import
{
encrypt
}
from
'
@/utils/rsaEncrypt
'
export
function
getCompanyList
(
data
)
{
return
request
({
url
:
'
api/enterprise/auth/enterpriseList
'
,
method
:
'
get
'
,
params
:
data
})
}
export
function
add
(
data
)
{
export
function
add
(
data
)
{
return
request
({
return
request
({
url
:
'
api/users
'
,
url
:
'
api/users
'
,
...
...
src/layout/components/Navbar.vue
View file @
81915e80
...
@@ -13,12 +13,22 @@
...
@@ -13,12 +13,22 @@
<!--
<el-tooltip
content=
"项目文档"
effect=
"dark"
placement=
"bottom"
>
<!--
<el-tooltip
content=
"项目文档"
effect=
"dark"
placement=
"bottom"
>
<Doc
class=
"right-menu-item hover-effect"
/>
<Doc
class=
"right-menu-item hover-effect"
/>
</el-tooltip>
-->
</el-tooltip>
-->
<div
style=
"display: inline-block; overflow: hidden;vertical-align: -4px;"
>
<el-select
size=
"mini"
v-model=
"currentCompany"
placeholder=
""
@
change=
"handleChange"
>
<el-option
v-for=
"item in companyList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</div>
<el-tooltip
v-if=
"showDatav"
content=
"打开大数据监控平台
数据大屏"
effect=
"dark"
placement=
"bottom"
>
<el-tooltip
content=
"打开
数据大屏"
effect=
"dark"
placement=
"bottom"
>
<div
class=
"right-menu-item hover-effect"
@
click=
"gotoDatav"
>
数据大屏
</div>
<div
class=
"right-menu-item hover-effect"
@
click=
"gotoDatav"
>
返回首页
</div>
</el-tooltip>
</el-tooltip>
<el-tooltip
v-if=
"showNotice"
:content=
"playNotice?'通知公告':'打开声音权限,新消息可以播放提示音'"
effect=
"dark"
placement=
"bottom"
>
<
!--
<
el-tooltip
v-if=
"showNotice"
:content=
"playNotice?'通知公告':'打开声音权限,新消息可以播放提示音'"
effect=
"dark"
placement=
"bottom"
>
<router-link
:to=
"noticeUrl"
>
<router-link
:to=
"noticeUrl"
>
<div
class=
"right-menu-item hover-effect"
>
<div
class=
"right-menu-item hover-effect"
>
<el-badge
:value=
"undoNotice.totle"
:hidden=
"!undoNotice.totle"
:max=
"99"
class=
"item"
>
<el-badge
:value=
"undoNotice.totle"
:hidden=
"!undoNotice.totle"
:max=
"99"
class=
"item"
>
...
@@ -28,15 +38,15 @@
...
@@ -28,15 +38,15 @@
</el-badge>
</el-badge>
</div>
</div>
</router-link>
</router-link>
</el-tooltip>
</el-tooltip>
-->
<el-tooltip
content=
"全屏缩放"
effect=
"dark"
placement=
"bottom"
>
<el-tooltip
content=
"全屏缩放"
effect=
"dark"
placement=
"bottom"
>
<screenfull
id=
"screenfull"
class=
"right-menu-item hover-effect"
/>
<screenfull
id=
"screenfull"
class=
"right-menu-item hover-effect"
/>
</el-tooltip>
</el-tooltip>
<el-tooltip
content=
"布局设置"
effect=
"dark"
placement=
"bottom"
>
<
!--
<
el-tooltip
content=
"布局设置"
effect=
"dark"
placement=
"bottom"
>
<size-select
id=
"size-select"
class=
"right-menu-item hover-effect"
/>
<size-select
id=
"size-select"
class=
"right-menu-item hover-effect"
/>
</el-tooltip>
</el-tooltip>
-->
</
template
>
</
template
>
...
@@ -68,6 +78,7 @@
...
@@ -68,6 +78,7 @@
</template>
</template>
<
script
>
<
script
>
import
request
from
'
@/utils/request
'
import
{
mapGetters
}
from
'
vuex
'
import
{
mapGetters
}
from
'
vuex
'
import
Breadcrumb
from
'
@/components/Breadcrumb
'
import
Breadcrumb
from
'
@/components/Breadcrumb
'
import
Hamburger
from
'
@/components/Hamburger
'
import
Hamburger
from
'
@/components/Hamburger
'
...
@@ -89,6 +100,8 @@ export default {
...
@@ -89,6 +100,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
currentCompany
:
''
,
companyList
:
[],
selectedMine
:
{},
selectedMine
:
{},
undoNotice
:
{},
// 未处理的通知
undoNotice
:
{},
// 未处理的通知
playNotice
:
true
,
playNotice
:
true
,
...
@@ -127,34 +140,35 @@ export default {
...
@@ -127,34 +140,35 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
// 当前选择的矿山
this
.
getCompanyList
()
const
selectedMineJson
=
window
.
localStorage
.
getItem
(
'
kd.selected.mine
'
)
// // 当前选择的矿山
if
(
selectedMineJson
)
{
// const selectedMineJson = window.localStorage.getItem('kd.selected.mine')
const
selectedMine
=
JSON
.
parse
(
selectedMineJson
)
// if (selectedMineJson) {
if
(
selectedMine
&&
selectedMine
.
enterpriseId
===
this
.
user
.
enterpriseId
)
{
// const selectedMine = JSON.parse(selectedMineJson)
this
.
selectedMine
=
selectedMine
// if (selectedMine && selectedMine.enterpriseId === this.user.enterpriseId) {
}
// this.selectedMine = selectedMine
}
// }
this
.
$refs
.
audio
.
src
=
require
(
'
@/assets/audio/notice.wav
'
)
// }
// 是否有通知权限
// this.$refs.audio.src = require('@/assets/audio/notice.wav')
this
.
sidebarRouters
.
forEach
(
r
=>
{
// // 是否有通知权限
if
(
this
.
user
.
enterpriseId
===
0
&&
r
.
path
===
'
/c/noticeMix
'
)
{
// this.sidebarRouters.forEach(r => {
this
.
showNotice
=
true
// if (this.user.enterpriseId === 0 && r.path === '/c/noticeMix') {
this
.
bindNoticeTimer
()
// this.showNotice = true
}
// this.bindNoticeTimer()
if
(
this
.
user
.
enterpriseId
!==
0
&&
r
.
path
===
'
/e/noticeMix
'
&&
this
.
selectedMine
.
hasEnable
)
{
// }
this
.
showNotice
=
true
// if (this.user.enterpriseId !== 0 && r.path === '/e/noticeMix' && this.selectedMine.hasEnable) {
this
.
bindNoticeTimer
()
// this.showNotice = true
}
// this.bindNoticeTimer()
})
// }
// 是否有大屏功能
// })
if
(
this
.
user
.
enterpriseId
===
0
)
{
// // 是否有大屏功能
this
.
showDatav
=
true
// if (this.user.enterpriseId === 0) {
}
else
{
// this.showDatav = true
if
(
this
.
selectedMine
.
hasEnable
)
{
// } else {
this
.
showDatav
=
true
// if (this.selectedMine.hasEnable) {
}
// this.showDatav = true
}
// }
// }
},
},
beforeDestroy
()
{
// 组件卸载,关闭通知
beforeDestroy
()
{
// 组件卸载,关闭通知
if
(
this
.
noticeTimer
)
{
if
(
this
.
noticeTimer
)
{
...
@@ -162,25 +176,59 @@ export default {
...
@@ -162,25 +176,59 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
// 跳转到大屏
getCompanyList
(){
gotoDatav
()
{
request
({
if
(
this
.
user
.
enterpriseId
===
0
)
{
// 应急局用户
url
:
'
api/enterprise/auth/enterpriseList
'
,
window
.
open
(
location
.
protocol
+
'
//
'
+
window
.
location
.
host
+
'
/datav/index.html
'
,
'
_self
'
)
method
:
'
get
'
,
}
else
{
// 企业用户
params
:{
if
(
this
.
selectedMine
.
hasEnable
)
{
this
.
$message
.
error
(
'
当前未选择矿山
'
)
this
.
$router
.
replace
(
'
/dashboard
'
)
}
if
(
this
.
selectedMine
.
mineType
===
1
)
{
window
.
open
(
location
.
protocol
+
'
//
'
+
window
.
location
.
host
+
'
/datav/underground.html
'
,
'
_self
'
)
}
if
(
this
.
selectedMine
.
mineType
===
2
)
{
window
.
open
(
location
.
protocol
+
'
//
'
+
window
.
location
.
host
+
'
/datav/open-air.html
'
,
'
_self
'
)
}
}
if
(
this
.
selectedMine
.
mineType
===
3
)
{
}).
then
((
res
)
=>
{
window
.
open
(
location
.
protocol
+
'
//
'
+
window
.
location
.
host
+
'
/datav/tailings.html
'
,
'
_self
'
)
this
.
companyList
=
res
.
body
||
[]
this
.
currentCompany
=
this
.
companyList
[
0
].
id
})
},
handleChange
(
value
)
{
console
.
log
(
'
被选择的值:
'
,
value
);
request
({
url
:
'
api/enterprise/change/default/enterprise
'
,
method
:
'
post
'
,
data
:{
id
:
value
}
}
}
}).
then
((
res
)
=>
{
Message
({
message
:
'
操作成功,正在重新加载页面
'
,
type
:
'
success
'
,
duration
:
3000
// 消息显示的时间,单位为 ms
});
// window.location.reload()
})
},
// 跳转到大屏
gotoDatav
()
{
// window.open(location.protocol + '//' + window.location.host + '/datav/index.html', '_self')
// window.open('http://192.168.3.226:8057/datav/index.html', '_self')
this
.
$router
.
push
(
'
/login4Index
'
)
// if (this.user.enterpriseId === 0) { // 应急局用户
// window.open(location.protocol + '//' + window.location.host + '/datav/index.html', '_self')
// } else { // 企业用户
// if (this.selectedMine.hasEnable) {
// this.$message.error('当前未选择矿山')
// this.$router.replace('/dashboard')
// }
// if (this.selectedMine.mineType === 1) {
// window.open(location.protocol + '//' + window.location.host + '/datav/underground.html', '_self')
// }
// if (this.selectedMine.mineType === 2) {
// window.open(location.protocol + '//' + window.location.host + '/datav/open-air.html', '_self')
// }
// if (this.selectedMine.mineType === 3) {
// window.open(location.protocol + '//' + window.location.host + '/datav/tailings.html', '_self')
// }
// }
},
},
bindNoticeTimer
()
{
// 为页面绑定通知的定时任务
bindNoticeTimer
()
{
// 为页面绑定通知的定时任务
const
searchFunction
=
()
=>
{
const
searchFunction
=
()
=>
{
...
...
src/layout/components/Sidebar/Logo.vue
View file @
81915e80
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
selectedMine
:
{},
selectedMine
:
{},
title
:
''
,
title
:
'
中和地信应急平台
'
,
logo
:
false
,
logo
:
false
,
showPublic
:
false
,
showPublic
:
false
,
showMineUnderground
:
false
,
showMineUnderground
:
false
,
...
@@ -43,22 +43,22 @@ export default {
...
@@ -43,22 +43,22 @@ export default {
])
])
},
},
mounted
()
{
mounted
()
{
if
(
this
.
user
.
enterpriseId
!==
0
)
{
// 非应急局
//
if (this.user.enterpriseId !== 0) { // 非应急局
const
selectedMineJson
=
window
.
localStorage
.
getItem
(
'
kd.selected.mine
'
)
//
const selectedMineJson = window.localStorage.getItem('kd.selected.mine')
if
(
selectedMineJson
)
{
//
if (selectedMineJson) {
const
mine
=
JSON
.
parse
(
selectedMineJson
)
//
const mine = JSON.parse(selectedMineJson)
this
.
title
=
mine
.
name
// 设置上方矿山名称
//
this.title = mine.name // 设置上方矿山名称
}
else
{
//
} else {
enterpriseApi
.
getMy
().
then
(
response
=>
{
// 设置上方企业名称
//
enterpriseApi.getMy().then(response => { // 设置上方企业名称
if
(
response
&&
response
.
name
)
{
//
if (response && response.name) {
this
.
title
=
response
.
name
//
this.title = response.name
}
//
}
})
//
})
}
//
}
}
else
{
// 应急局
//
} else { // 应急局
this
.
title
=
'
应急管理中心
'
//
this.title = '应急管理中心'
this
.
logo
=
Logo
//
this.logo = Logo
}
//
}
}
}
}
}
</
script
>
</
script
>
...
...
src/layout/components/Sidebar/index.vue
View file @
81915e80
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
unique-opened
unique-opened
mode=
"vertical"
mode=
"vertical"
>
>
<sidebar-item
v-for=
"route in sidebarRouters"
v-show=
"checkMine(route)"
:key=
"route.path"
:item=
"route"
:base-path=
"route.path"
/>
<sidebar-item
v-for=
"route in sidebarRouters"
v-show
1
=
"checkMine(route)"
:key=
"route.path"
:item=
"route"
:base-path=
"route.path"
/>
</el-menu>
</el-menu>
</el-scrollbar>
</el-scrollbar>
</div>
</div>
...
@@ -57,28 +57,28 @@ export default {
...
@@ -57,28 +57,28 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
console
.
log
(
this
.
sidebarRouters
)
//
console.log(this.sidebarRouters)
const
selectedMineJson
=
window
.
localStorage
.
getItem
(
'
kd.selected.mine
'
)
//
const selectedMineJson = window.localStorage.getItem('kd.selected.mine')
if
(
selectedMineJson
)
{
//
if (selectedMineJson) {
this
.
mine
=
JSON
.
parse
(
selectedMineJson
)
//
this.mine = JSON.parse(selectedMineJson)
}
//
}
if
(
this
.
user
.
enterpriseId
===
0
)
{
// 应急局
//
if (this.user.enterpriseId === 0) { // 应急局
this
.
hasPublic
=
true
//
this.hasPublic = true
}
else
{
// 非应急局
//
} else { // 非应急局
if
(
this
.
mine
&&
this
.
mine
.
mineType
)
{
// 含矿山
//
if (this.mine && this.mine.mineType) { // 含矿山
if
(
this
.
mine
.
mineType
===
1
)
{
// 地下矿山
//
if (this.mine.mineType === 1) { // 地下矿山
this
.
hasMineUnderground
=
true
//
this.hasMineUnderground = true
}
//
}
if
(
this
.
mine
.
mineType
===
2
)
{
// 露天矿山
//
if (this.mine.mineType === 2) { // 露天矿山
this
.
hasMineOpencast
=
true
//
this.hasMineOpencast = true
}
//
}
if
(
this
.
mine
.
mineType
===
3
)
{
// 尾矿库
//
if (this.mine.mineType === 3) { // 尾矿库
this
.
hasMineTailings
=
true
//
this.hasMineTailings = true
}
//
}
}
else
{
//
} else {
this
.
hasPublic
=
true
//
this.hasPublic = true
}
//
}
}
//
}
},
},
methods
:
{
methods
:
{
checkMine
(
route
)
{
checkMine
(
route
)
{
...
...
src/router/routers.js
View file @
81915e80
...
@@ -15,6 +15,11 @@ export const constantRouterMap = [
...
@@ -15,6 +15,11 @@ export const constantRouterMap = [
component
:
(
resolve
)
=>
require
([
'
@/views/login
'
],
resolve
),
component
:
(
resolve
)
=>
require
([
'
@/views/login
'
],
resolve
),
hidden
:
true
hidden
:
true
},
},
{
path
:
'
/login4Index
'
,
meta
:
{
title
:
'
登录
'
,
noCache
:
true
},
component
:
(
resolve
)
=>
require
([
'
@/views/home4Index
'
],
resolve
),
hidden
:
true
},
{
{
path
:
'
/print
'
,
path
:
'
/print
'
,
meta
:
{
title
:
'
打印
'
,
noCache
:
true
},
meta
:
{
title
:
'
打印
'
,
noCache
:
true
},
...
@@ -46,6 +51,7 @@ export const constantRouterMap = [
...
@@ -46,6 +51,7 @@ export const constantRouterMap = [
path
:
'
/
'
,
path
:
'
/
'
,
component
:
Layout
,
component
:
Layout
,
redirect
:
'
/dashboard
'
,
redirect
:
'
/dashboard
'
,
hidden
:
true
,
children
:
[
children
:
[
{
{
path
:
'
dashboard
'
,
path
:
'
dashboard
'
,
...
...
src/store/modules/api.js
View file @
81915e80
// 适配 Nginx 反向代理
// 适配 Nginx 反向代理
const
baseUrl
=
process
.
env
.
VUE_APP_BASE_API
===
'
/
'
?
''
:
process
.
env
.
VUE_APP_BASE_API
// const baseUrl = process.env.VUE_APP_BASE_API === '/' ? '' : process.env.VUE_APP_BASE_API
const
baseUrl
=
process
.
env
.
VUE_APP_LOCAL_API
===
'
/
'
?
''
:
process
.
env
.
VUE_APP_LOCAL_API
const
api
=
{
const
api
=
{
state
:
{
state
:
{
// 部署包上传
// 部署包上传
...
...
src/utils/request.js
View file @
81915e80
...
@@ -6,7 +6,27 @@ import { getToken } from '@/utils/auth'
...
@@ -6,7 +6,27 @@ import { getToken } from '@/utils/auth'
import
Config
from
'
@/settings
'
import
Config
from
'
@/settings
'
import
Cookies
from
'
js-cookie
'
import
Cookies
from
'
js-cookie
'
/**
* 矿产信息固定值
*/
// localStorage.setItem(
// "kd.selected.mine",
// JSON.stringify({
// address: "测试地址",
// code: "1452562",
// enterpriseId: 1,
// hasEnable: true,
// id: 1,
// latitude: "37.05",
// liablePerson: "人员",
// liablePersonPhone: "15455248718",
// longitude: "117.74",
// mineType: 1,
// name: "测试地下矿山",
// runState: null,
// })
// );
var
baseURL
=
process
.
env
.
NODE_ENV
var
baseURL
=
process
.
env
.
NODE_ENV
===
'
development
'
?
process
.
env
.
VUE_APP_LOCAL_API
+
'
/
'
:
(
process
.
env
.
VUE_APP_LOCAL_API
)
+
'
/
'
;
===
'
development
'
?
process
.
env
.
VUE_APP_LOCAL_API
+
'
/
'
:
(
process
.
env
.
VUE_APP_LOCAL_API
)
+
'
/
'
;
...
...
src/views/home.vue
View file @
81915e80
...
@@ -25,11 +25,12 @@ export default {
...
@@ -25,11 +25,12 @@ export default {
* 真实首页只做中专路由。
* 真实首页只做中专路由。
*/
*/
created
()
{
created
()
{
if
(
this
.
user
.
enterpriseId
===
0
)
{
// 应急局用户
// if (this.user.enterpriseId === 0) { // 应急局用户
this
.
$router
.
replace
(
'
/home4Center
'
)
// this.$router.replace('/home4Center')
}
else
{
// 企业用户
// } else { // 企业用户
this
.
$router
.
replace
(
'
/home4Enterprise
'
)
// this.$router.replace('/home4Enterprise')
}
// }
this
.
$router
.
replace
(
'
/user/center
'
)
}
}
}
}
</
script
>
</
script
>
...
...
src/views/home4Center.vue
View file @
81915e80
...
@@ -270,10 +270,10 @@ export default {
...
@@ -270,10 +270,10 @@ export default {
])
])
},
},
mounted
()
{
mounted
()
{
if
(
this
.
user
.
enterpriseId
!==
0
)
{
// 身份错误
//
if (this.user.enterpriseId !== 0) { // 身份错误
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
return
//
return
}
//
}
this
.
reload1
()
this
.
reload1
()
this
.
reload2
()
this
.
reload2
()
this
.
reload3
()
this
.
reload3
()
...
...
src/views/home4Enterprise.vue
View file @
81915e80
...
@@ -138,6 +138,7 @@ export default {
...
@@ -138,6 +138,7 @@ export default {
const
x
=
this
.
$router
.
resolve
(
'
/home4Mine
'
)
const
x
=
this
.
$router
.
resolve
(
'
/home4Mine
'
)
window
.
open
(
x
.
href
,
'
_self
'
)
window
.
open
(
x
.
href
,
'
_self
'
)
}
else
{
}
else
{
alert
(
mine
)
window
.
localStorage
.
removeItem
(
'
kd.selected.mine
'
)
window
.
localStorage
.
removeItem
(
'
kd.selected.mine
'
)
}
}
// window.location.reload()
// window.location.reload()
...
...
src/views/home4Index.vue
0 → 100644
View file @
81915e80
<
template
>
<div
class=
"login"
:style=
"'background-image:url(' + Background + ');'"
>
<div
class=
"topTitle"
>
<div
class=
"floating-text"
>
中和地信有限公司欢迎您!
</div>
</div>
<div
class=
"bottomTitle"
>
@中和地信有限公司
</div>
<div
class=
"wrapper"
>
<div
class=
"header"
>
<h2
@
click=
"navTo('admin')"
><i
class=
"el-icon-setting"
></i>
管理后台
</h2>
</div>
<div
class=
"title"
>
<h1>
中和地信应急平台
</h1>
</div>
<div
class=
"content"
>
<ul>
<li
v-for=
"(item, index) in dataList"
:key=
"index"
@
click=
"navTo(item.label)"
>
{{
item
.
label
}}
</li>
</ul>
</div>
</div>
</div>
</
template
>
<
script
>
import
qs
from
"
qs
"
;
import
Background
from
"
@/assets/images/background.webp
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
menuApi
from
'
@/api/system/menu.js
'
export
default
{
name
:
"
Login
"
,
data
()
{
return
{
show
:
false
,
userStyle
:
null
,
Background
:
Background
,
codeUrl
:
""
,
cookiePass
:
""
,
loading
:
false
,
redirect
:
undefined
,
dataList
:
[]
};
},
computed
:
{
...
mapGetters
([
"
user
"
]),
},
watch
:
{
$route
:
{
handler
:
function
(
route
)
{
const
data
=
route
.
query
;
if
(
data
&&
data
.
redirect
)
{
this
.
redirect
=
data
.
redirect
;
delete
data
.
redirect
;
if
(
JSON
.
stringify
(
data
)
!==
"
{}
"
)
{
this
.
redirect
=
this
.
redirect
+
"
&
"
+
qs
.
stringify
(
data
,
{
indices
:
false
});
}
}
},
immediate
:
true
,
},
},
created
()
{
// // 按照不同域名加载不同页面样式(企业、应急局),加载完毕后再显示页面
// const host = window.location.host;
// if (host === "yingji.longxijiancai.com") {
// this.userStyle = "应急局";
// }
// if (host === "qiye.longxijiancai.com") {
// this.userStyle = "企业";
// }
menuApi
.
getMenusHome
().
then
((
res
)
=>
{
this
.
dataList
=
res
.
body
})
},
methods
:
{
navTo
(
type
)
{
if
(
type
===
"
admin
"
)
{
// this.$router.push({ path: "home4Center" });
this
.
$router
.
push
({
path
:
"
/user/center
"
});
}
else
if
(
type
===
"
应急管理
"
){
// this.$router.push({ path: "home4Center" });
// this.$router.push({ path: "/user/center" });
location
.
href
=
'
http://192.168.3.226:8057/datav/index.html
'
}
else
if
(
type
===
"
自然资源
"
){
// location.href = process.env.NODE_ENV + ''
location
.
href
=
'
http://192.168.3.226:8057/datav/natural.html
'
}
else
if
(
type
===
"
水利系统
"
){
location
.
href
=
'
http://192.168.3.226:8057/datav/watersource.html
'
}
else
if
(
type
===
"
电子档案馆
"
){
// this.$router.push({ path: "home4Center" });
this
.
$router
.
push
({
path
:
"
/user/center
"
});
}
},
},
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
@keyframes
floatShadow
{
0
%
{
transform
:translateX
(
1300px
)
;
display
:block
;
}
100
%
{
transform
:translateX
(
-1300px
)
;
display
:none
;
}
}
.floating-text
{
font-size
:
18px
;
line-height
:
1
;
color
:
#FDD756
;
text-shadow
:
0
0
5px
#fff
;
animation
:
floatShadow
;
animation-name
:floatShadow
;
animation-duration
:
20s
;
animation-iteration-count
:
infinite
;
animation-timing-function
:linear
;
position
:absolute
;
top
:
8px
;
}
.topTitle
{
position
:
absolute
;
top
:
0
;
background
:
#15181a
73
;
height
:
32px
;
width
:
100%
;
line-height
:
32px
;
color
:
#fff
;
text-align
:
center
;
}
.bottomTitle
{
position
:
absolute
;
bottom
:
0
;
background
:
#021d39
;
height
:
32px
;
width
:
100%
;
line-height
:
32px
;
color
:
#fff
;
text-align
:
center
;
}
.wrapper
{
.header
{
h2
{
color
:
#00346b
;
text-align
:
right
;
position
:
absolute
;
top
:
20px
;
right
:
20px
;
cursor
:
pointer
;
}
}
h1
{
text-align
:
center
;
color
:
#00346b
;
}
ul
{
list-style
:
none
;
width
:
900px
;
overflow
:
hidden
;
}
li
{
float
:
left
;
width
:
400px
;
background
:
#173e67
;
height
:
170px
;
line-height
:
170px
;
text-align
:
center
;
color
:
#fff
;
font-size
:
28px
;
font-weight
:
bold
;
margin
:
10px
;
cursor
:
pointer
;
&
:nth-child
(
1
)
{
background
:
#135965
;
}
&
:nth-child
(
4
)
{
background
:
#135965
;
}
}
}
.login
{
position
:
relative
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
100%
;
background-size
:
cover
;
}
</
style
>
src/views/home4Mine.vue
View file @
81915e80
...
@@ -45,10 +45,10 @@ export default {
...
@@ -45,10 +45,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
},
},
methods
:
{}
methods
:
{}
}
}
...
...
src/views/kd/c/enterprise/index.vue
View file @
81915e80
...
@@ -230,13 +230,13 @@
...
@@ -230,13 +230,13 @@
<!--
<el-table-column
type=
"selection"
width=
"55"
/>
-->
<!--
<el-table-column
type=
"selection"
width=
"55"
/>
-->
<el-table-column
:show-overflow-tooltip=
"true"
label=
"编号"
prop=
"id"
width=
"100px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"编号"
prop=
"id"
width=
"100px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"企业名称"
prop=
"name"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"企业名称"
prop=
"name"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"审核状态"
prop=
"auditState"
align=
"center"
>
<
!--
<
el-table-column
:show-overflow-tooltip=
"true"
label=
"审核状态"
prop=
"auditState"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
v-for=
"e in enterpriseApi.auditStates()"
:key=
"e.key"
>
<span
v-for=
"e in enterpriseApi.auditStates()"
:key=
"e.key"
>
<span
v-if=
"e.key==scope.row.auditState"
>
{{
e
.
value
}}
</span>
<span
v-if=
"e.key==scope.row.auditState"
>
{{
e
.
value
}}
</span>
</span>
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
-->
<el-table-column
:show-overflow-tooltip=
"true"
label=
"统一社会信用代码"
prop=
"idCode"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"统一社会信用代码"
prop=
"idCode"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"成立日期"
prop=
"setupDate"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"成立日期"
prop=
"setupDate"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"公司地址"
prop=
"address"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"公司地址"
prop=
"address"
align=
"center"
/>
...
@@ -259,8 +259,8 @@
...
@@ -259,8 +259,8 @@
<el-table-column
label=
"操作"
width=
"200px"
align=
"center"
fixed=
"right"
>
<el-table-column
label=
"操作"
width=
"200px"
align=
"center"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
v-show=
"scope.row.auditState!=1"
size=
"mini"
round
@
click=
"showEnterpriseInfo(scope.row.id)"
>
查看详情
</el-button>
<el-button
v-show=
"scope.row.auditState!=1"
size=
"mini"
round
@
click=
"showEnterpriseInfo(scope.row.id)"
>
查看详情
</el-button>
<el-button
v-show=
"scope.row.auditState==1"
size=
"mini"
round
@
click=
"auditBtn(scope.row, 2)"
>
通过
</el-button>
<
!--
<
el-button
v-show=
"scope.row.auditState==1"
size=
"mini"
round
@
click=
"auditBtn(scope.row, 2)"
>
通过
</el-button>
<el-button
v-show=
"scope.row.auditState==1"
size=
"mini"
round
@
click=
"auditBtn(scope.row, 3)"
>
不通过
</el-button>
<el-button
v-show=
"scope.row.auditState==1"
size=
"mini"
round
@
click=
"auditBtn(scope.row, 3)"
>
不通过
</el-button>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
src/views/kd/e/dangerousWork.vue
View file @
81915e80
...
@@ -347,10 +347,10 @@ export default {
...
@@ -347,10 +347,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/emergency/drill.vue
View file @
81915e80
...
@@ -237,10 +237,10 @@ export default {
...
@@ -237,10 +237,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
// 字典选项卡
// 字典选项卡
const
dictGroups
=
[
35
,
36
]
const
dictGroups
=
[
35
,
36
]
dictGroups
.
forEach
(
i
=>
{
dictGroups
.
forEach
(
i
=>
{
...
...
src/views/kd/e/emergency/plan.vue
View file @
81915e80
...
@@ -230,10 +230,10 @@ export default {
...
@@ -230,10 +230,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
// 字典选项卡
// 字典选项卡
const
dictGroups
=
[
35
,
36
]
const
dictGroups
=
[
35
,
36
]
dictGroups
.
forEach
(
i
=>
{
dictGroups
.
forEach
(
i
=>
{
...
...
src/views/kd/e/emergency/supplies.vue
View file @
81915e80
...
@@ -295,10 +295,10 @@ export default {
...
@@ -295,10 +295,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
// 字典选项卡
// 字典选项卡
const
dictGroups
=
[
37
,
38
,
39
]
const
dictGroups
=
[
37
,
38
,
39
]
dictGroups
.
forEach
(
i
=>
{
dictGroups
.
forEach
(
i
=>
{
...
...
src/views/kd/e/emergency/team.vue
View file @
81915e80
...
@@ -188,10 +188,10 @@ export default {
...
@@ -188,10 +188,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
// 字典选项卡
// 字典选项卡
const
dictGroups
=
[
34
]
const
dictGroups
=
[
34
]
dictGroups
.
forEach
(
i
=>
{
dictGroups
.
forEach
(
i
=>
{
...
...
src/views/kd/e/iot/environment/machine.vue
View file @
81915e80
...
@@ -338,10 +338,10 @@ export default {
...
@@ -338,10 +338,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine)
{
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
}
,
}
,
...
...
src/views/kd/e/iot/groundPressure/machine.vue
View file @
81915e80
...
@@ -264,10 +264,10 @@ export default {
...
@@ -264,10 +264,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine)
{
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
}
,
}
,
...
...
src/views/kd/e/iot/hc/hcMonitor.vue
View file @
81915e80
...
@@ -184,10 +184,10 @@ export default {
...
@@ -184,10 +184,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/iot/person/area.vue
View file @
81915e80
...
@@ -210,10 +210,10 @@ export default {
...
@@ -210,10 +210,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/iot/person/baseStation.vue
View file @
81915e80
...
@@ -257,10 +257,10 @@ export default {
...
@@ -257,10 +257,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/iot/person/card.vue
View file @
81915e80
...
@@ -186,10 +186,10 @@ export default {
...
@@ -186,10 +186,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/iot/person/underfloorPlan.vue
View file @
81915e80
...
@@ -69,10 +69,10 @@ export default {
...
@@ -69,10 +69,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
methods
:
{
methods
:
{
...
...
src/views/kd/e/iot/tailings/machine.vue
View file @
81915e80
...
@@ -271,10 +271,10 @@ export default {
...
@@ -271,10 +271,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine)
{
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
}
,
}
,
...
...
src/views/kd/e/leader/classes.vue
View file @
81915e80
...
@@ -170,10 +170,10 @@ export default {
...
@@ -170,10 +170,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/leader/log.vue
View file @
81915e80
...
@@ -76,10 +76,10 @@ export default {
...
@@ -76,10 +76,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/leader/scheduling.vue
View file @
81915e80
...
@@ -267,10 +267,10 @@ export default {
...
@@ -267,10 +267,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/notice/index.vue
View file @
81915e80
...
@@ -127,10 +127,10 @@ export default {
...
@@ -127,10 +127,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
// 字典
// 字典
const
dictGroups
=
[
40
]
const
dictGroups
=
[
40
]
dictGroups
.
forEach
(
i
=>
{
dictGroups
.
forEach
(
i
=>
{
...
...
src/views/kd/e/noticeMix.vue
View file @
81915e80
...
@@ -127,10 +127,10 @@ export default {
...
@@ -127,10 +127,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
// 字典
// 字典
const
dictGroups
=
[
40
]
const
dictGroups
=
[
40
]
dictGroups
.
forEach
(
i
=>
{
dictGroups
.
forEach
(
i
=>
{
...
...
src/views/kd/e/staff/department.vue
View file @
81915e80
...
@@ -138,10 +138,10 @@ export default {
...
@@ -138,10 +138,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/staff/job.vue
View file @
81915e80
...
@@ -125,10 +125,10 @@ export default {
...
@@ -125,10 +125,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/staff/special.vue
View file @
81915e80
...
@@ -251,10 +251,10 @@ export default {
...
@@ -251,10 +251,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/staff/staff.vue
View file @
81915e80
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<el-button
class=
"filter-item"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"doAdd()"
>
新增
</el-button>
<el-button
class=
"filter-item"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"doAdd()"
>
新增
</el-button>
<el-upload
<el-upload
class=
"filter-item"
class=
"filter-item"
action=
"/api/staff/import
"
:action=
"`$
{previewUrl}/api/staff/import`
"
multiple
multiple
:data="{mineType:selectedMine.mineType,mineId:selectedMine.id}"
:data="{mineType:selectedMine.mineType,mineId:selectedMine.id}"
:headers="httpHeaders"
:headers="httpHeaders"
...
@@ -167,7 +167,7 @@
...
@@ -167,7 +167,7 @@
<el-upload
<el-upload
v-show=
"dialog1Editing"
v-show=
"dialog1Editing"
class=
"upload-demo"
class=
"upload-demo"
action=
"/api/file/upload
"
:action=
"`$
{previewUrl}/api/file/upload`
"
multiple
multiple
:headers="httpHeaders"
:headers="httpHeaders"
:limit="1"
:limit="1"
...
@@ -295,6 +295,7 @@ export default {
...
@@ -295,6 +295,7 @@ export default {
components
:
{
},
components
:
{
},
data
()
{
data
()
{
return
{
return
{
previewUrl
:
process
.
env
.
VUE_APP_LOCAL_API
,
selectedMine
:
{},
selectedMine
:
{},
httpHeaders
:
{
httpHeaders
:
{
'
Authorization
'
:
getToken
()
'
Authorization
'
:
getToken
()
...
@@ -359,22 +360,22 @@ export default {
...
@@ -359,22 +360,22 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
const
selectedMineJson
=
window
.
localStorage
.
getItem
(
'
kd.selected.mine
'
)
//
const selectedMineJson = window.localStorage.getItem('kd.selected.mine')
let
noMine
=
false
//
let noMine = false
if
(
!
selectedMineJson
)
{
//
if (!selectedMineJson) {
noMine
=
true
//
noMine = true
}
else
{
//
} else {
const
selectedMine
=
JSON
.
parse
(
selectedMineJson
)
//
const selectedMine = JSON.parse(selectedMineJson)
if
(
!
selectedMine
||
selectedMine
.
enterpriseId
!==
this
.
user
.
enterpriseId
)
{
//
if (!selectedMine || selectedMine.enterpriseId !== this.user.enterpriseId) {
noMine
=
true
//
noMine = true
}
else
{
//
} else {
this
.
selectedMine
=
selectedMine
//
this.selectedMine = selectedMine
}
//
}
}
//
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/video/videoAi.vue
View file @
81915e80
...
@@ -96,10 +96,10 @@ export default {
...
@@ -96,10 +96,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/kd/e/video/videoLive.vue
View file @
81915e80
...
@@ -133,10 +133,10 @@ export default {
...
@@ -133,10 +133,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
videoApi
.
getLink
({
videoApi
.
getLink
({
mineType
:
this
.
selectedMine
.
mineType
,
mineType
:
this
.
selectedMine
.
mineType
,
mineId
:
this
.
selectedMine
.
id
mineId
:
this
.
selectedMine
.
id
...
...
src/views/kd/e/video/videoWvp.vue
View file @
81915e80
...
@@ -22,10 +22,10 @@ export default {
...
@@ -22,10 +22,10 @@ export default {
this
.
selectedMine
=
selectedMine
this
.
selectedMine
=
selectedMine
}
}
}
}
if
(
noMine
)
{
//
if (noMine) {
this
.
$message
.
error
(
'
当前未选择矿山
'
)
//
this.$message.error('当前未选择矿山')
this
.
$router
.
replace
(
'
/dashboard
'
)
//
this.$router.replace('/dashboard')
}
//
}
this
.
searchParamReset
()
this
.
searchParamReset
()
this
.
searchSubmit
()
this
.
searchSubmit
()
},
},
...
...
src/views/login.vue
View file @
81915e80
...
@@ -34,13 +34,13 @@
...
@@ -34,13 +34,13 @@
<span
v-else
>
登 录 中...
</span>
<span
v-else
>
登 录 中...
</span>
</el-button>
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
v-show=
"userStyle!='应急局'"
style=
"width:100%;"
>
<
!--
<
el-form-item
v-show=
"userStyle!='应急局'"
style=
"width:100%;"
>
<router-link
:to=
"
{path: '/enterpriseApply'}">
<router-link
:to=
"
{path: '/enterpriseApply'}">
<el-button
size=
"medium"
style=
"width:100%;"
>
<el-button
size=
"medium"
style=
"width:100%;"
>
<span>
企 业 注 册
</span>
<span>
企 业 注 册
</span>
</el-button>
</el-button>
</router-link>
</router-link>
</el-form-item>
</el-form-item>
-->
</el-form>
</el-form>
<!-- 底部 -->
<!-- 底部 -->
<div
v-if=
"$store.state.settings.showFooter"
id=
"el-login-footer"
>
<div
v-if=
"$store.state.settings.showFooter"
id=
"el-login-footer"
>
...
@@ -187,7 +187,8 @@ export default {
...
@@ -187,7 +187,8 @@ export default {
return
return
}
}
}
}
this
.
$router
.
push
({
path
:
/* 记住上次退出时的页面 */
/* this.redirect || */
'
/home4Login
'
})
// this.$router.push({ path: /* 记住上次退出时的页面 */ /* this.redirect || */'/home4Login' })
this
.
$router
.
push
({
path
:
'
login4Index
'
})
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
this
.
getCode
()
this
.
getCode
()
...
...
src/views/newResource/displace/data.vue
0 → 100644
View file @
81915e80
<
template
>
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<div>
<el-input
v-model=
"equipname"
clearable
size=
"small"
placeholder=
"测点名称"
style=
"width: 200px"
class=
"filter-item"
/>
<date-range-picker
v-model=
"datarealtime"
class=
"date-item"
/>
<el-button
class=
"filter-item"
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"search"
>
搜索
</el-button
>
<el-button
class=
"filter-item"
size=
"mini"
type=
"warning"
icon=
"el-icon-refresh-left"
@
click=
"clearSearch"
>
重置
</el-button
>
</div>
</div>
<!--表格-->
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"tableData"
row-key=
"id"
>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"sensorid"
label=
"站点编号"
width=
"130px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"sensorname"
label=
"测站名称"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"dispx"
label=
"X变化量"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"dispy"
label=
"Y变化量"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"disph"
label=
"Z变化量"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"time"
label=
"监测时间"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
:current-page.sync=
"page"
:page-size.sync=
"size"
:total=
"totalElement"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</
template
>
<
script
>
import
API
from
"
@/api/newResource/data.js
"
;
import
{
getToken
}
from
"
@/utils/auth
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
DateRangePicker
from
'
@/components/DateRangePicker
'
export
default
{
name
:
"
newResourceDisplaceMachine
"
,
// 本页面名
data
()
{
return
{
equipname
:
''
,
datarealtime
:
''
,
loading
:
false
,
tableData
:
[],
// 总的个数
totalElement
:
0
,
// 当前页的条数
size
:
10
,
// 当前页码
page
:
1
,
};
},
components
:
{
DateRangePicker
},
mounted
()
{
this
.
search
()
},
methods
:
{
getData
()
{
this
.
loading
=
true
;
API
.
getDataList
({
page
:
this
.
page
,
size
:
this
.
size
,
time
:
this
.
datarealtime
&&
this
.
datarealtime
.
join
(
'
,
'
)
||
''
,
sensorname
:
this
.
equipname
,
})
.
then
((
response
)
=>
{
this
.
loading
=
false
;
this
.
tableData
=
response
.
body
.
list
;
this
.
totalElement
=
response
.
body
.
total
;
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
// 模糊搜索
search
()
{
this
.
getData
();
},
clearSearch
()
{
this
.
equipname
=
''
this
.
datarealtime
=
''
this
.
size
=
10
;
this
.
page
=
0
;
this
.
getData
();
},
// 当前页的条数变化
handleSizeChange
(
val
)
{
this
.
size
=
val
;
this
.
getData
();
},
// 当前第几页
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
},
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
::v-deep
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
::v-deep
.vue-treeselect__control
,
::v-deep
.vue-treeselect__placeholder
,
::v-deep
.vue-treeselect__single-value
{
height
:
30px
;
line-height
:
30px
;
}
</
style
>
src/views/newResource/displace/machine.vue
0 → 100644
View file @
81915e80
<
template
>
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<div>
<el-input
v-model=
"equipname"
clearable
size=
"small"
placeholder=
"测点名称"
style=
"width: 200px"
class=
"filter-item"
/>
<date-range-picker
v-model=
"datarealtime"
class=
"date-item"
/>
<el-button
class=
"filter-item"
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"search"
>
搜索
</el-button
>
<el-button
class=
"filter-item"
size=
"mini"
type=
"warning"
icon=
"el-icon-refresh-left"
@
click=
"clearSearch"
>
重置
</el-button
>
</div>
</div>
<!--表格-->
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"tableData"
row-key=
"id"
>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"equipno"
label=
"站点编号"
width=
"130px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"equipname"
label=
"测站名称"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"online"
label=
"设备状态"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"datarealtime"
label=
"监测时间"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
:current-page.sync=
"page"
:page-size.sync=
"size"
:total=
"totalElement"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</
template
>
<
script
>
import
API
from
"
@/api/newResource/machine.js
"
;
import
{
getToken
}
from
"
@/utils/auth
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
DateRangePicker
from
'
@/components/DateRangePicker
'
export
default
{
name
:
"
newResourceDisplaceMachine
"
,
// 本页面名
data
()
{
return
{
equipname
:
''
,
datarealtime
:
''
,
loading
:
false
,
tableData
:
[],
// 总的个数
totalElement
:
0
,
// 当前页的条数
size
:
10
,
// 当前页码
page
:
1
,
};
},
components
:
{
DateRangePicker
},
mounted
()
{
this
.
search
()
},
methods
:
{
getData
()
{
this
.
loading
=
true
;
API
.
getDataList
({
page
:
this
.
page
,
size
:
this
.
size
,
datarealtime
:
this
.
datarealtime
&&
this
.
datarealtime
.
join
(
'
,
'
)
||
''
,
equipname
:
this
.
equipname
,
deviceType
:
'
3
'
})
.
then
((
response
)
=>
{
this
.
loading
=
false
;
this
.
tableData
=
response
.
body
.
list
;
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
// 模糊搜索
search
()
{
this
.
getData
();
},
clearSearch
()
{
this
.
equipname
=
''
this
.
datarealtime
=
''
this
.
size
=
10
;
this
.
page
=
0
;
this
.
getData
();
},
// 当前页的条数变化
handleSizeChange
(
val
)
{
this
.
size
=
val
;
this
.
getData
();
},
// 当前第几页
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
},
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
::v-deep
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
::v-deep
.vue-treeselect__control
,
::v-deep
.vue-treeselect__placeholder
,
::v-deep
.vue-treeselect__single-value
{
height
:
30px
;
line-height
:
30px
;
}
</
style
>
src/views/newResource/temperature/data.vue
0 → 100644
View file @
81915e80
<
template
>
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<div>
<el-input
v-model=
"equipname"
clearable
size=
"small"
placeholder=
"测点名称"
style=
"width: 200px"
class=
"filter-item"
/>
<date-range-picker
v-model=
"datarealtime"
class=
"date-item"
/>
<el-button
class=
"filter-item"
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"search"
>
搜索
</el-button
>
<el-button
class=
"filter-item"
size=
"mini"
type=
"warning"
icon=
"el-icon-refresh-left"
@
click=
"clearSearch"
>
重置
</el-button
>
</div>
</div>
<!--表格-->
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"tableData"
row-key=
"id"
>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"sensorid"
label=
"站点编号"
width=
"130px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"sensorname"
label=
"测站名称"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"svalue"
label=
"温度"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"time"
label=
"监测时间"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
:current-page.sync=
"page"
:page-size.sync=
"size"
:total=
"totalElement"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</
template
>
<
script
>
import
API
from
"
@/api/newResource/data.js
"
;
import
DateRangePicker
from
'
@/components/DateRangePicker
'
export
default
{
name
:
"
newResourceDisplaceMachine
"
,
// 本页面名
data
()
{
return
{
equipname
:
''
,
datarealtime
:
''
,
loading
:
false
,
tableData
:
[],
// 总的个数
totalElement
:
0
,
// 当前页的条数
size
:
10
,
// 当前页码
page
:
1
,
};
},
components
:
{
DateRangePicker
},
mounted
()
{
this
.
search
()
},
methods
:
{
getData
()
{
this
.
loading
=
true
;
API
.
getDataList4windSpeed
({
page
:
this
.
page
,
size
:
this
.
size
,
time
:
this
.
datarealtime
&&
this
.
datarealtime
.
join
(
'
,
'
)
||
''
,
sensorname
:
this
.
equipname
,
different
:
'
温度
'
})
.
then
((
response
)
=>
{
this
.
loading
=
false
;
this
.
tableData
=
response
.
body
.
list
;
this
.
totalElement
=
response
.
body
.
total
;
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
// 模糊搜索
search
()
{
this
.
getData
();
},
clearSearch
()
{
this
.
equipname
=
''
this
.
datarealtime
=
''
this
.
size
=
10
;
this
.
page
=
0
;
this
.
getData
();
},
// 当前页的条数变化
handleSizeChange
(
val
)
{
this
.
size
=
val
;
this
.
getData
();
},
// 当前第几页
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
},
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
::v-deep
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
::v-deep
.vue-treeselect__control
,
::v-deep
.vue-treeselect__placeholder
,
::v-deep
.vue-treeselect__single-value
{
height
:
30px
;
line-height
:
30px
;
}
</
style
>
src/views/newResource/temperature/machine.vue
0 → 100644
View file @
81915e80
<
template
>
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<div>
<el-input
v-model=
"equipname"
clearable
size=
"small"
placeholder=
"测点名称"
style=
"width: 200px"
class=
"filter-item"
/>
<date-range-picker
v-model=
"datarealtime"
class=
"date-item"
/>
<el-button
class=
"filter-item"
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"search"
>
搜索
</el-button
>
<el-button
class=
"filter-item"
size=
"mini"
type=
"warning"
icon=
"el-icon-refresh-left"
@
click=
"clearSearch"
>
重置
</el-button
>
</div>
</div>
<!--表格-->
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"tableData"
row-key=
"id"
>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"equipno"
label=
"站点编号"
width=
"130px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"equipname"
label=
"测站名称"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"online"
label=
"设备状态"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"datarealtime"
label=
"监测时间"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
:current-page.sync=
"page"
:page-size.sync=
"size"
:total=
"totalElement"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</
template
>
<
script
>
import
API
from
"
@/api/newResource/machine.js
"
;
import
{
getToken
}
from
"
@/utils/auth
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
DateRangePicker
from
'
@/components/DateRangePicker
'
export
default
{
name
:
"
newResourceDisplaceMachine
"
,
// 本页面名
data
()
{
return
{
equipname
:
''
,
datarealtime
:
''
,
loading
:
false
,
tableData
:
[],
// 总的个数
totalElement
:
0
,
// 当前页的条数
size
:
10
,
// 当前页码
page
:
1
,
};
},
components
:
{
DateRangePicker
},
mounted
()
{
this
.
search
()
},
methods
:
{
getData
()
{
this
.
loading
=
true
;
API
.
getDataList
({
page
:
this
.
page
,
size
:
this
.
size
,
datarealtime
:
this
.
datarealtime
&&
this
.
datarealtime
.
join
(
'
,
'
)
||
''
,
equipname
:
this
.
equipname
,
deviceType
:
'
8
'
,
different
:
'
温度
'
})
.
then
((
response
)
=>
{
this
.
loading
=
false
;
this
.
tableData
=
response
.
body
.
list
;
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
// 模糊搜索
search
()
{
this
.
getData
();
},
clearSearch
()
{
this
.
equipname
=
''
this
.
datarealtime
=
''
this
.
size
=
10
;
this
.
page
=
0
;
this
.
getData
();
},
// 当前页的条数变化
handleSizeChange
(
val
)
{
this
.
size
=
val
;
this
.
getData
();
},
// 当前第几页
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
},
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
::v-deep
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
::v-deep
.vue-treeselect__control
,
::v-deep
.vue-treeselect__placeholder
,
::v-deep
.vue-treeselect__single-value
{
height
:
30px
;
line-height
:
30px
;
}
</
style
>
src/views/newResource/windspeed/data.vue
0 → 100644
View file @
81915e80
<
template
>
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<div>
<el-input
v-model=
"equipname"
clearable
size=
"small"
placeholder=
"测点名称"
style=
"width: 200px"
class=
"filter-item"
/>
<date-range-picker
v-model=
"datarealtime"
class=
"date-item"
/>
<el-button
class=
"filter-item"
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"search"
>
搜索
</el-button
>
<el-button
class=
"filter-item"
size=
"mini"
type=
"warning"
icon=
"el-icon-refresh-left"
@
click=
"clearSearch"
>
重置
</el-button
>
</div>
</div>
<!--表格-->
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"tableData"
row-key=
"id"
>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"sensorid"
label=
"站点编号"
width=
"130px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"sensorname"
label=
"测站名称"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"svalue"
label=
"风速"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"time"
label=
"监测时间"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
:current-page.sync=
"page"
:page-size.sync=
"size"
:total=
"totalElement"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</
template
>
<
script
>
import
API
from
"
@/api/newResource/data.js
"
;
import
DateRangePicker
from
'
@/components/DateRangePicker
'
export
default
{
name
:
"
newResourceDisplaceMachine
"
,
// 本页面名
data
()
{
return
{
equipname
:
''
,
datarealtime
:
''
,
loading
:
false
,
tableData
:
[],
// 总的个数
totalElement
:
0
,
// 当前页的条数
size
:
10
,
// 当前页码
page
:
1
,
};
},
components
:
{
DateRangePicker
},
mounted
()
{
this
.
search
()
},
methods
:
{
getData
()
{
this
.
loading
=
true
;
API
.
getDataList4windSpeed
({
page
:
this
.
page
,
size
:
this
.
size
,
time
:
this
.
datarealtime
&&
this
.
datarealtime
.
join
(
'
,
'
)
||
''
,
sensorname
:
this
.
equipname
,
different
:
'
风速
'
})
.
then
((
response
)
=>
{
this
.
loading
=
false
;
this
.
tableData
=
response
.
body
.
list
;
this
.
totalElement
=
response
.
body
.
total
;
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
// 模糊搜索
search
()
{
this
.
getData
();
},
clearSearch
()
{
this
.
equipname
=
''
this
.
datarealtime
=
''
this
.
size
=
10
;
this
.
page
=
0
;
this
.
getData
();
},
// 当前页的条数变化
handleSizeChange
(
val
)
{
this
.
size
=
val
;
this
.
getData
();
},
// 当前第几页
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
},
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
::v-deep
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
::v-deep
.vue-treeselect__control
,
::v-deep
.vue-treeselect__placeholder
,
::v-deep
.vue-treeselect__single-value
{
height
:
30px
;
line-height
:
30px
;
}
</
style
>
src/views/newResource/windspeed/machine.vue
0 → 100644
View file @
81915e80
<
template
>
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<div>
<el-input
v-model=
"equipname"
clearable
size=
"small"
placeholder=
"测点名称"
style=
"width: 200px"
class=
"filter-item"
/>
<date-range-picker
v-model=
"datarealtime"
class=
"date-item"
/>
<el-button
class=
"filter-item"
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"search"
>
搜索
</el-button
>
<el-button
class=
"filter-item"
size=
"mini"
type=
"warning"
icon=
"el-icon-refresh-left"
@
click=
"clearSearch"
>
重置
</el-button
>
</div>
</div>
<!--表格-->
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"tableData"
row-key=
"id"
>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"equipno"
label=
"站点编号"
width=
"130px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"equipname"
label=
"测站名称"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"online"
label=
"设备状态"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"datarealtime"
label=
"监测时间"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
:current-page.sync=
"page"
:page-size.sync=
"size"
:total=
"totalElement"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</
template
>
<
script
>
import
API
from
"
@/api/newResource/machine.js
"
;
import
{
getToken
}
from
"
@/utils/auth
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
DateRangePicker
from
'
@/components/DateRangePicker
'
export
default
{
name
:
"
newResourceDisplaceMachine
"
,
// 本页面名
data
()
{
return
{
equipname
:
''
,
datarealtime
:
''
,
loading
:
false
,
tableData
:
[],
// 总的个数
totalElement
:
0
,
// 当前页的条数
size
:
10
,
// 当前页码
page
:
1
,
};
},
components
:
{
DateRangePicker
},
mounted
()
{
this
.
search
()
},
methods
:
{
getData
()
{
this
.
loading
=
true
;
API
.
getDataList
({
page
:
this
.
page
,
size
:
this
.
size
,
datarealtime
:
this
.
datarealtime
&&
this
.
datarealtime
.
join
(
'
,
'
)
||
''
,
equipname
:
this
.
equipname
,
deviceType
:
'
8
'
,
different
:
'
风速
'
})
.
then
((
response
)
=>
{
this
.
loading
=
false
;
this
.
tableData
=
response
.
body
.
list
;
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
// 模糊搜索
search
()
{
this
.
getData
();
},
clearSearch
()
{
this
.
equipname
=
''
this
.
datarealtime
=
''
this
.
size
=
10
;
this
.
page
=
0
;
this
.
getData
();
},
// 当前页的条数变化
handleSizeChange
(
val
)
{
this
.
size
=
val
;
this
.
getData
();
},
// 当前第几页
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
},
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
::v-deep
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
::v-deep
.vue-treeselect__control
,
::v-deep
.vue-treeselect__placeholder
,
::v-deep
.vue-treeselect__single-value
{
height
:
30px
;
line-height
:
30px
;
}
</
style
>
src/views/newWater/precipitation/data.vue
0 → 100644
View file @
81915e80
<
template
>
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<div>
<el-input
v-model=
"equipname"
clearable
size=
"small"
placeholder=
"测点名称"
style=
"width: 200px"
class=
"filter-item"
/>
<date-range-picker
v-model=
"datarealtime"
class=
"date-item"
/>
<el-button
class=
"filter-item"
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"search"
>
搜索
</el-button
>
<el-button
class=
"filter-item"
size=
"mini"
type=
"warning"
icon=
"el-icon-refresh-left"
@
click=
"clearSearch"
>
重置
</el-button
>
</div>
</div>
<!--表格-->
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"tableData"
row-key=
"id"
>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"sensorid"
label=
"站点编号"
width=
"130px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"sensorname"
label=
"测站名称"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"rainfall"
label=
"实时雨量"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"zongliang"
label=
"累计雨量"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"time"
label=
"监测时间"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
:current-page.sync=
"page"
:page-size.sync=
"size"
:total=
"totalElement"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</
template
>
<
script
>
import
API
from
"
@/api/newResource/data.js
"
;
import
DateRangePicker
from
'
@/components/DateRangePicker
'
export
default
{
name
:
"
waterPrecipitation
"
,
// 本页面名
data
()
{
return
{
equipname
:
''
,
datarealtime
:
''
,
loading
:
false
,
tableData
:
[],
// 总的个数
totalElement
:
0
,
// 当前页的条数
size
:
10
,
// 当前页码
page
:
1
,
};
},
components
:
{
DateRangePicker
},
mounted
()
{
this
.
search
()
},
methods
:
{
getData
()
{
this
.
loading
=
true
;
API
.
getDataList4waterPrecipitation
({
page
:
this
.
page
,
size
:
this
.
size
,
time
:
this
.
datarealtime
&&
this
.
datarealtime
.
join
(
'
,
'
)
||
''
,
sensorname
:
this
.
equipname
,
different
:
'
温度
'
})
.
then
((
response
)
=>
{
this
.
loading
=
false
;
this
.
tableData
=
response
.
body
.
list
;
this
.
totalElement
=
response
.
body
.
total
;
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
// 模糊搜索
search
()
{
this
.
getData
();
},
clearSearch
()
{
this
.
equipname
=
''
this
.
datarealtime
=
''
this
.
size
=
10
;
this
.
page
=
0
;
this
.
getData
();
},
// 当前页的条数变化
handleSizeChange
(
val
)
{
this
.
size
=
val
;
this
.
getData
();
},
// 当前第几页
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
},
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
::v-deep
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
::v-deep
.vue-treeselect__control
,
::v-deep
.vue-treeselect__placeholder
,
::v-deep
.vue-treeselect__single-value
{
height
:
30px
;
line-height
:
30px
;
}
</
style
>
src/views/newWater/precipitation/machine.vue
0 → 100644
View file @
81915e80
<
template
>
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<div>
<el-input
v-model=
"equipname"
clearable
size=
"small"
placeholder=
"测点名称"
style=
"width: 200px"
class=
"filter-item"
/>
<date-range-picker
v-model=
"datarealtime"
class=
"date-item"
/>
<el-button
class=
"filter-item"
size=
"mini"
type=
"success"
icon=
"el-icon-search"
@
click=
"search"
>
搜索
</el-button
>
<el-button
class=
"filter-item"
size=
"mini"
type=
"warning"
icon=
"el-icon-refresh-left"
@
click=
"clearSearch"
>
重置
</el-button
>
</div>
</div>
<!--表格-->
<el-table
ref=
"table"
v-loading=
"loading"
:data=
"tableData"
row-key=
"id"
>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"equipno"
label=
"站点编号"
width=
"130px"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"equipname"
label=
"测站名称"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"online"
label=
"设备状态"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"datarealtime"
label=
"监测时间"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
:current-page.sync=
"page"
:page-size.sync=
"size"
:total=
"totalElement"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</
template
>
<
script
>
import
API
from
"
@/api/newResource/machine.js
"
;
import
{
getToken
}
from
"
@/utils/auth
"
;
import
{
mapGetters
}
from
"
vuex
"
;
import
DateRangePicker
from
'
@/components/DateRangePicker
'
export
default
{
name
:
"
newResourceDisplaceMachine
"
,
// 本页面名
data
()
{
return
{
equipname
:
''
,
datarealtime
:
''
,
loading
:
false
,
tableData
:
[],
// 总的个数
totalElement
:
0
,
// 当前页的条数
size
:
10
,
// 当前页码
page
:
1
,
};
},
components
:
{
DateRangePicker
},
mounted
()
{
this
.
search
()
},
methods
:
{
getData
()
{
this
.
loading
=
true
;
API
.
getDataList
({
page
:
this
.
page
,
size
:
this
.
size
,
datarealtime
:
this
.
datarealtime
&&
this
.
datarealtime
.
join
(
'
,
'
)
||
''
,
equipname
:
this
.
equipname
,
deviceType
:
'
6
'
,
})
.
then
((
response
)
=>
{
this
.
loading
=
false
;
this
.
tableData
=
response
.
body
.
list
;
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
// 模糊搜索
search
()
{
this
.
getData
();
},
clearSearch
()
{
this
.
equipname
=
''
this
.
datarealtime
=
''
this
.
size
=
10
;
this
.
page
=
0
;
this
.
getData
();
},
// 当前页的条数变化
handleSizeChange
(
val
)
{
this
.
size
=
val
;
this
.
getData
();
},
// 当前第几页
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
},
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
::v-deep
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
::v-deep
.vue-treeselect__control
,
::v-deep
.vue-treeselect__placeholder
,
::v-deep
.vue-treeselect__single-value
{
height
:
30px
;
line-height
:
30px
;
}
</
style
>
src/views/system/dept/index.vue
View file @
81915e80
...
@@ -106,6 +106,7 @@ import udOperation from '@crud/UD.operation'
...
@@ -106,6 +106,7 @@ import udOperation from '@crud/UD.operation'
import
DateRangePicker
from
'
@/components/DateRangePicker
'
import
DateRangePicker
from
'
@/components/DateRangePicker
'
const
defaultForm
=
{
id
:
null
,
name
:
null
,
isTop
:
'
1
'
,
subCount
:
0
,
pid
:
null
,
deptSort
:
999
,
enabled
:
'
true
'
}
const
defaultForm
=
{
id
:
null
,
name
:
null
,
isTop
:
'
1
'
,
subCount
:
0
,
pid
:
null
,
deptSort
:
999
,
enabled
:
'
true
'
}
export
default
{
export
default
{
name
:
'
Dept
'
,
name
:
'
Dept
'
,
components
:
{
Treeselect
,
crudOperation
,
rrOperation
,
udOperation
,
DateRangePicker
},
components
:
{
Treeselect
,
crudOperation
,
rrOperation
,
udOperation
,
DateRangePicker
},
...
...
src/views/system/menu/index.vue
View file @
81915e80
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
placeholder=
"选择上级类目"
placeholder=
"选择上级类目"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"权限类"
prop=
"type"
>
<
!--
<
el-form-item
label=
"权限类"
prop=
"type"
>
<el-radio-group
v-model=
"form.enterpriseType"
size=
"mini"
style=
"width: 178px"
>
<el-radio-group
v-model=
"form.enterpriseType"
size=
"mini"
style=
"width: 178px"
>
<el-radio-button
label=
"0"
>
应急局
</el-radio-button>
<el-radio-button
label=
"0"
>
应急局
</el-radio-button>
<el-radio-button
label=
"1"
>
企业
</el-radio-button>
<el-radio-button
label=
"1"
>
企业
</el-radio-button>
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
<el-checkbox
v-model=
"form.hasMineUnderground"
>
地下矿山
</el-checkbox>
<el-checkbox
v-model=
"form.hasMineUnderground"
>
地下矿山
</el-checkbox>
<el-checkbox
v-model=
"form.hasMineOpencast"
>
露天矿山
</el-checkbox>
<el-checkbox
v-model=
"form.hasMineOpencast"
>
露天矿山
</el-checkbox>
<el-checkbox
v-model=
"form.hasMineTailings"
>
尾矿库
</el-checkbox>
<el-checkbox
v-model=
"form.hasMineTailings"
>
尾矿库
</el-checkbox>
</el-form-item>
</el-form-item>
-->
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"crud.cancelCU"
>
取消
</el-button>
<el-button
type=
"text"
@
click=
"crud.cancelCU"
>
取消
</el-button>
...
@@ -133,12 +133,12 @@
...
@@ -133,12 +133,12 @@
<svg-icon
:icon-class=
"scope.row.icon ? scope.row.icon : ''"
/>
{{
scope
.
row
.
title
}}
<svg-icon
:icon-class=
"scope.row.icon ? scope.row.icon : ''"
/>
{{
scope
.
row
.
title
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"enterpriseType"
label=
"权限类"
align=
"center"
width=
"60px"
:show-overflow-tooltip=
"true"
>
<
!-- <
el-table-column prop="enterpriseType" label="权限类" align="center" width="60px" :show-overflow-tooltip="true">
<template slot-scope="scope">
<template slot-scope="scope">
<span v-if="scope.row.enterpriseType==0">应急局</span>
<span v-if="scope.row.enterpriseType==0">应急局</span>
<span v-else>企业</span>
<span v-else>企业</span>
</template>
</template>
</el-table-column>
</el-table-column>
-->
<el-table-column
prop=
"menuSort"
align=
"center"
label=
"排序"
>
<el-table-column
prop=
"menuSort"
align=
"center"
label=
"排序"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
menuSort
}}
{{
scope
.
row
.
menuSort
}}
...
@@ -262,7 +262,7 @@ export default {
...
@@ -262,7 +262,7 @@ export default {
if
(
!
obj
.
leaf
)
{
if
(
!
obj
.
leaf
)
{
obj
.
children
=
null
obj
.
children
=
null
}
}
obj
.
label
=
(
obj
.
enterpriseType
===
0
?
'
局)
'
:
'
企)
'
)
+
obj
.
label
//
obj.label = (obj.enterpriseType === 0 ? '局)' : '企)') + obj.label
return
obj
return
obj
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
src/views/system/role/index.vue
View file @
81915e80
...
@@ -25,7 +25,20 @@
...
@@ -25,7 +25,20 @@
<el-form-item
label=
"角色名称"
prop=
"name"
>
<el-form-item
label=
"角色名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
style=
"width: 380px;"
/>
<el-input
v-model=
"form.name"
style=
"width: 380px;"
/>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"form.dataScope === '自定义'"
label=
"数据权限"
prop=
"depts"
>
<el-form-item
label=
"角色级别"
prop=
"level"
>
<el-input-number
v-model.number=
"form.level"
:min=
"1"
controls-position=
"right"
style=
"width: 145px;"
/>
</el-form-item>
<el-form-item
label=
"数据范围"
prop=
"dataScope"
>
<el-select
v-model=
"form.dataScope"
style=
"width: 140px"
placeholder=
"请选择数据范围"
@
change=
"changeScope"
>
<el-option
v-for=
"item in dateScopes"
:key=
"item"
:label=
"item"
:value=
"item"
/>
</el-select>
</el-form-item>
<!--
<el-form-item
v-if=
"form.dataScope === '自定义'"
label=
"数据权限"
prop=
"depts"
>
<treeselect
<treeselect
v-model=
"deptDatas"
v-model=
"deptDatas"
:load-options=
"loadDepts"
:load-options=
"loadDepts"
...
@@ -34,7 +47,7 @@
...
@@ -34,7 +47,7 @@
style=
"width: 380px"
style=
"width: 380px"
placeholder=
"请选择"
placeholder=
"请选择"
/>
/>
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
"描述信息"
prop=
"description"
>
<el-form-item
label=
"描述信息"
prop=
"description"
>
<el-input
v-model=
"form.description"
style=
"width: 380px;"
rows=
"5"
type=
"textarea"
/>
<el-input
v-model=
"form.description"
style=
"width: 380px;"
rows=
"5"
type=
"textarea"
/>
</el-form-item>
</el-form-item>
...
@@ -54,6 +67,7 @@
...
@@ -54,6 +67,7 @@
<el-table
ref=
"table"
v-loading=
"crud.loading"
highlight-current-row
style=
"width: 100%;"
:data=
"crud.data"
@
selection-change=
"crud.selectionChangeHandler"
@
current-change=
"handleCurrentChange"
>
<el-table
ref=
"table"
v-loading=
"crud.loading"
highlight-current-row
style=
"width: 100%;"
:data=
"crud.data"
@
selection-change=
"crud.selectionChangeHandler"
@
current-change=
"handleCurrentChange"
>
<el-table-column
:selectable=
"checkboxT"
type=
"selection"
width=
"55"
/>
<el-table-column
:selectable=
"checkboxT"
type=
"selection"
width=
"55"
/>
<el-table-column
prop=
"name"
label=
"名称"
/>
<el-table-column
prop=
"name"
label=
"名称"
/>
<el-table-column
label=
"权限等级"
prop=
"level"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"description"
label=
"描述"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"description"
label=
"描述"
/>
<el-table-column
:show-overflow-tooltip=
"true"
width=
"135px"
prop=
"createTime"
label=
"创建日期"
/>
<el-table-column
:show-overflow-tooltip=
"true"
width=
"135px"
prop=
"createTime"
label=
"创建日期"
/>
<el-table-column
v-if=
"checkPer(['admin','roles:edit','roles:del'])"
label=
"操作"
width=
"130px"
align=
"center"
fixed=
"right"
>
<el-table-column
v-if=
"checkPer(['admin','roles:edit','roles:del'])"
label=
"操作"
width=
"130px"
align=
"center"
fixed=
"right"
>
...
@@ -132,6 +146,7 @@ export default {
...
@@ -132,6 +146,7 @@ export default {
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
),
crud
()],
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
),
crud
()],
data
()
{
data
()
{
return
{
return
{
dateScopes
:
[
"
本级
"
,
"
全部
"
],
defaultProps
:
{
children
:
'
children
'
,
label
:
'
label
'
,
isLeaf
:
'
leaf
'
},
defaultProps
:
{
children
:
'
children
'
,
label
:
'
label
'
,
isLeaf
:
'
leaf
'
},
level
:
3
,
level
:
3
,
currentId
:
0
,
currentName
:
''
,
menuLoading
:
false
,
showButton
:
false
,
currentId
:
0
,
currentName
:
''
,
menuLoading
:
false
,
showButton
:
false
,
...
@@ -194,8 +209,8 @@ export default {
...
@@ -194,8 +209,8 @@ export default {
},
},
// 提交前做的操作
// 提交前做的操作
[
CRUD
.
HOOK
.
afterValidateCU
](
crud
)
{
[
CRUD
.
HOOK
.
afterValidateCU
](
crud
)
{
crud
.
form
.
dataScope
=
'
全部
'
//
crud.form.dataScope = '全部'
crud
.
form
.
depts
=
[]
//
crud.form.depts = []
return
true
return
true
},
},
// 触发单选
// 触发单选
...
...
src/views/system/user/center.vue
View file @
81915e80
...
@@ -159,6 +159,11 @@ export default {
...
@@ -159,6 +159,11 @@ export default {
created
()
{
created
()
{
this
.
form
=
{
id
:
this
.
user
.
id
,
nickName
:
this
.
user
.
nickName
,
gender
:
this
.
user
.
gender
,
phone
:
this
.
user
.
phone
}
this
.
form
=
{
id
:
this
.
user
.
id
,
nickName
:
this
.
user
.
nickName
,
gender
:
this
.
user
.
gender
,
phone
:
this
.
user
.
phone
}
store
.
dispatch
(
'
GetInfo
'
).
then
(()
=>
{})
store
.
dispatch
(
'
GetInfo
'
).
then
(()
=>
{})
window
.
localStorage
.
setItem
(
'
kd.selected.mine
'
,
JSON
.
stringify
({
mineType
:
'
1
'
,
mineId
:
'
1
'
}))
},
},
methods
:
{
methods
:
{
toggleShow
()
{
toggleShow
()
{
...
...
src/views/system/user/index.vue
View file @
81915e80
...
@@ -55,19 +55,37 @@
...
@@ -55,19 +55,37 @@
<el-radio
label=
"女"
>
女
</el-radio>
<el-radio
label=
"女"
>
女
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.enabled"
:disabled=
"form.id === user.id"
>
<el-form-item
label=
"区域"
prop=
"depts"
>
<el-radio-button
<el-cascader
v-for=
"item in user_status"
v-model=
"form.dept"
:key=
"item.value"
:options=
"data"
:label=
"item.value"
:props=
"
{ checkStrictly: true, value: 'id' }"
>
{{
item
.
label
}}
</el-radio-button>
:show-all-levels="false"
</el-radio-group>
@change="deptChange"
>
</el-cascader>
</el-form-item>
</el-form-item>
<el-form-item
label=
"企业"
prop=
"enterpriseIdList"
>
<el-select
v-model=
"form.enterpriseIdList"
placeholder=
"请输入企业"
:multiple=
"true"
>
<el-option
v-for=
"item in options4enterpriseIdList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
style=
"margin-bottom: 0;"
label=
"角色"
prop=
"roles"
>
<el-form-item
style=
"margin-bottom: 0;"
label=
"角色"
prop=
"roles"
>
<el-select
<el-select
v-model=
"roleDatas"
v-model=
"roleDatas"
style=
"width:
4
37px"
style=
"width:
2
37px"
multiple
multiple
placeholder=
"请选择"
placeholder=
"请选择"
@
remove-tag=
"deleteTag"
@
remove-tag=
"deleteTag"
...
@@ -76,11 +94,20 @@
...
@@ -76,11 +94,20 @@
<el-option
<el-option
v-for=
"item in canChoosedRoles"
v-for=
"item in canChoosedRoles"
:key=
"item.name"
:key=
"item.name"
:disabled=
"item.level
<
=
1
||
item
.
level
<
level
"
:disabled=
"item.level
<
1
||
item
.
level
<
level
"
:label=
"item.name"
:label=
"item.name"
:value=
"item.id"
:value=
"item.id"
/>
/>
</el-select>
</el-select>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.enabled"
:disabled=
"form.id === user.id"
>
<el-radio-button
v-for=
"item in user_status"
:key=
"item.value"
:label=
"item.value"
>
{{
item
.
label
}}
</el-radio-button>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -132,8 +159,10 @@
...
@@ -132,8 +159,10 @@
<
script
>
<
script
>
import
crudUser
from
'
@/api/system/user
'
import
crudUser
from
'
@/api/system/user
'
import
{
getCompanyList
}
from
'
@/api/system/user
'
import
{
isvalidPhone
}
from
'
@/utils/validate
'
import
{
isvalidPhone
}
from
'
@/utils/validate
'
// import { getDepts
, getDeptSuperior } from '@/api/system/dept'
import
{
getDeptList
,
getDeptSuperior
}
from
'
@/api/system/dept
'
import
{
getAll
,
getLevel
}
from
'
@/api/system/role
'
import
{
getAll
,
getLevel
}
from
'
@/api/system/role
'
import
{
getAllJob
}
from
'
@/api/system/job
'
import
{
getAllJob
}
from
'
@/api/system/job
'
import
CRUD
,
{
presenter
,
header
,
form
,
crud
}
from
'
@crud/crud
'
import
CRUD
,
{
presenter
,
header
,
form
,
crud
}
from
'
@crud/crud
'
...
@@ -146,7 +175,8 @@ import { mapGetters } from 'vuex'
...
@@ -146,7 +175,8 @@ import { mapGetters } from 'vuex'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
import
'
@riophae/vue-treeselect/dist/vue-treeselect.css
'
let
userRoles
=
[]
let
userRoles
=
[]
let
userJobs
=
[]
let
userJobs
=
[]
const
defaultForm
=
{
id
:
null
,
username
:
null
,
nickName
:
null
,
gender
:
'
男
'
,
email
:
null
,
enabled
:
'
false
'
,
roles
:
[],
jobs
:
[],
dept
:
{
id
:
null
},
phone
:
null
}
const
defaultForm
=
{
id
:
null
,
username
:
null
,
nickName
:
null
,
gender
:
'
男
'
,
email
:
null
,
enabled
:
'
false
'
,
roles
:
[],
jobs
:
[],
dept
:
{},
phone
:
null
,
enterpriseIdList
:[]}
export
default
{
export
default
{
name
:
'
User
'
,
name
:
'
User
'
,
components
:
{
crudOperation
,
rrOperation
,
udOperation
,
pagination
,
DateRangePicker
},
components
:
{
crudOperation
,
rrOperation
,
udOperation
,
pagination
,
DateRangePicker
},
...
@@ -172,6 +202,7 @@ export default {
...
@@ -172,6 +202,7 @@ export default {
height
:
document
.
documentElement
.
clientHeight
-
180
+
'
px;
'
,
height
:
document
.
documentElement
.
clientHeight
-
180
+
'
px;
'
,
deptName
:
''
,
depts
:
[],
deptDatas
:
[],
jobs
:
[],
level
:
3
,
roles
:
[],
deptName
:
''
,
depts
:
[],
deptDatas
:
[],
jobs
:
[],
level
:
3
,
roles
:
[],
jobDatas
:
[],
roleDatas
:
[],
// 多选时使用
jobDatas
:
[],
roleDatas
:
[],
// 多选时使用
options4enterpriseIdList
:
[],
defaultProps
:
{
children
:
'
children
'
,
label
:
'
name
'
,
isLeaf
:
'
leaf
'
},
defaultProps
:
{
children
:
'
children
'
,
label
:
'
name
'
,
isLeaf
:
'
leaf
'
},
permission
:
{
permission
:
{
add
:
[
'
admin
'
,
'
user:add
'
],
add
:
[
'
admin
'
,
'
user:add
'
],
...
@@ -183,6 +214,7 @@ export default {
...
@@ -183,6 +214,7 @@ export default {
{
key
:
'
false
'
,
display_name
:
'
禁用
'
}
{
key
:
'
false
'
,
display_name
:
'
禁用
'
}
],
],
rules
:
{
rules
:
{
username
:
[
username
:
[
{
required
:
true
,
message
:
'
请输入用户名
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请输入用户名
'
,
trigger
:
'
blur
'
},
{
min
:
2
,
max
:
20
,
message
:
'
长度在 2 到 20 个字符
'
,
trigger
:
'
blur
'
}
{
min
:
2
,
max
:
20
,
message
:
'
长度在 2 到 20 个字符
'
,
trigger
:
'
blur
'
}
...
@@ -193,7 +225,11 @@ export default {
...
@@ -193,7 +225,11 @@ export default {
],
],
phone
:
[
phone
:
[
{
required
:
true
,
trigger
:
'
blur
'
,
validator
:
validPhone
}
{
required
:
true
,
trigger
:
'
blur
'
,
validator
:
validPhone
}
]
],
dept
:
[
{
required
:
true
,
message
:
'
请选择部门
'
,
trigger
:
'
blur
'
}
],
}
}
}
}
},
},
...
@@ -202,9 +238,10 @@ export default {
...
@@ -202,9 +238,10 @@ export default {
'
user
'
'
user
'
]),
]),
canChoosedRoles
()
{
canChoosedRoles
()
{
return
this
.
roles
.
filter
(
r
=>
{
// return this.roles.filter(r => {
return
r
.
enterpriseId
===
this
.
user
.
enterpriseId
// return r.enterpriseId === this.user.enterpriseId
})
// })
return
this
.
roles
}
}
},
},
created
()
{
created
()
{
...
@@ -215,8 +252,31 @@ export default {
...
@@ -215,8 +252,31 @@ export default {
window
.
onresize
=
function
temp
()
{
window
.
onresize
=
function
temp
()
{
that
.
height
=
document
.
documentElement
.
clientHeight
-
180
+
'
px;
'
that
.
height
=
document
.
documentElement
.
clientHeight
-
180
+
'
px;
'
}
}
this
.
getDeptList
()
},
},
methods
:
{
methods
:
{
getCompanyList
(
deptId
){
console
.
log
(
'
deptId
'
,
deptId
)
getCompanyList
({
// deptId
deptId
:
deptId
.
length
>
1
?
deptId
[
deptId
.
length
-
1
]
:
deptId
[
0
]
})
.
then
((
res
)
=>
{
this
.
options4enterpriseIdList
=
res
.
body
;
});
},
deptChange
(
value
){
console
.
log
(
'
value
'
,
value
)
this
.
getCompanyList
(
value
)
},
getDeptList
()
{
getDeptList
({
}).
then
((
res
)
=>
{
this
.
data
=
res
.
body
.
content
;
});
},
// 禁止输入空格
// 禁止输入空格
keydown
(
e
)
{
keydown
(
e
)
{
if
(
e
.
keyCode
===
32
)
{
if
(
e
.
keyCode
===
32
)
{
...
@@ -260,14 +320,20 @@ export default {
...
@@ -260,14 +320,20 @@ export default {
[
CRUD
.
HOOK
.
beforeToAdd
]()
{
[
CRUD
.
HOOK
.
beforeToAdd
]()
{
this
.
jobDatas
=
[]
this
.
jobDatas
=
[]
this
.
roleDatas
=
[]
this
.
roleDatas
=
[]
this
.
form
.
dept
=
[]
},
},
// 初始化编辑时候的角色与岗位
// 初始化编辑时候的角色与岗位
[
CRUD
.
HOOK
.
beforeToEdit
](
crud
,
form
)
{
[
CRUD
.
HOOK
.
beforeToEdit
](
crud
,
form
)
{
// console.log('编辑行数据', form.dept, this.form.dept)
// this.getJobs(this.form.dept.id)
// this.getJobs(this.form.dept.id)
this
.
jobDatas
=
[]
this
.
jobDatas
=
[]
this
.
roleDatas
=
[]
this
.
roleDatas
=
[]
// this.form.dept = []
userRoles
=
[]
userRoles
=
[]
userJobs
=
[]
userJobs
=
[]
const
_this
=
this
const
_this
=
this
form
.
roles
.
forEach
(
function
(
role
,
index
)
{
form
.
roles
.
forEach
(
function
(
role
,
index
)
{
_this
.
roleDatas
.
push
(
role
.
id
)
_this
.
roleDatas
.
push
(
role
.
id
)
...
@@ -279,6 +345,15 @@ export default {
...
@@ -279,6 +345,15 @@ export default {
const
data
=
{
id
:
job
.
id
}
const
data
=
{
id
:
job
.
id
}
userJobs
.
push
(
data
)
userJobs
.
push
(
data
)
})
})
// 区域列表回显
this
.
form
.
dept
=
[
form
.
dept
.
id
]
// this.form.dept = [7]
// 公司列表回显
this
.
form
.
enterpriseIdList
=
[]
form
.
enterpriseList
&&
form
.
enterpriseList
.
forEach
(
item
=>
{
this
.
form
.
enterpriseIdList
.
push
(
item
.
id
)
});
},
},
// 提交前做的操作
// 提交前做的操作
[
CRUD
.
HOOK
.
afterValidateCU
](
crud
)
{
[
CRUD
.
HOOK
.
afterValidateCU
](
crud
)
{
...
@@ -289,8 +364,19 @@ export default {
...
@@ -289,8 +364,19 @@ export default {
})
})
return
false
return
false
}
}
if
(
!
this
.
form
.
dept
.
length
){
this
.
$message
({
message
:
'
部门不能为空
'
,
type
:
'
warning
'
})
return
false
}
crud
.
form
.
roles
=
userRoles
crud
.
form
.
roles
=
userRoles
crud
.
form
.
jobs
=
userJobs
crud
.
form
.
jobs
=
userJobs
crud
.
form
.
dept
=
{
id
:
this
.
form
.
dept
[
this
.
form
.
dept
.
length
-
1
]}
return
true
return
true
},
},
// getDepts() {
// getDepts() {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment