123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391 |
- <!--疏散路线-->
- <template>
- <div class="app-container emergencyEvacuation">
- <div class="emergencyEvacuation-page scrollbar-box" v-if="pageType == 1">
- <div class="top-title-box">
- 环境学院-祈福楼
- <!--<i class="el-icon-arrow-down"></i>-->
- </div>
- <div class="for-button-box">
- <div class="for-button-min-box" :class="buttonIndex == index ?'button-one':'button-two'" v-for="(item,index) in buttonList" :key="index">{{item.name}}</div>
- <div class="for-button-null-box"></div>
- <div class="for-button-right-box button-one" @click="pageTypeClick(2)" v-hasPermi="['laboratory:line:add']">新增疏散路线</div>
- </div>
- <div class="map-big-box">
- <div class="map-min-box">
- <div class="map-min-for-box" v-for="(item,index) in fjList" :key="index">
- {{item.room}}
- </div>
- <img class="map-min-img" src="@/assets/ZDimages/icon_sjt.gif">
- <img class="map-min-img" src="@/assets/ZDimages/icon_yjt.gif">
- <img class="map-min-img" src="@/assets/ZDimages/icon_zjt.gif">
- <img class="map-min-img" src="@/assets/ZDimages/icon_yjt.gif">
- <img class="map-min-img" src="@/assets/ZDimages/icon_zjt.gif">
- <img class="map-min-img" src="@/assets/ZDimages/icon_yjt.gif">
- </div>
- </div>
- <div class="table-box">
- <el-table v-loading="loading" border :data="routeList">
- <el-table-column label="路径类别" align="left" prop="lightDirection" width="200">
- <template slot-scope="scope">
- {{scope.row.lightDirection == 1?'向左疏散':(scope.row.lightDirection == 2?'向右疏散':'')}}
- </template>
- </el-table-column>
- <el-table-column label="实验室" align="left" prop="subNames"/>
- <el-table-column label="指示灯数量" align="left" prop="labExitLineJoinList.length" width="200"/>
- <el-table-column label="操作" align="center" width="160" v-if="tableButtonType">
- <template slot-scope="scope">
- <div class="button-box">
- <p class="table-min-button"
- v-hasPermiAnd="['laboratory:line:query','laboratory:line:edit']"
- @click="laboratoryLine(scope.row)"
- >编辑</p>
- <p class="table-min-button"
- v-hasPermi="['laboratory:line:remove']"
- @click="delButton(scope.row)"
- >移除</p>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <pagination :page-sizes="[20, 30, 40, 50]"
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- </div>
- </div>
- <add-page v-if="pageType == 2" :propsData="propsData"></add-page>
- </div>
- </template>
- <script>
- import { buildIdList,lablayout,laboratoryLine,laboratoryLineDel,getRedis } from "@/api/laboratory/emergencyEvacuation";
- import addPage from './addPage.vue'
- export default {
- components:{
- addPage
- },
- name: "emergencyEvacuation",
- data() {
- return {
- tableButtonType:this.hasPermiDom(['laboratory:line:query','laboratory:line:edit','laboratory:line:remove']),
- pageType:1,
- buttonList:[
- {name:"环境与气象研究所",}
- ],
- buttonIndex:0,
- fjList:[],
- queryParams:{
- pageNum:1,
- pageSize:20,
- },
- routeList:[],
- loading:false,
- total:0,
- //组件传参数据
- propsData:{}
- }
- },
- created() {
- },
- mounted(){
- this.getList();
- this.lablayout();
- },
- methods: {
- //删除按钮
- delButton(item){
- let self = this;
- this.$confirm('是否确认删除?', "", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- self.delItem(item);
- }).then(() => {}).catch(() => {});
- },
- //删除路线
- delItem(item){
- laboratoryLineDel(item.id).then(response => {
- this.msgSuccess("操作成功");
- this.getList();
- });
- },
- //根据学院获取层数据
- lablayout(){
- let self = this;
- let id = 137;
- lablayout(id).then(response => {
- for(let i=0;i<response.data.length;i++){
- if(response.data[i].id == 5){
- self.fjList = response.data[i].list;
- }
- }
- });
- },
- //获取层线路
- getList(){
- let id = 5;
- buildIdList(id).then(response => {
- this.routeList = response.rows;
- this.total = response.total;
- });
- },
- //获取路线详情
- laboratoryLine(item){
- laboratoryLine(item.id).then(response => {
- console.log("resp",response)
- this.$set(this,'propsData',response.data)
- this.pageType = 2;
- });
- },
- //切换页面状态
- pageTypeClick(type){
- if(type == 1){
- this.pageType = 1;
- this.getList();
- }else if(type == 2){
- this.$set(this,'propsData',{});
- this.pageType = 2;
- }
- },
- }
- };
- </script>
- <style scoped lang="scss">
- .emergencyEvacuation{
- flex:1;
- display: flex;
- flex-direction: column;
- overflow: hidden !important;
- .emergencyEvacuation-page{
- flex:1;
- display: flex;
- flex-direction: column;
- overflow-y: scroll;
- box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
- border-radius:10px;
- .top-title-box{
- height:80px;
- line-height:80px;
- margin:0 46px;
- border-bottom:1px solid #E0E0E0;
- color:#0045AF;
- font-size:18px;
- i{
- margin-left:18px;
- }
- }
- .for-button-box{
- margin:36px 86px 26px;
- display: flex;
- .for-button-min-box{
- margin-right:20px!important;
- }
- .for-button-null-box{
- flex:1;
- }
- .for-button-right-box{
- }
- .button-one{
- font-size:14px;
- cursor:pointer;
- display: inline-block;
- text-align: center;
- padding:0 20px;
- height: 40px;
- line-height:40px;
- border-radius: 6px;
- border: 1px solid #0045af;
- color:#ffffff;
- background:#0045af;
- margin:0;
- }
- .button-two{
- font-size:14px;
- cursor:pointer;
- display: inline-block;
- text-align: center;
- padding:0 20px;
- height: 40px;
- line-height:40px;
- border-radius: 6px;
- border: 1px solid #DCDFE6;
- color:#606266;
- font-size: 14px;
- background:#ffffff;
- margin:0;
- }
- }
- .map-big-box{
- width:1410px;
- height:545px;
- margin:0 auto;
- border:1px solid #E0E0E0;
- margin-bottom:20px;
- .map-min-box{
- height:505px;
- width:1133px;
- margin:20px auto;
- background: url("../../../../assets/ZDimages/icon_bj_syspmtcy_jinan.png");
- position: relative;
- .map-min-for-box{
- overflow: hidden;
- display: inline-block;
- line-height:150px;
- text-align: center;
- }
- .map-min-for-box:nth-child(1){
- margin:4px 143px 0 0;
- width:162px;
- height:162px;
- }
- .map-min-for-box:nth-child(2){
- margin:4px 0 0 0;
- width:101px;
- height:162px;
- }
- .map-min-for-box:nth-child(3){
- margin:4px 0 0 0;
- width:101px;
- height:162px;
- }
- .map-min-for-box:nth-child(4){
- margin:4px 0 0 0;
- width:100px;
- height:162px;
- }
- .map-min-for-box:nth-child(5){
- margin:4px 0 0 0;
- width:100px;
- height:162px;
- }
- .map-min-for-box:nth-child(6){
- margin:4px 0 0 0;
- width:100px;
- height:162px;
- }
- .map-min-for-box:nth-child(7){
- margin:4px 0 0 0;
- width:100px;
- height:162px;
- }
- .map-min-for-box:nth-child(8){
- margin:4px 60px 0 0;
- width:100px;
- height:162px;
- }
- .map-min-for-box:nth-child(9){
- margin: 90px 0 0 0;
- width: 92px;
- height: 240px;
- line-height:230px;
- }
- .map-min-for-box:nth-child(10){
- margin: 90px 0 0 0;
- width: 107px;
- height: 240px;
- line-height:230px;
- }
- .map-min-for-box:nth-child(11){
- margin: 90px 0 0 0;
- width: 107px;
- height: 240px;
- line-height:230px;
- }
- .map-min-for-box:nth-child(12){
- margin: 90px 0 0 0;
- width: 100px;
- height: 240px;
- line-height:230px;
- }
- .map-min-for-box:nth-child(13){
- margin: 90px 0 0 0;
- width: 100px;
- height: 240px;
- line-height:230px;
- }
- .map-min-for-box:nth-child(14){
- margin: 90px 0 0 0;
- width: 100px;
- height: 240px;
- line-height:230px;
- }
- .map-min-for-box:nth-child(15){
- margin: 90px 0 0 0;
- width: 100px;
- height: 240px;
- line-height:230px;
- }
- .map-min-for-box:nth-child(16){
- margin: 90px 0 0 0;
- width: 100px;
- height: 240px;
- line-height:230px;
- }
- .map-min-for-box:nth-child(17){
- margin: 90px 0 0 0;
- width: 100px;
- height: 240px;
- line-height:230px;
- }
- .map-min-for-box:nth-child(18){
- margin: 90px 60px 0 0;
- width: 100px;
- height: 240px;
- line-height:230px;
- }
- .map-min-img{
- position: absolute;
- width:40px;
- height:28px;
- }
- .map-min-img:nth-child(19){
- top: 128px;
- left: 175px;
- }
- .map-min-img:nth-child(20){
- top: 194px;
- left: 231px;
- }
- .map-min-img:nth-child(21){
- top: 194px;
- left: 540px;
- }
- .map-min-img:nth-child(22){
- top: 194px;
- left: 630px;
- }
- .map-min-img:nth-child(23){
- top: 194px;
- left: 940px;
- }
- .map-min-img:nth-child(24){
- top: 194px;
- left: 1030px;
- }
- }
- }
- .table-box{
- min-height:400px;
- display: flex;
- flex:1;
- flex-direction: column;
- margin:20px 20px;
- .button-box{
- display: flex;
- p:nth-child(1){
- margin-right:20px;
- }
- }
- }
- }
- }
- </style>
|