Commit 7617257a authored by wuqinghua's avatar wuqinghua

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	gassafetyprogress-web/src/views/regulation/device/index.vue
#	gassafetyprogress-web/src/views/regulation/gasuser/index.vue
parents 76b34c17 9c8ee7c5
...@@ -27,7 +27,7 @@ import com.zehong.common.core.page.TableDataInfo; ...@@ -27,7 +27,7 @@ import com.zehong.common.core.page.TableDataInfo;
* @date 2022-03-24 * @date 2022-03-24
*/ */
@RestController @RestController
@RequestMapping("/system/info") @RequestMapping("/system/hidden")
public class THiddenTroubleInfoController extends BaseController public class THiddenTroubleInfoController extends BaseController
{ {
@Autowired @Autowired
...@@ -36,7 +36,7 @@ public class THiddenTroubleInfoController extends BaseController ...@@ -36,7 +36,7 @@ public class THiddenTroubleInfoController extends BaseController
/** /**
* 查询燃气隐患列表 * 查询燃气隐患列表
*/ */
@PreAuthorize("@ss.hasPermi('system:info:list')") @PreAuthorize("@ss.hasPermi('system:hidden:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(THiddenTroubleInfo tHiddenTroubleInfo) public TableDataInfo list(THiddenTroubleInfo tHiddenTroubleInfo)
{ {
...@@ -53,7 +53,7 @@ public class THiddenTroubleInfoController extends BaseController ...@@ -53,7 +53,7 @@ public class THiddenTroubleInfoController extends BaseController
/** /**
* 导出燃气隐患列表 * 导出燃气隐患列表
*/ */
@PreAuthorize("@ss.hasPermi('system:info:export')") @PreAuthorize("@ss.hasPermi('system:hidden:export')")
@Log(title = "燃气隐患", businessType = BusinessType.EXPORT) @Log(title = "燃气隐患", businessType = BusinessType.EXPORT)
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(THiddenTroubleInfo tHiddenTroubleInfo) public AjaxResult export(THiddenTroubleInfo tHiddenTroubleInfo)
...@@ -66,7 +66,7 @@ public class THiddenTroubleInfoController extends BaseController ...@@ -66,7 +66,7 @@ public class THiddenTroubleInfoController extends BaseController
/** /**
* 获取燃气隐患详细信息 * 获取燃气隐患详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:info:query')") @PreAuthorize("@ss.hasPermi('system:hidden:query')")
@GetMapping(value = "/{hiddenTroubleId}") @GetMapping(value = "/{hiddenTroubleId}")
public AjaxResult getInfo(@PathVariable("hiddenTroubleId") Long hiddenTroubleId) public AjaxResult getInfo(@PathVariable("hiddenTroubleId") Long hiddenTroubleId)
{ {
...@@ -76,7 +76,7 @@ public class THiddenTroubleInfoController extends BaseController ...@@ -76,7 +76,7 @@ public class THiddenTroubleInfoController extends BaseController
/** /**
* 新增燃气隐患 * 新增燃气隐患
*/ */
@PreAuthorize("@ss.hasPermi('system:info:add')") @PreAuthorize("@ss.hasPermi('system:hidden:add')")
@Log(title = "燃气隐患", businessType = BusinessType.INSERT) @Log(title = "燃气隐患", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo) public AjaxResult add(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo)
...@@ -87,7 +87,7 @@ public class THiddenTroubleInfoController extends BaseController ...@@ -87,7 +87,7 @@ public class THiddenTroubleInfoController extends BaseController
/** /**
* 修改燃气隐患 * 修改燃气隐患
*/ */
@PreAuthorize("@ss.hasPermi('system:info:edit')") @PreAuthorize("@ss.hasPermi('system:hidden:edit')")
@Log(title = "燃气隐患", businessType = BusinessType.UPDATE) @Log(title = "燃气隐患", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo) public AjaxResult edit(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo)
...@@ -98,7 +98,7 @@ public class THiddenTroubleInfoController extends BaseController ...@@ -98,7 +98,7 @@ public class THiddenTroubleInfoController extends BaseController
/** /**
* 删除燃气隐患 * 删除燃气隐患
*/ */
@PreAuthorize("@ss.hasPermi('system:info:remove')") @PreAuthorize("@ss.hasPermi('system:hidden:remove')")
@Log(title = "燃气隐患", businessType = BusinessType.DELETE) @Log(title = "燃气隐患", businessType = BusinessType.DELETE)
@DeleteMapping("/{hiddenTroubleIds}") @DeleteMapping("/{hiddenTroubleIds}")
public AjaxResult remove(@PathVariable Long[] hiddenTroubleIds) public AjaxResult remove(@PathVariable Long[] hiddenTroubleIds)
......
...@@ -37,7 +37,7 @@ public class TComplainDeal extends BaseEntity ...@@ -37,7 +37,7 @@ public class TComplainDeal extends BaseEntity
@Excel(name = "转办记录") @Excel(name = "转办记录")
private String transferRecord; private String transferRecord;
@Excel(name = "反馈事件") @Excel(name = "反馈时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date dealTime; private Date dealTime;
/** 办理情况 */ /** 办理情况 */
......
...@@ -83,7 +83,18 @@ public class THiddenTroubleInfo extends BaseEntity ...@@ -83,7 +83,18 @@ public class THiddenTroubleInfo extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
public void setHiddenTroubleId(Long hiddenTroubleId) /**上报人名称*/
private String reportPersonName;
public String getReportPersonName() {
return reportPersonName;
}
public void setReportPersonName(String reportPersonName) {
this.reportPersonName = reportPersonName;
}
public void setHiddenTroubleId(Long hiddenTroubleId)
{ {
this.hiddenTroubleId = hiddenTroubleId; this.hiddenTroubleId = hiddenTroubleId;
} }
......
...@@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="hiddenTroubleDealFinishTime" column="hidden_trouble_deal_finish_time" /> <result property="hiddenTroubleDealFinishTime" column="hidden_trouble_deal_finish_time" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="reportPersonName" column="report_person_name" />
</resultMap> </resultMap>
<sql id="selectTHiddenTroubleInfoVo"> <sql id="selectTHiddenTroubleInfoVo">
select hidden_trouble_id, work_id, hidden_trouble_name, hidden_trouble_level, hidden_trouble_type, longitude, latitude, picture_url, hidden_trouble_describe, report_time, (select u.user_name from sys_user u where u.user_id = report_person) AS report_person, hidden_trouble_deal_status, hidden_trouble_deal_condition, hidden_trouble_deal_finish_time, is_del, remarks from t_hidden_trouble_info select hidden_trouble_id, work_id, hidden_trouble_name, hidden_trouble_level, hidden_trouble_type, longitude, latitude, picture_url, hidden_trouble_describe, report_time, (select u.user_name from sys_user u where u.user_id = report_person) AS report_person_name, report_person, hidden_trouble_deal_status, hidden_trouble_deal_condition, hidden_trouble_deal_finish_time, is_del, remarks from t_hidden_trouble_info
</sql> </sql>
<select id="selectTHiddenTroubleInfoList" parameterType="THiddenTroubleInfo" resultMap="THiddenTroubleInfoResult"> <select id="selectTHiddenTroubleInfoList" parameterType="THiddenTroubleInfo" resultMap="THiddenTroubleInfoResult">
......
...@@ -3,7 +3,7 @@ import request from '@/utils/request' ...@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询燃气隐患列表 // 查询燃气隐患列表
export function listInfo(query) { export function listInfo(query) {
return request({ return request({
url: '/system/info/list', url: '/system/hidden/list',
method: 'get', method: 'get',
params: query params: query
}) })
...@@ -12,7 +12,7 @@ export function listInfo(query) { ...@@ -12,7 +12,7 @@ export function listInfo(query) {
// 查询燃气隐患 // 查询燃气隐患
export function hiddenTroubleList(query) { export function hiddenTroubleList(query) {
return request({ return request({
url: '/system/info/hiddenTroubleList', url: '/system/hidden/hiddenTroubleList',
method: 'get', method: 'get',
params: query params: query
}) })
...@@ -21,41 +21,41 @@ export function hiddenTroubleList(query) { ...@@ -21,41 +21,41 @@ export function hiddenTroubleList(query) {
// 查询燃气隐患详细 // 查询燃气隐患详细
export function getInfo(hiddenTroubleId) { export function getInfo(hiddenTroubleId) {
return request({ return request({
url: '/system/info/' + hiddenTroubleId, url: '/system/hidden/' + hiddenTroubleId,
method: 'get' method: 'get'
}) })
} }
// 新增燃气隐患 // 新增燃气隐患
export function addInfo(data) { export function addHiddenInfo(data) {
return request({ return request({
url: '/system/info', url: '/system/hidden',
method: 'post', method: 'post',
data: data data: data
}) })
} }
// 修改燃气隐患 // 修改燃气隐患
export function updateInfo(data) { export function updateHiddenInfo(data) {
return request({ return request({
url: '/system/info', url: '/system/hidden',
method: 'put', method: 'put',
data: data data: data
}) })
} }
// 删除燃气隐患 // 删除燃气隐患
export function delInfo(hiddenTroubleId) { export function delHiddenInfo(hiddenTroubleId) {
return request({ return request({
url: '/system/info/' + hiddenTroubleId, url: '/system/hidden/' + hiddenTroubleId,
method: 'delete' method: 'delete'
}) })
} }
// 导出燃气隐患 // 导出燃气隐患
export function exportInfo(query) { export function exportHiddenInfo(query) {
return request({ return request({
url: '/system/info/export', url: '/system/hidden/export',
method: 'get', method: 'get',
params: query params: query
}) })
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 3276749 */ font-family: "iconfont"; /* Project id 3276749 */
src: url('iconfont.woff2?t=1648286292510') format('woff2'), src: url('iconfont.woff2?t=1648524577887') format('woff2'),
url('iconfont.woff?t=1648286292510') format('woff'), url('iconfont.woff?t=1648524577887') format('woff'),
url('iconfont.ttf?t=1648286292510') format('truetype'); url('iconfont.ttf?t=1648524577887') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,6 +13,14 @@ ...@@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-bingo:before {
content: "\e625";
}
.icon-x:before {
content: "\e600";
}
.icon-jt:before { .icon-jt:before {
content: "\e8f1"; content: "\e8f1";
} }
......
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
.el-dialog:not(.is-fullscreen) { .el-dialog:not(.is-fullscreen) {
margin-top: 6vh !important; margin-top: 6vh !important;
} }
.el-dialog__header{ .el-dialog__header {
border-bottom:1px solid #cccccc; border-bottom: 1px solid #cccccc;
} }
.bigwindow { .bigwindow {
// 全局表格样式 // 全局表格样式
...@@ -613,19 +613,17 @@ ...@@ -613,19 +613,17 @@
// overflow-y: none !important; // overflow-y: none !important;
} }
} }
// map里的label // map里的label
.amap-info { .amap-info {
position: fixed !important; position: fixed !important;
z-index: 999 !important; z-index: 999 !important;
} }
.amap-marker-label{ .amap-marker-label {
background-color: rgba(9, 18, 32, 0.6) !important; background-color: rgba(9, 18, 32, 0.6) !important;
color: #fff !important; color: #fff !important;
border:none !important; border: none !important;
padding:10px; padding: 10px;
} }
.left { .left {
.el-table__body-wrapper { .el-table__body-wrapper {
...@@ -668,16 +666,20 @@ ...@@ -668,16 +666,20 @@
padding: 0 2px !important; padding: 0 2px !important;
} }
//去除高德logo //去除高德logo
.amap-logo{ .amap-logo {
display: none; display: none;
opacity:0 !important; opacity: 0 !important;
} }
.amap-copyright { .amap-copyright {
opacity:0; opacity: 0;
}
.paddingnone {
padding: 0 !important;
} }
.zzz { .zzz {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
\ No newline at end of file
<template> <template>
<ul class="timeline-wrapper"> <ul class="timeline-wrapper">
<li class="timeline-item" >
<div class="timeline-box">
<div class="out-circle">
<div class="in-circle"></div>
</div>
<div class="long-line"></div>
</div>
<div class="timeline-content">
<div class="timeline-date el-form-div">
<div style="width: 180px">{{nowItem.createTime}}</div>
<div >事件发布</div>
</div>
<div class="timeline-title">{{ nowItem.eventName}}</div>
<div class="timeline-title">地址:{{ nowItem.address}}</div>
</div>
</li>
<li class="timeline-item" v-for="t in timelineList" :key="t.id"> <li class="timeline-item" v-for="t in timelineList" :key="t.id">
<div class="timeline-box"> <div class="timeline-box">
<div class="out-circle"> <div class="out-circle">
...@@ -8,7 +24,11 @@ ...@@ -8,7 +24,11 @@
<div class="long-line"></div> <div class="long-line"></div>
</div> </div>
<div class="timeline-content"> <div class="timeline-content">
<div class="timeline-date">{{t.createTime}}</div> <div class="timeline-date el-form-div">
<div style="width: 180px">{{t.createTime}}</div>
<div v-if="t.eventType==2">预案指引</div>
<div v-if="t.eventType==1">信息处置</div>
</div>
<div class="timeline-title">{{ t.management}}</div> <div class="timeline-title">{{ t.management}}</div>
<div class="timeline-desc"> <div class="timeline-desc">
<span <span
...@@ -36,8 +56,8 @@ ...@@ -36,8 +56,8 @@
default: () => { default: () => {
return [] return []
} }
} },
nowItem:{}
}, },
methods: { methods: {
checkFile(url) { checkFile(url) {
...@@ -53,7 +73,12 @@ ...@@ -53,7 +73,12 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.el-form-div{
display:flex;
flex-direction:row;
justify-content:flex-start;
width: 100%;
}
/* 时间线 */ /* 时间线 */
.timeline-item { .timeline-item {
position: relative; position: relative;
......
...@@ -11,11 +11,30 @@ ...@@ -11,11 +11,30 @@
<!--<img src="@/assets/xiaoxi.png" :hidden="xiaohidden" style="height: 40px;width: 40px;margin-top: 5px;cursor: pointer;">--> <!--<img src="@/assets/xiaoxi.png" :hidden="xiaohidden" style="height: 40px;width: 40px;margin-top: 5px;cursor: pointer;">-->
<!--</div>--> <!--</div>-->
<!-- <search id="header-search" class="right-menu-item" /> --> <!-- <search id="header-search" class="right-menu-item" /> -->
          <el-badge :value="total" :max="99" class="item" > <!--          <el-badge :value="total" :max="99" class="item" >-->
            <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;" @click="$router.push('/emergency/emergency')"></i> <!--            <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;" ></i>-->
          </el-badge> <!--          </el-badge>-->
<el-dropdown class="avatar-container right-menu-item hover-effect" style="margin-right: 0px" trigger="click">
<div class="avatar-wrapper" >
<el-badge :value="total" :max="99" class="item" >
   <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;" ></i>
 </el-badge>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="total==0">
<span>暂无消息</span>
</el-dropdown-item>
<div v-for="(item,index) in receivedList" >
<el-dropdown-item v-if="index==0" @click.native="openMassage(item.id,item.eventName)">
<span>您有新消息:{{item.eventName}}</span>
</el-dropdown-item>
<el-dropdown-item v-if="index>0" divided @click.native="openMassage(item.id,item.eventName)">
<span>您有新消息:{{item.eventName}}</span>
</el-dropdown-item>
</div>
</el-dropdown-menu>
</el-dropdown>
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
<!-- <el-tooltip content="布局大小" effect="dark" placement="bottom"> <!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
...@@ -46,7 +65,7 @@ ...@@ -46,7 +65,7 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters,mapMutations } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav' import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger'
...@@ -69,13 +88,15 @@ export default { ...@@ -69,13 +88,15 @@ export default {
userType:-2, userType:-2,
total:null, total:null,
xiaohidden:false, xiaohidden:false,
receivedList:[],
routerPath:"",
} }
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'sidebar', 'sidebar',
'avatar', 'avatar',
'device' 'device',
]), ]),
setting: { setting: {
get() { get() {
...@@ -95,34 +116,23 @@ export default { ...@@ -95,34 +116,23 @@ export default {
} }
}, },
mounted(){ mounted(){
getUserProfile().then(response => {
this.userType = response.data.deptId; getUserProfile().then(response => {
}); this.userType = response.data.deptId;
//定时检测新消息 if(this.userType!=-2){
setInterval(() => { this.queryParams.enterpriseId = response.data.deptId;
var params = { }
pageNum: 1, this.getList();
pageSize: 100, });
status:5, this.socket();
enterpriseId:this.userType
};
if(this.userType==-2){
params.governmentRead=0;
params.enterpriseId=null;
}else {
params.companyRead=0
}
listReceive(params).then(response => {
if(response.total!=0){
this.total= response.total;
}else{
this.total= "";
}
});
}, 5000);
}, },
methods: { methods: {
...mapMutations({
SET_EMERGENCY:"bigWindowCompany/SET_EMERGENCY"
}
),
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
}, },
...@@ -136,6 +146,61 @@ mounted(){ ...@@ -136,6 +146,61 @@ mounted(){
location.href = '/index'; location.href = '/index';
}) })
}).catch(() => {}); }).catch(() => {});
},
openMassage(id,title){
//this.$router.push('/emergency/emergency?eventid='+id);
this.routerPath="/emergency/emergency";
if(window.location.pathname==this.routerPath){
// this.$parent.showDetail(id,title);
this.SET_EMERGENCY({
eventId:id,
eventName:title,
})
}else {
this.$router.push({path: this.routerPath,query:{eventId:id,eventName:title}});
}
},
socket() {
console.log("socket执行");
this.ws = new WebSocket(
"ws://192.168.2.17:8903/gassafety/websocketServer"
);
this.ws.onopen = (evt) => {
console.log("WebSockets开启");
};
this.ws.onmessage = (evt) => {
console.log("推送", evt);
const obj = JSON.parse(evt.data);
console.log("接受socketobj", obj);
this.getList();
};
this.ws.onclose = () => {
console.log("ws协议关闭");
};
},
getList(){
console.log(this.userType)
var params = {
pageNum: 1,
pageSize: 100,
status:5,
enterpriseId:this.userType
};
if(this.userType==-2){
params.governmentRead=0;
params.enterpriseId=null;
}else {
params.companyRead=0
}
listReceive(params).then(response => {
this.receivedList = response.rows;
if(response.total!=0){
this.total= response.total;
}else{
this.total= "";
}
});
} }
} }
} }
......
This diff is collapsed.
...@@ -734,6 +734,9 @@ export class EditorMap { ...@@ -734,6 +734,9 @@ export class EditorMap {
}); });
} }
} }
setZoomAndCenter(longitude,latitude){
this.map.setZoomAndCenter(14, [longitude,latitude]);
}
// 普通调用方法 // 普通调用方法
// 设备报警 // 设备报警
deviceAlarm(obj) { deviceAlarm(obj) {
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
<el-input v-model="form.complainName" placeholder="请输入投诉人姓名" :disabled="readonly"/> <el-input v-model="form.complainName" placeholder="请输入投诉人姓名" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="指派单位" prop="complainAssignEnterproseId" > <el-form-item label="指派单位" prop="complainAssignEnterproseId" >
<el-select style="width: 100%" v-model="form.complainAssignEnterproseName" placeholder="请选择预案等级" @change="qiyechang" :disabled="readonly"> <el-select style="width: 100%" v-model="form.complainAssignEnterproseName" placeholder="请选择指派单位" @change="qiyechang" :disabled="readonly">
<el-option <el-option
v-for = "dict in enterpriseList" v-for = "dict in enterpriseList"
:key = "dict.enterpriseId" :key = "dict.enterpriseId"
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
<el-input v-model="form.complainPhone" placeholder="请输入投诉人电话" :disabled="readonly"/> <el-input v-model="form.complainPhone" placeholder="请输入投诉人电话" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="指派人" prop="complainAssignManId"> <el-form-item label="指派人" prop="complainAssignManId">
<el-select v-model="form.complainAssignMan" placeholder="请选择预案等级" clearable style = "width: 100%" @change="manChang" :disabled="readonly"> <el-select v-model="form.complainAssignMan" placeholder="请选择指派人" clearable style = "width: 100%" @change="manChang" :disabled="readonly">
<el-option <el-option
v-for = "dict in peopleList" v-for = "dict in peopleList"
:key = "dict.id" :key = "dict.id"
...@@ -191,6 +191,16 @@ ...@@ -191,6 +191,16 @@
<el-form-item label="投诉事项" prop="complainMatter"> <el-form-item label="投诉事项" prop="complainMatter">
<el-input v-model="form.complainMatter" type = "textarea" placeholder="请输入投诉事项" :disabled="readonly"/> <el-input v-model="form.complainMatter" type = "textarea" placeholder="请输入投诉事项" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="反馈时间" prop="dealTime" :style="display">
<el-date-picker clearable size="small"
v-model="form.dealTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择反馈时间"
:disabled="readonly"
style="width: 280px">
</el-date-picker>
</el-form-item>
<el-form-item label="反馈内容" prop="dealCondition" :style="display"> <el-form-item label="反馈内容" prop="dealCondition" :style="display">
<el-input v-model="form.dealCondition" type = "textarea" placeholder="请输入办理情况" :disabled="readonly"/> <el-input v-model="form.dealCondition" type = "textarea" placeholder="请输入办理情况" :disabled="readonly"/>
</el-form-item> </el-form-item>
...@@ -479,7 +489,7 @@ export default { ...@@ -479,7 +489,7 @@ export default {
getComplainDeal(complainDealId).then(response => { getComplainDeal(complainDealId).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改投诉处置"; this.title = "投诉处置详情";
var statusName = this.selectDictLabel(this.taskStateOptions, row.complainStatus); var statusName = this.selectDictLabel(this.taskStateOptions, row.complainStatus);
this.form.complainStatus=statusName; this.form.complainStatus=statusName;
}); });
......
...@@ -114,9 +114,9 @@ ...@@ -114,9 +114,9 @@
> >
<img <img
:src="item.imgurl" :src="item.imgurl"
style="margin-top: 6px;float: left; margin-right: 3px;width: 18px;height: 18px;margin-left: 10px;" style="margin-top: 8px;float: left; margin-right: 3px;width: 18px;height: 18px;margin-left: 10px;"
/> />
{{ item.name }} {{ item.name }} ({{ item.num }})
</div> </div>
</div> </div>
...@@ -365,36 +365,42 @@ export default { ...@@ -365,36 +365,42 @@ export default {
arr2: [ arr2: [
{ {
val: 10, val: 10,
num:0,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/yj-jydw.png"), imgurl: require("@/assets/image/yj-jydw.png"),
name: "救援队伍", name: "救援队伍",
}, },
{ {
val: 11, val: 11,
num:0,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/yj-wz.png"), imgurl: require("@/assets/image/yj-wz.png"),
name: "救援物资", name: "救援物资",
}, },
{ {
val: 12, val: 12,
num:0,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/yj-cl.png"), imgurl: require("@/assets/image/yj-cl.png"),
name: "救援车辆", name: "救援车辆",
}, },
{ {
val: 13, val: 13,
num:0,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/yj-yy.png"), imgurl: require("@/assets/image/yj-yy.png"),
name: "医 院", name: "医 院",
}, },
{ {
val: 15, val: 15,
num:0,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/yj-xf.png"), imgurl: require("@/assets/image/yj-xf.png"),
name: "消防队伍", name: "消防队伍",
}, },
{ {
val: 16, val: 16,
num:0,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/yj-xj.png"), imgurl: require("@/assets/image/yj-xj.png"),
name: "巡检人员", name: "巡检人员",
...@@ -478,8 +484,9 @@ export default { ...@@ -478,8 +484,9 @@ export default {
this.map = new EditorMap( this.map = new EditorMap(
"map", "map",
{ {
center: path, //center: path,
//mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758", //mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
center: [114.208007, 38.260288],
zoom: 14.5, zoom: 14.5,
}, },
this this
...@@ -536,6 +543,12 @@ export default { ...@@ -536,6 +543,12 @@ export default {
listDevice(params).then(response => { listDevice(params).then(response => {
response.rows.forEach((item) => { response.rows.forEach((item) => {
item.iconType = item.deviceType+9; item.iconType = item.deviceType+9;
if(item.deviceType<5){
this.arr2[item.deviceType-1].num++;
}else {
this.arr2[item.deviceType-2].num++;
}
}); });
this.deviceList = response.rows; this.deviceList = response.rows;
//console.log(this.deviceList) //console.log(this.deviceList)
...@@ -598,8 +611,8 @@ export default { ...@@ -598,8 +611,8 @@ export default {
this.dialogTableVisible = false; this.dialogTableVisible = false;
}, },
getPath(res){ getPath(res){
console.log("res", res); //console.log("res", res);
console.log(this.form.longitude, this.form.latitude); //console.log(this.form.longitude, this.form.latitude);
//确认选择经纬度 //确认选择经纬度
this.form.longitude = res[0]; this.form.longitude = res[0];
this.form.latitude = res[1]; this.form.latitude = res[1];
...@@ -745,12 +758,30 @@ export default { ...@@ -745,12 +758,30 @@ export default {
this.selarr1.splice(ind, 1); this.selarr1.splice(ind, 1);
} else { } else {
this.selarr1.push(item.val); this.selarr1.push(item.val);
//找中心点
console.log(item.val);
if(item.val>=10){
for(var i=0;i<this.deviceList.length;i++){
if(this.deviceList[i].iconType==item.val){
console.log(this.deviceList[i])
this.map.setZoomAndCenter(this.deviceList[i].longitude,this.deviceList[i].latitude);
break;
}
}
// this.deviceList.forEach((item2) => (
// if(item2.iconType==item.val){
//
// }
//
// ));
}
} }
this.map.allfilter(this.selarr, this.selarr1); this.map.allfilter(this.selarr, this.selarr1);
//this.map.setZoomAndCenter(14, [116.326655,39.899438]);
}, },
//用户的设备center //用户的设备center
getDetectorInfoList(httpFunc, queryParams, title) { getDetectorInfoList(httpFunc, queryParams, title) {
console.log(queryParams); //console.log(queryParams);
return httpFunc(queryParams).then((res) => { return httpFunc(queryParams).then((res) => {
// console.log("queryParams", res); // console.log("queryParams", res);
if (res.code == 200) { if (res.code == 200) {
...@@ -1009,7 +1040,7 @@ export default { ...@@ -1009,7 +1040,7 @@ export default {
.typelist-div { .typelist-div {
width: 450px; width: 450px;
height: 50px; height: 50px;
z-index: 9999; z-index: 999;
position: fixed; position: fixed;
top: 0; top: 0;
margin-top: 80px; margin-top: 80px;
...@@ -1017,16 +1048,17 @@ export default { ...@@ -1017,16 +1048,17 @@ export default {
} }
.typelist-div2{ .typelist-div2{
width: 150px; width: 150px;
height: 50px; height: 230px;
z-index: 9999; z-index: 999;
position: fixed; position: fixed;
margin-top: 80px; margin-top: 80px;
margin-left: 10px; margin-left: 10px;
background: white;
margin-left: 15px;
} }
.list { .list {
z-index: 9999; z-index: 9999;
float: left; float: left;
margin-left: 15px;
color: #000000; color: #000000;
line-height: auto; line-height: auto;
background: #ffffff; background: #ffffff;
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row,scope.$index)" @click="viewDetail(scope.row,scope.$index)"
v-if="isView" v-if="isView"
>详情</el-button> >详情</el-button>
<el-button <el-button
...@@ -236,6 +236,19 @@ export default { ...@@ -236,6 +236,19 @@ export default {
this.title = "新增隐患信息" this.title = "新增隐患信息"
this.hiddenOpen = true; this.hiddenOpen = true;
}, },
/** 详情按钮操作 */
viewDetail(row,index) {
this.reset();
this.index = index;
this.hiddenForm = {...row};
this.title = "查看隐患信息"
this.hiddenOpen = true;
if (this.hiddenForm.pictureUrl) {
this.fileList.push({
url: this.hiddenForm.pictureUrl,
});
}
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row,index) { handleUpdate(row,index) {
this.reset(); this.reset();
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-25 17:15:31 * @Date: 2022-03-25 17:15:31
* @LastEditTime: 2022-03-26 17:12:04 * @LastEditTime: 2022-03-29 10:09:52
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData/CzCard.vue * @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData/CzCard.vue
...@@ -9,21 +9,24 @@ ...@@ -9,21 +9,24 @@
<template> <template>
<div class="czcard"> <div class="czcard">
<my-collapse title="场站" ref="myCollapse"> <my-collapse
title="场站"
ref="myCollapse"
:listNum="czList.filter((item) => item.show).length"
>
<template v-slot:chackbox> <template v-slot:chackbox>
<div class="filter" v-for="item in filterList" :key="item.value"> <FilterVue
<span :filterList="filterList"
class="text" @fliterTypeChange="fliterTypeChange"
:class="{ active: deviceTypeArr.indexOf(item.type) >= 0 }" />
@click="fliterTypeChange(item)"
>{{ item.value }}</span
>
<span class="number">({{ item.count }})</span>
</div>
</template> </template>
<template #container> <template #container>
<div class="container" :class="{ start: getShowNum }"> <div class="container" :class="{ start: getShowNum }">
<div v-for="item in czList" :key="item.deviceName" v-show="item.show"> <div
v-for="(item, index) in czList"
:key="item.deviceName + index"
v-show="item.show"
>
<CzItem ref="czItem" :list="item" v-if="item.show" /> <CzItem ref="czItem" :list="item" v-if="item.show" />
</div> </div>
</div> </div>
...@@ -35,29 +38,31 @@ ...@@ -35,29 +38,31 @@
<script> <script>
import MyCollapse from "./MyCollapse"; import MyCollapse from "./MyCollapse";
import CzItem from "./CzItem"; import CzItem from "./CzItem";
import FilterVue from "./FilterVue";
export default { export default {
// 场站
components: { components: {
MyCollapse, MyCollapse,
CzItem, CzItem,
FilterVue,
}, },
data() { data() {
return { return {
carHide: true, carHide: true,
addStartNum: 3, addStartNum: 3,
filterList: [ filterList: [
{ value: "全部", count: 100, type: "all" },
{ value: "加气站", count: 100, type: 1 }, { value: "加气站", count: 100, type: 1 },
{ value: "加气站1", count: 100, type: 2 }, { value: "门站", count: 100, type: 2 },
{ value: "加气站2", count: 100, type: 3 }, { value: "调压站", count: 100, type: 3 },
{ value: "加气站3", count: 100, type: 4 }, { value: "储备站", count: 100, type: 4 },
{ value: "加气站4", count: 100, type: 5 }, { value: "气化站", count: 100, type: 5 },
{ value: "加气站5", count: 100, type: 6 },
{ value: "加气站7", count: 100, type: 7 },
], ],
deviceTypeArr: [1, 2, 3, 4, 5, 6, 7], deviceTypeArr: [1, 2, 3, 4, 5],
czList: [ czList: [
{ {
deviceName: "加气站a", deviceName: "加气站",
state: 1, state: 1,
a: 25, a: 25,
b: 56, b: 56,
...@@ -69,8 +74,8 @@ export default { ...@@ -69,8 +74,8 @@ export default {
type: 1, type: 1,
}, },
{ {
deviceName: "加气站b", deviceName: "门站",
state: 1, state: 2,
a: 25, a: 25,
b: 56, b: 56,
c: 54, c: 54,
...@@ -81,7 +86,7 @@ export default { ...@@ -81,7 +86,7 @@ export default {
type: 2, type: 2,
}, },
{ {
deviceName: "加气站c", deviceName: "调压站",
state: 1, state: 1,
a: 25, a: 25,
b: 56, b: 56,
...@@ -93,7 +98,7 @@ export default { ...@@ -93,7 +98,7 @@ export default {
type: 3, type: 3,
}, },
{ {
deviceName: "加气站d", deviceName: "储备站",
state: 1, state: 1,
a: 25, a: 25,
b: 56, b: 56,
...@@ -105,7 +110,7 @@ export default { ...@@ -105,7 +110,7 @@ export default {
type: 4, type: 4,
}, },
{ {
deviceName: "加气站e", deviceName: "气化站",
state: 1, state: 1,
a: 25, a: 25,
b: 56, b: 56,
...@@ -114,10 +119,10 @@ export default { ...@@ -114,10 +119,10 @@ export default {
e: 56, e: 56,
image: "", image: "",
show: true, show: true,
type: 4, type: 5,
}, },
{ {
deviceName: "加气站f", deviceName: "气化站",
state: 1, state: 1,
a: 25, a: 25,
b: 56, b: 56,
...@@ -126,10 +131,10 @@ export default { ...@@ -126,10 +131,10 @@ export default {
e: 56, e: 56,
image: "", image: "",
show: true, show: true,
type: 4, type: 5,
}, },
{ {
deviceName: "加气站g", deviceName: "储备站",
state: 1, state: 1,
a: 25, a: 25,
b: 56, b: 56,
...@@ -140,7 +145,6 @@ export default { ...@@ -140,7 +145,6 @@ export default {
show: true, show: true,
type: 4, type: 4,
}, },
], ],
}; };
}, },
...@@ -156,6 +160,7 @@ export default { ...@@ -156,6 +160,7 @@ export default {
methods: { methods: {
hide() { hide() {
this.carHide = !this.carHide; this.carHide = !this.carHide;
// this.myCollapse();
}, },
// 根据父子元素自动计算是否需要添加值start // 根据父子元素自动计算是否需要添加值start
changeAddStartNum() { changeAddStartNum() {
...@@ -177,18 +182,16 @@ export default { ...@@ -177,18 +182,16 @@ export default {
}, },
//过滤选择 //过滤选择
fliterTypeChange(data) { fliterTypeChange(data) {
const { type } = data; this.filter([...data]);
const index = this.deviceTypeArr.indexOf(type); // 改变大小,因为动画原因加个延迟
if (index >= 0) { // this.$nextTick(() => {
this.deviceTypeArr.splice(index, 1); // setTimeout(()=>{
} else { // this.myCollapse()
this.deviceTypeArr.push(type); // }, 300);
} // });
this.filter(this.deviceTypeArr); },
// 改变大小 myCollapse() {
this.$nextTick(() => { // this.$refs.myCollapse.getHeight();
this.$refs.myCollapse.getHeight();
});
}, },
// 过滤对象 // 过滤对象
filter(arr) { filter(arr) {
...@@ -206,24 +209,7 @@ export default { ...@@ -206,24 +209,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.filter {
margin-right: 12px;
margin-top: 5px;
font-size: 14px;
.text {
cursor: pointer;
&:hover {
color: #06d7b189 !important;
}
&.active {
color: #06d7b1;
}
}
.number {
font-weight: 500;
color: #1890ff;
}
}
.container { .container {
width: 100%; width: 100%;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -236,9 +222,13 @@ export default { ...@@ -236,9 +222,13 @@ export default {
} }
& > div { & > div {
margin-bottom: 20px; margin-bottom: 20px;
margin-left:1%; margin-left: 1%;
width: 24%; width: 24%;
min-width: 295px; min-width: 295px;
border: 1px solid #e6ebf5;
border-radius: 4px;
box-sizing: border-box;
} }
} }
.flex { .flex {
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-26 10:27:00 * @Date: 2022-03-26 10:27:00
* @LastEditTime: 2022-03-26 16:38:29 * @LastEditTime: 2022-03-28 18:03:04
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData/CzItem.vue * @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData/CzItem.vue
--> -->
<template> <template>
<div class="czitem flex"> <div class="czitem flex" :class="{nopadding:changeStyle}">
<div class="left"> <div class="left">
<div class="img"> <div class="img">
<div class="state"> <div class="state" :class="{active1:list.state=='1',active2:list.state=='2',active3:list.state=='3'}">
{{ list.state == "0" ? "正常" : "报警" }} {{ stateType[list.state] }}
</div> </div>
<img v-if="list.src" src="" alt="" /> <img v-if="list.src" src="" alt="" />
暂无图片 暂无图片
</div> </div>
<div v-unValue class="device-name zzz">{{ list.deviceName }}</div> <div v-if="!changeStyle" v-unValue class="device-name zzz">{{ list.deviceName }}</div>
</div> </div>
<div class="right"> <div class="right">
<div>温度:<span :class="{active:list.a>50}">{{list.a}}°C</span></div> <div>
<div>水温:<span :class="{active:list.b>50}">{{list.b}}°C</span></div> 温度:<span :class="{ active: list.a > 50 }">{{ list.a }}°C</span>
<div>压力:<span :class="{active:list.c>50}">{{list.c}}Pa</span></div> </div>
<div>湿度:<span :class="{active:list.d>50}">{{list.d}}°C</span></div> <div>
<div>水温:<span :class="{active:list.e>50}">{{list.e}}°C</span></div> 水温:<span :class="{ active: list.b > 50 }">{{ list.b }}°C</span>
</div>
<div>
压力:<span :class="{ active: list.c > 50 }">{{ list.c }}Pa</span>
</div>
<div>
湿度:<span :class="{ active: list.d > 50 }">{{ list.d }}°C</span>
</div>
<div>
水温:<span :class="{ active: list.e > 50 }">{{ list.e }}°C</span>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
// 场站子组件
props: { props: {
list: { list: {
type: Object, type: Object,
}, },
// 从外部传一个值,来改变一些样式
changeStyle:{
type:Boolean,
default:false,
},
stateType:{
type:Object,
default:()=>({"1":"正常",2:"报警"})
}
}, },
}; };
</script> </script>
...@@ -46,8 +68,6 @@ export default { ...@@ -46,8 +68,6 @@ export default {
min-height: 191px; min-height: 191px;
padding: 14px 12px 18px 25px; padding: 14px 12px 18px 25px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 4px;
border: 1px solid #e6ebf5;
// display: flex; // display: flex;
.left { .left {
// margin-right: 48px; // margin-right: 48px;
...@@ -73,6 +93,15 @@ export default { ...@@ -73,6 +93,15 @@ export default {
line-height: 28px; line-height: 28px;
color: #06d7b1; color: #06d7b1;
font-size: 14px; font-size: 14px;
&.active1 {
color: #06d7b1;
}
&.active2 {
color: #FF6C68;
}
&.active3 {
color: #bbbbbb;
}
} }
img { img {
width: 100%; width: 100%;
...@@ -90,7 +119,7 @@ export default { ...@@ -90,7 +119,7 @@ export default {
min-width: 80px; min-width: 80px;
& > div { & > div {
margin-bottom: 10px; margin-bottom: 10px;
span.active{ span.active {
color: red; color: red;
} }
} }
...@@ -100,4 +129,8 @@ export default { ...@@ -100,4 +129,8 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.nopadding{
padding-bottom:0 !important;
min-height:170px;
}
</style> </style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2022-03-29 09:41:23
* @LastEditTime: 2022-03-29 11:08:25
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData/Filter.vue
-->
<template>
<div class="fliter-vue">
<div class="filter" v-for="(item, index) in filterList" :key="item.value">
<!-- 全部 -->
<template v-if="index == 0">
<span
class="text"
:class="{
active: deviceTypeArr.length == filterList.length - 1
}"
@click="fliterTypeChange(item)"
>{{ item.value }}
<i class="iconfont icon-bingo"></i>
</span>
<span class="number">({{ item.count }})</span>
</template>
<template v-else>
<span
class="text"
:class="{ active: deviceTypeArr.indexOf(item.type) >= 0 }"
@click="fliterTypeChange(item)"
>{{ item.value }}
<i class="iconfont icon-bingo"></i>
</span>
<span class="number">({{ item.count }})</span>
</template>
</div>
</div>
</template>
<script>
export default {
data() {
return {
deviceTypeArr: [],
allArray: [],
};
},
props: {
// 传进来的参数
filterList: Array,
},
created() {
this.deviceTypeArr = this.filterList
.filter((item) => item.type > 0)
.map((item) => item.type);
// 全选时的数组内容
this.allArray = [...this.deviceTypeArr];
},
methods: {
fliterTypeChange(data) {
const { type } = data;
// 如果点的是全选
if (type == "all") {
if (this.deviceTypeArr.length == this.filterList.length - 1) {
this.deviceTypeArr = [];
} else {
this.deviceTypeArr = [...this.allArray];
}
} else {
const index = this.deviceTypeArr.indexOf(type);
if (index >= 0) {
this.deviceTypeArr.splice(index, 1);
} else {
this.deviceTypeArr.push(type);
}
}
this.$emit("fliterTypeChange", [...this.deviceTypeArr]);
},
},
};
</script>
<style lang="scss" scoped>
.fliter-vue {
display: flex;
}
.filter {
margin-right: 30px;
margin-top: 5px;
font-size: 14px;
.text {
cursor: pointer;
position: relative;
.iconfont {
font-size: 10px;
position: absolute;
left: -12px;
top: 0px;
color: rgba(0, 0, 0, 0);
}
&:before {
content: "";
position: absolute;
width: 10px;
height: 10px;
border: 1px solid #000000;
left: -12px;
top: 50%;
margin-top: -5px;
}
&:hover {
.iconfont {
font-size: 10px;
position: absolute;
left: -12px;
color: rgba(0, 0, 0, .5);
}
}
&.active {
.iconfont {
font-size: 10px;
position: absolute;
left: -12px;
color: rgba(0, 0, 0, 1);
}
}
}
.number {
font-weight: 500;
color: #1890ff;
}
}
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2022-03-29 09:41:23
* @LastEditTime: 2022-03-29 11:14:11
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData/Filter.vue
-->
<template>
<div class="fliter-vue">
<div
class="filter"
v-for="(item, index) in filterList"
:key="item.value"
:class="`one-${item.state}`"
>
<!-- 全部 -->
<template v-if="index == 0">
<span
class="text"
@click="fliterTypeChange(item)"
:class="{ active: deviceTypeArr.length == filterList.length - 1}"
>{{ item.value }}
<i class="iconfont icon-bingo"></i>
</span>
<span class="number">({{ item.count }})</span>
</template>
<template v-else>
<span
class="text"
:class="{ active: deviceTypeArr.indexOf(item.state) >= 0 }"
@click="fliterTypeChange(item)"
>{{ item.value }}
<i class="iconfont icon-bingo"></i>
</span>
<span class="number">({{ item.count }})</span>
</template>
</div>
</div>
</template>
<script>
export default {
data() {
return {
deviceTypeArr: [],
allArray: [],
};
},
props: {
// 传进来的参数
filterList: Array,
},
created() {
this.deviceTypeArr = this.filterList
.filter((item) => item.state > 0)
.map((item) => item.state);
// 全选时的数组内容
this.allArray = [...this.deviceTypeArr];
},
methods: {
fliterTypeChange(data) {
const { state } = data;
// 如果点的是全选
if (state == "all") {
if (this.deviceTypeArr.length == this.filterList.length - 1) {
this.deviceTypeArr = [];
} else {
this.deviceTypeArr = [...this.allArray];
}
} else {
const index = this.deviceTypeArr.indexOf(state);
if (index >= 0) {
this.deviceTypeArr.splice(index, 1);
} else {
this.deviceTypeArr.push(state);
}
}
this.$emit("fliterTypeChange", [...this.deviceTypeArr]);
},
},
};
</script>
<style lang="scss" scoped>
$one: #06d7b1 !important;
$two: #ff6c68 !important;
$three: #bbbbbb !important;
$all: #000000;
.fliter-vue {
display: flex;
}
.filter {
margin-right: 30px;
margin-top: 5px;
font-size: 14px;
.text {
cursor: pointer;
position: relative;
.iconfont {
font-size: 10px;
position: absolute;
left: -12px;
top: 0px;
color: rgba(0, 0, 0, 0);
}
&:before {
content: "";
position: absolute;
width: 10px;
height: 10px;
border: 1px solid #000000;
left: -12px;
top: 50%;
margin-top: -5px;
}
&:hover {
.iconfont {
font-size: 10px;
position: absolute;
left: -12px;
color: rgba(0, 0, 0, .5);
}
}
&.active {
.iconfont {
font-size: 10px;
position: absolute;
left: -12px;
color: rgba(0, 0, 0, 1);
}
}
}
.number {
font-weight: 500;
color: #1890ff !important;
}
&.one-all {
.number,
.text {
color: $all;
}
}
&.one-1 {
.number,
.text {
color: $one;
}
}
&.one-2 {
.number,
.text {
color: $two;
}
}
&.one-3 {
.number,
.text {
color: $three;
}
}
}
</style>
\ No newline at end of file
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-25 17:15:31 * @Date: 2022-03-25 17:15:31
* @LastEditTime: 2022-03-26 15:33:25 * @LastEditTime: 2022-03-29 10:12:49
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData/CzCard.vue * @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData/CzCard.vue
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
> >
<div class="title flex"> <div class="title flex">
<div class="left"> <div class="left">
<div class="device">{{title}}</div> <div class="device">{{ title }}</div>
<slot name="chackbox" /> <slot name="chackbox" />
</div> </div>
<div class="right"> <div class="right">
...@@ -28,7 +28,11 @@ ...@@ -28,7 +28,11 @@
</div> </div>
</div> </div>
<div ref="container"> <div ref="container">
<slot name="container" /> <transition name="fade" mode="out-in">
<div :key="listNum">
<slot name="container" />
</div>
</transition>
</div> </div>
</div> </div>
</div> </div>
...@@ -38,16 +42,22 @@ ...@@ -38,16 +42,22 @@
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
props:{ props: {
title:String, title: String,
// 动画需求
listNum: {
type: Number,
default: "1",
},
}, },
data() { data() {
return { return {
carHide: true, carHide: true,
transitionHeight: "60px", transitionHeight: "60px",
}; };
}, },
computed: { computed: {
...mapGetters(["sidebar"]), ...mapGetters(["sidebar"]),
}, },
...@@ -56,25 +66,32 @@ export default { ...@@ -56,25 +66,32 @@ export default {
setTimeout(this.getHeight, 200); setTimeout(this.getHeight, 200);
// this.getHeight(); // this.getHeight();
}, },
listNum(val) {
console.log(val);
setTimeout(() => {
this.getHeight();
}, 300);
},
}, },
mounted() { mounted() {
this.getHeight(); this.getHeight();
}, },
methods: { methods: {
hide() { hide() {
this.carHide = !this.carHide; this.carHide = !this.carHide;
this.getHeight();
}, },
getHeight() { getHeight() {
const { height } = this.$refs?.container?.getBoundingClientRect(); const { height } = this.$refs?.container?.getBoundingClientRect();
if(!height){ // if (!height) {
return;
} // return;
// }
// 高度必须是一个指定的值才能过渡变化,这样就计算出了整个元素的指定高度,然后赋值 // 高度必须是一个指定的值才能过渡变化,这样就计算出了整个元素的指定高度,然后赋值
if (height > 0) { if (height > 0) {
this.transitionHeight = height + 60 + 18 + "px"; this.transitionHeight = height + 60 + 18 + "px";
}else{ } else {
this.transitionHeight="60px"; this.transitionHeight = "60px";
} }
}, },
}, },
...@@ -82,6 +99,13 @@ export default { ...@@ -82,6 +99,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
transition: all 0.25s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
.card { .card {
transition: all 0.5s; transition: all 0.5s;
// height: 212px; // height: 212px;
...@@ -92,12 +116,12 @@ export default { ...@@ -92,12 +116,12 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 15px 22px 18px 22px; padding: 15px 22px 18px 22px;
overflow: hidden; overflow: hidden;
margin-bottom:20px; margin-bottom: 20px;
&.hide { &.hide {
height: 60px !important; height: 60px !important;
} }
.title { .title {
margin-bottom: 12px; margin-bottom: 16px;
margin-left: 40px; margin-left: 40px;
.left { .left {
display: flex; display: flex;
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-25 13:46:23 * @Date: 2022-03-25 13:46:23
* @LastEditTime: 2022-03-26 17:15:43 * @LastEditTime: 2022-03-28 15:05:04
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData.vue * @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/component/charsData.vue
...@@ -46,6 +46,8 @@ export default { ...@@ -46,6 +46,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.chars-data { .chars-data {
padding: 26px 108px 0 88px; // padding: 26px 108px 0 88px;
padding: 20px;
padding-right: 50px;
} }
</style> </style>
\ No newline at end of file
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-03-08 17:28:57 * @Date: 2022-03-08 17:28:57
* @LastEditTime: 2022-03-25 15:27:44 * @LastEditTime: 2022-03-28 17:20:55
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/index.vue * @FilePath: /gassafety-progress/gassafetyprogress-web/src/views/operationMonitor/monitorData/index.vue
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
@click="isComChange(index)" @click="isComChange(index)"
></div> ></div>
</div> </div>
<component :is="currentTabComponent"></component> <transition name="fade-transform" mode="out-in">
<keep-alive>
<component :is="currentTabComponent"></component>
</keep-alive>
</transition>
</div> </div>
</template> </template>
...@@ -50,7 +54,7 @@ export default { ...@@ -50,7 +54,7 @@ export default {
display: flex; display: flex;
justify-content: right; justify-content: right;
margin-right: 37px; margin-right: 37px;
padding-top: 38px; padding-top: 15px;
div { div {
cursor: pointer; cursor: pointer;
padding: 4px; padding: 4px;
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="设备名称" prop="deviceName"> <el-form-item label="设备名称" prop="deviceName">
<el-input <el-input
v-model="queryParams.deviceName" v-model="queryParams.deviceName"
...@@ -19,18 +25,17 @@ ...@@ -19,18 +25,17 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="所在地址" prop="deviceAddr">-->
<!-- <el-input-->
<!-- v-model="queryParams.deviceAddr"-->
<!-- placeholder="请输入所在地址"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -365,7 +370,7 @@ ...@@ -365,7 +370,7 @@
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="设备类型" prop="deviceType"> <el-form-item label="设备类型" prop="deviceType">
<el-select v-model="form.deviceType" placeholder="请选择设备类型" style="width: 100%"> <el-select v-model="form.deviceType" placeholder="请选择设备类型">
<el-option label="阀井" value="1" /> <el-option label="阀井" value="1" />
<el-option label="调压箱" value="2" /> <el-option label="调压箱" value="2" />
</el-select> </el-select>
...@@ -374,7 +379,7 @@ ...@@ -374,7 +379,7 @@
<el-col :span="11"> <el-col :span="11">
<el-form-item label="权属单位" prop="beyondEnterpriseId"> <el-form-item label="权属单位" prop="beyondEnterpriseId">
<el-select v-model="form.beyondEnterpriseId" style="width: 100%" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable> <el-select v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable>
<el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId"> <el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
</el-option> </el-option>
</el-select> </el-select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment