XAWDJ0277HWXPT2\Administrator před 5 roky
rodič
revize
c9ef557f37

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
web/css/chunk-a80ca5cc.46160fc8.css


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 1
web/css/chunk-a80ca5cc.a4dfee99.css


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
web/index.html


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 1
web/js/app.0a0a432f.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 2 - 2
web/js/app.0a0a432f.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
web/js/app.63c3d9e5.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 4
web/js/chunk-9927e514.08ae63e2.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 4 - 0
web/js/chunk-9927e514.f80f65a8.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
web/js/chunk-9927e514.08ae63e2.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 2
web/js/chunk-a80ca5cc.16e5298f.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 1
web/js/chunk-a80ca5cc.16e5298f.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 2 - 0
web/js/chunk-a80ca5cc.e5d1a661.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
web/js/chunk-a80ca5cc.e5d1a661.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 1
web/js/chunk-e4e87226.11131fc8.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 2 - 2
web/js/chunk-e4e87226.11131fc8.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
web/js/chunk-e4e87226.ccde4ff5.js.map


+ 1 - 0
webConfig/src/api/allUel.js

@@ -30,6 +30,7 @@ const urls={
 
        lampcontrolGet:'https://120.77.179.55/api/lampcontrol/get',/*设备列表*/
        lampcontrolSave:'https://120.77.179.55/api/lampcontrol/save',/*添加编辑设备*/
+       lampcontrolDel:'https://120.77.179.55/api/lampcontrol/del',/*添加编辑设备*/
        // lampcontrolDetail:'https://120.77.179.55/api/lampcontrol/detail',/*设备详情*/
        lampcontrolViewloglist:'https://120.77.179.55/api/lampcontrol/viewloglist',/*设备数据*/
        lampcontrolHistorylist:'https://120.77.179.55/api/lampcontrol/historylist',/*设备历史数据*/

+ 16 - 39
webConfig/src/api/base.js

@@ -71,15 +71,9 @@ export default{
                                         if (error) {
                                             error(data)
                                         }
-                                        if (this_.version == 1) {
-                                            this_.$alert(data.msg, 'System hints', {
-                                                confirmButtonText: 'Confirm',
-                                            });
-                                        } else {
-                                            this_.$alert(data.msg, '系统提示', {
-                                                confirmButtonText: '确认',
-                                            });
-                                        }
+                                        this_.$alert(data.msg, 'System hints', {
+                                            confirmButtonText: 'Confirm',
+                                        });
                                     }
                                     // let res = JSON.parse(event.data)
                                     if (data.data.code == 2) {
@@ -134,26 +128,20 @@ export default{
                         try {
                             // console.log(event.data)
                             let data = JSON.parse(event.data)
-                            console.log(data,'=------------')
+                            // console.log(data,'=------------')
                             if (data.code == '0000') {
                                 callback(data,websocket);
                             } else {
-                            console.log(data,'=------------')
+                            // console.log(data,'=------------')
                                 if (error) {
                                     error(data)
                                 }
-                                if (this_.version == 1) {
-                                    this_.$alert(data.msg, 'System hints', {
-                                        confirmButtonText: 'Confirm',
-                                    });
-                                } else {
-                                    this_.$alert(data.msg, '系统提示', {
-                                        confirmButtonText: '确认',
-                                    });
-                                }
+                                this_.$alert(data.msg, 'System hints', {
+                                    confirmButtonText: 'Confirm',
+                                });
                             }
                             // let res = JSON.parse(event.data)
-                            if (data.data.code == 2) {
+                            if (data.data.status == 2) {
                                 // websocket.close();
                                 // console.log('websocket链接关闭')
                             }
@@ -200,15 +188,9 @@ export default{
                                         if (error) {
                                             error(data)
                                         }
-                                        if (this_.version == 1) {
-                                            this_.$alert(data.msg, 'System hints', {
-                                                confirmButtonText: 'Confirm',
-                                            });
-                                        } else {
-                                            this_.$alert(data.msg, '系统提示', {
-                                                confirmButtonText: '确认',
-                                            });
-                                        }
+                                        this_.$alert(data.msg, 'System hints', {
+                                            confirmButtonText: 'Confirm',
+                                        });
                                     }
                                     // let res = JSON.parse(event.data)
                                     if (data.data.code == 2) {
@@ -303,15 +285,9 @@ export default{
                             // storage.setItem('loginState','false');
                             // window.location.href="login.html";
                         }
-                        if(this_.version == 1){
-                            this_.$alert(data.msg, 'System hints', {
-                              confirmButtonText: 'Confirm',
-                            });
-                        }else{
-                            this_.$alert(data.msg, '系统提示', {
-                              confirmButtonText: '确定',
-                            });
-                        }
+                        this_.$alert(data.msg, 'System hints', {
+                          confirmButtonText: 'Confirm',
+                        });
                     }
                 }
             }
@@ -451,6 +427,7 @@ export default{
         let qs = require('qs')
         data = Object.assign({
           version:this_.version,
+          role:this_.role,
         }, data);
         axios.post(url, qs.stringify(data), { params: {} }).then(res => {console.log(res)})
     },

+ 4 - 4
webConfig/src/views/GISMap.vue

@@ -2450,7 +2450,7 @@
                             if(type == 0){
                                 if(data.data.length>0){
                                     this.projectId = data.data[0].id;
-                                    this.sectionNavGet(dd.id,dd)
+                                    this.sectionNavGet(data.data[0].id,data.data[0])
                                     for(let key in data.data){
                                         this.$set(data.data[key],'isOpen',false)
                                     }
@@ -2472,7 +2472,7 @@
                                     if(data.data[0].projectList.length>0){
                                         this.projectId = data.data[0].projectList[0].id;
                                         this.$set(data.data[0].projectList[0],'isOpen',true)
-                                        this.sectionNavGet(dd.id,dd)
+                                        this.sectionNavGet(data.data[0].id,data.data[0])
                                     }else{
                                         this.projectId = null;
                                         this.deviceTotalData = {
@@ -2505,7 +2505,7 @@
                             if(type == 0){
                                 if(data.data.length>0){
                                     this.projectId = data.data[0].id;
-                                    this.sectionNavGet(dd.id,dd)
+                                    this.sectionNavGet(data.data[0].id,data.data[0])
                                     for(let key in data.data){
                                         this.$set(data.data[key],'isOpen',false)
                                     }
@@ -2527,7 +2527,7 @@
                                     if(data.data[0].projectList.length>0){
                                         this.projectId = data.data[0].projectList[0].id;
                                         this.$set(data.data[0].projectList[0],'isOpen',true)
-                                        this.sectionNavGet(dd.id,dd)
+                                        this.sectionNavGet(data.data[0].id,data.data[0])
                                     }else{
                                         this.projectId = null;
                                         this.projectId = null;

+ 620 - 46
webConfig/src/views/projectManagement.vue

@@ -27,7 +27,7 @@
                         <div class="title">
                             <div class="l_text">
                                 <span class="span1">{{detailData.projectname}}</span>
-                                <span class="span2">编号:{{detailData.number}}</span>
+                                <span class="span2">Number:{{detailData.number}}</span>
                             </div>
                             <div class="r_btn" @click="editProject()"><i class="iconfont icon-bianji"></i></div>
                         </div>
@@ -139,11 +139,26 @@
                             <div class="li" :class="{'select':status=='0' && alarmtype == '0' && offline == '0' && online == '0'}" @click="statusTypeFun('0','0','0','0')"><span>All</span></div>
                             <div class="li" :class="{'select':alarmtype == '1'}" @click="statusTypeFun('0','1','0','0')"><span>Overdischarge</span></div>
                             <div class="li" :class="{'select':alarmtype == '2'}" @click="statusTypeFun('0','2','0','0')"><span>Overpressure</span></div>
-                            <div class="li" :class="{'select':offline == '1'}" @click="statusTypeFun('0','0','1','0')"><span>offline</span></div>
-                            <div class="li" :class="{'select':online == '1'}" @click="statusTypeFun('0','0','0','1')"><span>online</span></div>
-                            <div class="li" :class="{'select':status == '1'}" @click="statusTypeFun('1','0','0','0')"><span>warning</span></div>
+                            <div class="li" :class="{'select':offline == '1'}" @click="statusTypeFun('0','0','1','0')"><span>Offline</span></div>
+                            <div class="li" :class="{'select':online == '1'}" @click="statusTypeFun('0','0','0','1')"><span>Online</span></div>
+                            <div class="li" :class="{'select':status == '1'}" @click="statusTypeFun('1','0','0','0')"><span>Warning</span></div>
+                        </div>
+                        <div class="btn" @click="batchProcessingFun('on')" v-if="batchProcessing=='off'"><i class="iconfont icon-piliangcaozuo"></i><span>Batch management</span></div>
+                        <div class="left_button" v-if="batchProcessing=='on'">
+                            <div :class="{'lampcontrol_type_select':lampcontrolOperationType=='1'}" @click="batchOperation('1')"><span>Turn-on</span></div>
+                            <div :class="{'lampcontrol_type_select':lampcontrolOperationType=='0'}" @click="batchOperation('0')"><span>Turn-off</span></div>
+
+                            <div :class="{'lampcontrol_type_select':lampcontrolOperationType=='参数'}" @click="batchOperation('参数')"><span>Parameter</span></div>
+                            <div class="dimming_slider_box" :class="{'lampcontrol_type_select':lampcontrolOperationType=='调光'}" @click="batchOperation('调光')">
+                                <span>Dimming</span>
+                                <el-slider v-model="batchDimmingVal" v-if="lampcontrolOperationType=='调光'"></el-slider>
+                                <span class="span_last" v-if="lampcontrolOperationType=='调光'">{{batchDimmingVal}}%</span>
+                            </div>
+
+                            <div :class="{'lampcontrol_type_select':lampcontrolOperationType=='3'}" @click="batchOperation('3')"><span class="del">Delete</span></div>
+                            <div :class="{'wxzzt':lampcontrolOperationType == '-1'}"><span @click="batchProcessingFun('off')" v-loading="loading.batchProcessingFun">{{lampcontrolOperationType=='参数'?'modify':'Save'}}</span></div>
+                            <div @click="batchProcessingFun('cancel')"><span>Cancel</span></div>
                         </div>
-                        <div class="btn"><i class="iconfont icon-piliangcaozuo"></i><span>Batch management</span></div>
                     </div>
                     <div class="table_top_r">
                         <div class="btn" @click="getLightList()">
@@ -193,7 +208,6 @@
                                 <img src="../img/projectManagement/Offline.png" v-if="scope.row[item.prop] == '0'" >
                             </div>
                             <div v-if="item.prop == 'lighteness'" class="Brightness">
-                                <!-- <span :style="{'position':'absolute','color':scope.row['Brightness'] >55?'rgba(255,255,255,1)':'rgba(188, 69, 2, 1)','top':'50%','left':'50%','margin-top':'-10px','margin-left':'-10px'}"></span> -->
                                 <div class="progress_outer" @click="brightnessAdjustment($event,scope.row)">
                                     <div class="progress_inner" :style="{'width':scope.row['lighteness']+'%'}">
                                     </div>
@@ -256,7 +270,7 @@
                 </div>
             </div>
         </div>
-        <div class="lamp_light_slider" v-if="lampLightSliderShow">
+        <div class="lamp_light_slider" v-show="lampLightSliderShow">
             <div class="bg" @click="lampLightSliderClose()"></div>
             <div class="box" :style="{'top':lampLightSliderPageY+'px','left':lampLightSliderPageX+'px'}">
                 <div class="div1">
@@ -987,6 +1001,8 @@
                 /*表格*/
                 tabNavList:[],
                 deviceList:[],
+                multipleSelection:[],
+                lampcontrolOperationType:'-1',
                 deviceArr:[],
                 tableConfig:{
                     label:[],
@@ -1769,6 +1785,8 @@
 
                 loading:{
                     deviceList:false,
+                    lampLightSlider:false,
+                    batchProcessingFun:false,
                 }
             }
         },
@@ -1831,20 +1849,20 @@
             this.pageSize = 10;
             // this.currentPage = 1;
 
-            this.deviceArr = [
-                {prop:'ID',label:'ID',align:'left',minWidth:60},
-                {prop:'State',label:'State',minWidth:60,type:1},
-                {prop:'Section',label:'Section',minWidth:60},
-                {prop:'Brightness',label:'Brightness',minWidth:80,type:1},
-                {prop:'Wireless',label:'Wireless',minWidth:70},
-                {prop:'Power',label:'Power',minWidth:60},
-                {prop:'Chargingstage',label:'Charging stage',minWidth:90},
-                {prop:'Voltage',label:'Voltage',minWidth:70},
-                {prop:'ElectricQuantity',label:'Electric quantity',minWidth:100},
-                {prop:'Overdischarge',label:'Overdischarge',minWidth:80},
-                {prop:'SolarPower',label:'Solar power',minWidth:70},
-                {prop:'Fault',label:'Fault',minWidth:60},
-            ];
+            // this.deviceArr = [
+            //     {prop:'ID',label:'ID',align:'left',minWidth:60},
+            //     {prop:'State',label:'State',minWidth:60,type:1},
+            //     {prop:'Section',label:'Section',minWidth:60},
+            //     {prop:'Brightness',label:'Brightness',minWidth:80,type:1},
+            //     {prop:'Wireless',label:'Wireless',minWidth:70},
+            //     {prop:'Power',label:'Power',minWidth:60},
+            //     {prop:'Chargingstage',label:'Charging stage',minWidth:90},
+            //     {prop:'Voltage',label:'Voltage',minWidth:70},
+            //     {prop:'ElectricQuantity',label:'Electric quantity',minWidth:100},
+            //     {prop:'Overdischarge',label:'Overdischarge',minWidth:80},
+            //     {prop:'SolarPower',label:'Solar power',minWidth:70},
+            //     {prop:'Fault',label:'Fault',minWidth:60},
+            // ];
             // this.deviceList = [];
             this.getCountry();
 
@@ -2231,6 +2249,484 @@
                 this.getLightList(this.currentPage);
                 this.getProjectData(this.projectId)
             },
+            /*批量处理*/
+            batchOperation(val){
+                console.log(val,this.multipleSelection.length)
+                if(this.multipleSelection.length <= '0'){
+                    this.$message({
+                      showClose: true,
+                      message:'Please select the light control',
+                      type: 'warning'
+                    });
+                }else{
+                    this.lampcontrolOperationType = val
+                    if(val == 'strategy'){
+                        baseApi.ajax_post(
+                            allUrl.strategy.policy_nav,
+                            {
+                                username:this.username,
+                                client_key:this.client_key,
+                                token:this.token,
+                                client_type:'0',
+                            },
+                            {},
+                            data =>{
+                                this.policyList = data.data.list;
+                            },
+                        this)
+                    }
+                }
+            },
+            batchProcessingFun(type){
+                let lampIds = '';
+                if(type == 'on'){
+                    this.lampcontrolOperationType = '-1';
+                    this.batchProcessing = type;
+                    this.batchDimmingVal = 0;
+                }else if(type == 'cancel'){
+                    this.batchProcessing = 'off';
+                }else{
+                    if(this.lampcontrolOperationType == '参数'){
+                        if(this.multipleSelection.length == 0){
+                            this.$message({
+                              showClose: true,
+                              message:'Please select the light control first',
+                              type: 'warning'
+                            });
+                        }else{
+                            let oldBoolean = false;
+                            let newBoolean = false;
+                            let lampBoolean = false;
+                            let catcherBoolean = false;
+                            for(let d of this.multipleSelection){
+                                if(d.lampProtocoltype == '0'){
+                                    oldBoolean = true;
+                                }else if(d.lampProtocoltype == '1'){
+                                    newBoolean = true;
+                                }
+                                if(d.loadtype == '0'){
+                                    lampBoolean = true;
+                                }else if(d.loadtype == '1'){
+                                    catcherBoolean = true;
+                                }
+                            }
+                            console.log(newBoolean,oldBoolean,lampBoolean,catcherBoolean)
+                            if(newBoolean && oldBoolean){
+                                this.$message({
+                                  showClose: true,
+                                  message:'Cannot modify both old and new controller parameters at the same time',
+                                  type: 'warning'
+                                });
+                            }else if(lampBoolean && catcherBoolean){
+                                this.$message({
+                                  showClose: true,
+                                  message:'Unable to modify street lamp and insect trap parameters at the same time.',
+                                  type: 'warning'
+                                });
+                            }else{
+                                this.monitorType = 'loadParameters';
+                                this.monitorDialog = true;
+                                this.parameterLoadIsEdit = false;
+                                this.parameterBatteryIsEdit = false;
+                                this.batchModificationParameters = false;
+                                this.loadSettingIsTrue = false;
+                                this.loading.loadSetting = true;
+                                this.batterySettingIsTrue = false;
+                                this.loading.batterySetting = true;
+                                if(oldBoolean){
+                                    this.lampProtocoltype = '0';
+                                    baseApi.ajax_post(
+                                        allUrl.device.workmode,
+                                        {
+                                            username:this.username,
+                                            client_key:this.client_key,
+                                            token:this.token,
+                                        },
+                                        {},
+                                        data =>{
+                                            this.option.workmodeList = [];
+                                            for(let key in data.data){
+                                                this.option.workmodeList.push({
+                                                    id:key,
+                                                    name:data.data[key],
+                                                })
+                                            }
+                                        },
+                                    this)
+                                    this.loadParametersData = this.loadParametersDataOld;
+                                    if(catcherBoolean){
+                                        this.loadtype = '1';
+                                        if(this.version == '0'){
+                                            this.loadParametersList = this.catcherloadParametersListOld;
+                                        }else{
+                                            this.loadParametersListEN = this.catcherloadParametersListENOld
+                                        }
+                                    }else{
+                                        this.loadtype = '0';
+                                        if(this.version == '0'){
+                                            this.loadParametersList = this.loadParametersListOld;
+                                        }else{
+                                            this.loadParametersListEN = this.loadParametersListENOld
+                                        }
+                                    }
+                                }
+                                if(newBoolean){
+                                    if(catcherBoolean){
+                                        this.lampProtocoltype = '1';
+                                        this.loadtype = '1';
+                                        this.loadParametersData = this.loadParametersDataNew;
+                                        if(this.version == '0'){
+                                            this.loadParametersList = this.catcherloadParametersListNew
+                                        }else{
+                                            this.loadParametersListEN = this.catcherloadParametersListENNew;
+                                        }
+                                    }else{
+                                        this.lampProtocoltype = '1';
+                                        this.loadtype = '0';
+                                        this.loadParametersData = this.loadParametersDataNew;
+                                        if(this.version == '0'){
+                                            this.loadParametersList = this.loadParametersListNew;
+                                        }else{
+                                            this.loadParametersListEN = this.loadParametersListENNew
+                                        }
+                                    }
+                                }
+                                for(let key in this.loadParametersData){
+                                    this.loadParametersData[key] = '';
+                                }
+                                this.lampcontrolGetData(1,data=>{
+                                    data.data.first_light_time = new Date('2018-08-06 '+data.data.first_light_time);
+                                    data.data.second_light_time = new Date('2018-08-06 '+data.data.second_light_time);
+                                    data.data.third_light_time = new Date('2018-08-06 '+data.data.third_light_time);
+                                    data.data.fourth_light_time = new Date('2018-08-06 '+data.data.fourth_light_time);
+                                    data.data.fifth_light_time = new Date('2018-08-06 '+data.data.fifth_light_time);
+                                    data.data.sixth_light_time = new Date('2018-08-06 '+data.data.sixth_light_time);
+                                    data.data.seventh_light_time = new Date('2018-08-06 '+data.data.seventh_light_time);
+                                    data.data.eighth_light_time = new Date('2018-08-06 '+data.data.eighth_light_time);
+                                    data.data.ninth_light_time = new Date('2018-08-06 '+data.data.ninth_light_time);
+                                    data.data.tenth_light_time = new Date('2018-08-06 '+data.data.tenth_light_time);
+                                    for(let key in data.data){
+                                        this.loadParametersData[key] = data.data[key]
+                                    }
+                                    this.loadParametersDataHC = Object.assign({},this.loadParametersData);
+                                    this.loadSettingIsTrue = true;
+                                    this.loading.loadSetting = false;
+                                })
+                                this.lampcontrolGetData(2,data=>{
+                                    console.log(data)
+                                    for(let key in data.data){
+                                        this.batteryParametersData[key] = data.data[key]
+                                    }
+                                    this.batteryParametersDataHC = Object.assign({},this.batteryParametersData)
+                                    this.batteryParametersDataHC.type = '默认';
+                                    this.batterySettingIsTrue = true;
+                                    this.loading.batterySetting = false;
+                                })
+                            }
+                        }
+                    }else if(this.lampcontrolOperationType == '调光'){
+                        if(this.multipleSelection.length == 0){
+                            this.$message({
+                              showClose: true,
+                              message:'Please select the light control',
+                              type: 'warning'
+                            });
+                        }else{
+                            /*灯控调光*/
+                            let this_ = this;
+                            let i = 0;
+                            // let key = 0;
+                            this.giveCommandDialog = true;
+                            this.giveCommandZS = this.multipleSelection.length;
+                            this.giveCommandCG = 0;
+                            this.giveCommandJD = 0;
+                            this.giveCommandJournal = [];
+                            let ids = '';
+                            let ids_length = this.multipleSelection.length;
+                            for(let d of this.multipleSelection){
+                                if(ids == ''){
+                                    ids = d.id;
+                                }else{
+                                    ids+=','+d.id;
+                                }
+                            }
+                            this_.loading.batchProcessingFun = true;
+
+                            baseApi.websocket1(allUrl.home.wss,data=>{
+                                if(data.data.status == '1'){
+                                    baseApi.ajax_post_ws(
+                                        allUrl.gisMap.lampcontrolDimming,
+                                        {
+                                            username:this_.username,
+                                            client_key:this_.client_key,
+                                            token:this_.token,
+                                            lamp_id:ids,
+                                            type:'1',
+                                            lightness:this_.batchDimmingVal,
+                                            mode:'0',
+                                            clientid:data.data.clientid,
+                                        },
+                                        this_,
+                                    )
+                                }
+                                if(data.data.status == '2'){
+                                    if(data.data.code == '0000'){
+                                        console.log(1,'--')
+                                        this_.$notify({
+                                          title: 'Successful operation',
+                                          message: 'lamp '+data.data.data.number,
+                                          type: 'success'
+                                        });
+                                        this_.giveCommandJournal.push({
+                                            time:this_.GMTToZero2(new Date()),
+                                            text:data.data.msg,
+                                            number:data.data.data.number,
+                                            type:true
+                                        })
+                                        i++;
+                                        this_.giveCommandCG ++;
+                                        this_.giveCommandJD = i;
+
+                                        if(i >= ids_length){
+                                            this_.loading.batchProcessingFun = false;
+                                            this_.batchProcessing = type;
+                                            this_.getData(this_.currentPage);
+                                            websocket.close();
+                                        }
+                                    }else{
+                                        this_.$notify.error({
+                                          title: 'Operation failed',
+                                          message: 'Lamp '+data.data.data.number+':'+data.data.msg
+                                        });
+                                        this_.giveCommandJournal.push({
+                                            time:this_.GMTToZero2(new Date()),
+                                            text:data.data.msg,
+                                            number:data.data.data.number,
+                                            type:false
+                                        })
+                                        i++;
+                                        this_.giveCommandJD = i;
+                                        if(i >= ids_length){
+                                            this_.loading.batchProcessingFun = false;
+                                            this_.batchProcessing = type;
+                                            this_.getData(this_.currentPage);
+                                            websocket.close();
+                                        }
+                                    }
+                                }
+                              },() => {
+                                this_.loading.batchProcessingFun = false;
+                            },this_)
+                        }
+                    }else if(this.lampcontrolOperationType == '3'){
+                        if(this.multipleSelection.length == 0){
+                            this.$message({
+                              showClose: true,
+                              message:'Please select the light control',
+                              type: 'warning'
+                            });
+                        }else{
+                            for(let d of this.multipleSelection){
+                                if(lampIds == ''){
+                                    lampIds = d.id;
+                                }else{
+                                    lampIds += ',' + d.id;
+                                }
+                            }
+                            this.$confirm('This operation will permanently delete the lamp control, will it continue?','Prompt', {
+                              confirmButtonText: 'confirm',
+                              cancelButtonText: 'cancel',
+                              type: 'warning'
+                            }).then(() => {
+                              this.loading.batchProcessingFun = true;
+                              baseApi.ajax_post(
+                                allUrl.project.lampcontrolDel,
+                                {
+                                    username:this.username,
+                                    client_key:this.client_key,
+                                    token:this.token,
+                                    lamp_ids:lampIds,
+                                },
+                                {},
+                                data =>{
+                                    // console.log(data,'灯控删除回调')
+                                    this.$message({
+                                      showClose: true,
+                                      message:data.msg,
+                                      type: 'success'
+                                    });
+                                    this.batchProcessing = type;
+                                    this.getData(this.currentPage);
+                                    this.networkSectionList();
+                                    this.loading.batchProcessingFun = false;
+                                },
+                              this)
+                            }).catch(() => {
+                                if(this.version == 0){
+                                  this.$message({
+                                    type: 'info',
+                                    message: this.version == 0?'已取消删除':'Canceled deleting'
+                                  });          
+                                }else{
+                                  this.$message({
+                                    type: 'info',
+                                    message: 'Undeleted'
+                                  });   
+                                }
+                            });
+                        }
+                    }else if(this.lampcontrolOperationType == '-1'){
+                        if(this.version == 0){
+                            this.$message({
+                              showClose: true,
+                              message:this.version == 0?'请先选中修改类型':'Please select the modified type first',
+                              type: 'warning'
+                            });
+                        }else{
+                            this.$message({
+                              showClose: true,
+                              message:'Please select the modification type',
+                              type: 'warning'
+                            });
+                        }
+                    }else if(this.lampcontrolOperationType == 'strategy'){
+                        if(this.multipleSelection.length == 0){
+                            this.$message({
+                              showClose: true,
+                              message:this.version==0?'请先选中灯控':'Please select the light control first',
+                              type: 'warning'
+                            });
+                        }else{
+                            for(let d of this.multipleSelection){
+                                if(lampIds == ''){
+                                    lampIds = d.id;
+                                }else{
+                                    lampIds += ',' + d.id;
+                                }
+                            }
+                            baseApi.ajax_post(
+                                allUrl.strategy.set_policy,
+                                {
+                                    username:this.username,
+                                    client_key:this.client_key,
+                                    token:this.token,
+                                    policyid:this.policyId,
+                                    lampid:lampIds,
+                                },
+                                {},
+                                data =>{
+                                    this.$message({
+                                      showClose: true,
+                                      message:data.msg,
+                                      type: 'success'
+                                    });
+                                    this.policyName = this.version=='0'?'策略':'policy'
+                                    this.batchProcessing = type;
+                                    this.getData(this.currentPage);
+                                    this.loading.batchProcessingFun = false;
+                                },
+                            this)
+                        }
+                    }else{
+                        // console.log(this.multipleSelection)
+                        if(this.multipleSelection.length == 0){
+                            this.$message({
+                              showClose: true,
+                              message:this.version==0?'请先选中灯控':'Please select the light control first',
+                              type: 'warning'
+                            });
+                        }else{
+                            let this_ = this;
+                            let i = 0;
+                            this.giveCommandDialog = true;
+                            this.giveCommandZS = this.multipleSelection.length;
+                            this.giveCommandCG = 0;
+                            this.giveCommandJD = 0;
+                            this.giveCommandJournal = [];
+                            let ids = '';
+                            let ids_length = this.multipleSelection.length;
+                            for(let d of this.multipleSelection){
+                                if(ids == ''){
+                                    ids = d.id;
+                                }else{
+                                    ids+=','+d.id;
+                                }
+                            }
+                            baseApi.websocket1(allUrl.home.wss,(data,websocket)=>{
+                                this_.loading.batchProcessingFun = true;
+                                if(data.data.status == '1'){
+                                    baseApi.ajax_post_ws(
+                                        allUrl.device.lampcontrolTurnonoff,
+                                        {
+                                            username:this_.username,
+                                            client_key:this_.client_key,
+                                            token:this_.token,
+                                            lamp_id:ids,
+                                            type:this_.lampcontrolOperationType,
+                                            mode:0,
+                                            clientid:data.data.clientid,
+                                        },
+                                        this_
+                                    )
+                                }else if(data.data.status == '2'){
+                                    if(data.data.code == '0000'){
+                                        this_.$notify({
+                                          title: this_.version==0?'操作成功':'Successful operation',
+                                          message: this_.version==0?'路灯 '+data.data.data.number:'lamp '+data.data.data.number,
+                                          type: 'success'
+                                        });
+                                        this_.giveCommandJournal.push({
+                                            time:this_.GMTToZero2(new Date()),
+                                            text:data.data.msg,
+                                            number:data.data.data.number,
+                                            type:true
+                                        })
+                                        i++;
+                                        this_.giveCommandCG ++;
+                                        this_.giveCommandJD = i;
+                                        if(i >= ids_length){
+                                            this_.loading.batchProcessingFun = false;
+                                            this_.batchProcessing = type;
+                                            this_.getData(this_.currentPage);
+                                            websocket.close();
+                                        }
+                                    }else{
+                                        console.log(2,'--------')
+                                        if(this_.version == 0){
+                                            this_.$notify.error({
+                                              title: '操作失败',
+                                              message: this_.version==0?'路灯 '+data.data.data.number+':'+data.data.msg:'lamp '+data.data.data.number+':'+data.data.msg
+                                            });
+                                        }else{
+                                            this_.$notify.error({
+                                              title: 'operation failed',
+                                              message: 'Lamp'+data.data.data.number+':'+data.data.msg
+                                            });
+                                        }
+                                        this_.giveCommandJournal.push({
+                                            time:this_.GMTToZero2(new Date()),
+                                            text:data.data.msg,
+                                            number:data.data.data.number,
+                                            type:false
+                                        })
+                                        i++;
+                                        this_.giveCommandJD = i;
+                                        console.log(i >= ids_length)
+                                        if(i >= ids_length){
+                                            this_.loading.batchProcessingFun = false;
+                                            this_.batchProcessing = type;
+                                            this_.getData(this_.currentPage);
+                                            websocket.close();
+                                        }
+                                    }
+                                }
+                            },() => {
+                                this_.loading.batchProcessingFun = false;
+                            },this_)
+                        }
+                    }
+                }
+            },
             /*获取表格字段*/
             getFields(){
                 baseApi.ajax_post(
@@ -2294,25 +2790,17 @@
                         if(d.fields1 == 'updatetime'){
                             this.$set(this.tableConfig.width,this.tableConfig.width.length,160);
                         }else{
-                            this.$set(this.tableConfig.width,this.tableConfig.width.length,(d.enname.length+1)*10+20);
+                            this.$set(this.tableConfig.width,this.tableConfig.width.length,(d.enname.length+1)*8+20);
                         }
                     }
                 }
                 let i = 0;
                 this.deviceArr = [];
                 for(let d of this.tableConfig.prop){
-                    // console.log(d,'---------1',this.tableConfig.label[i])
-                    // if(d != 'lighteness'){
-                    //     if(this.tableConfig.label[i] == 'lampstatus '){
-                    //         this.deviceArr.push({prop:d,label:'lighteness(%)',width:110,sortable:this.tableConfig.sortable[i]})
-                    //     }else{
-                    //     }
-                    // }
-                    this.deviceArr.push({prop:d,label:this.tableConfig.label[i],width:this.tableConfig.width[i],sortable:this.tableConfig.sortable[i]})
+                    this.deviceArr.push({prop:d,label:this.tableConfig.label[i],minWidth:this.tableConfig.width[i],sortable:this.tableConfig.sortable[i]})
                     i++;
                 }
-                    console.log(this.deviceArr)
-                // console.log(this.deviceArr,this.tableConfig,'-----')
+                console.log(this.deviceArr)
                 this.currentPage = 1;
                 this.loading.fieldKeep = true;
                 this.getLightList(this.currentPage,() => {
@@ -2503,9 +2991,9 @@
                 offsetY = e.offsetY;
                 pageX = e.pageX;
                 pageY = e.pageY;
-                console.log(clientWidth,offsetX,pageX,pageY);
+                console.log(pageY,$('#app > .scrollbar_style.padding')[0].scrollTop,clientHeight - offsetY);
                 this.lampLightSliderPageX = pageX - offsetX + clientWidth + 15;
-                this.lampLightSliderPageY = pageY + $('#app > .scrollbar_style.padding')[0].scrollTop - 115 - offsetY + clientHeight;
+                this.lampLightSliderPageY = pageY + $('#app > .scrollbar_style.padding')[0].scrollTop - (this.remRatio*(4.1+1.5/2)+71/2+6) + clientHeight - offsetY;
                 this.lampLightSlider = parseInt(data.lighteness);
                 this.lampId = data.id;
             },
@@ -2534,20 +3022,20 @@
                             this_,
                         )
                     }
-                    if(data.data.status == '2'){
-                        if(data.data.code == '0000'){
+                    if(data.status == '2'){
+                        if(data.code == '0000'){
                             this_.$message({
                               showClose: true,
-                              message:data.data.msg,
+                              message:data.msg,
                               type: 'success'
                             });
                             this_.loading.lampLightSlider = false;
-                            this_.getData(this_.currentPage);
+                            this_.getLightList(this_.currentPage);
                             this_.lampLightSliderShow = false;
                         }else{
                             this_.$message({
                               showClose: true,
-                              message:data.data.msg,
+                              message:data.msg,
                               type: 'warning'
                             });
                             this_.loading.lampLightSlider = false;
@@ -3911,7 +4399,7 @@
                                 if(i >= ids_length){
                                     this_.loading.batchProcessingFun = false;
                                     this_.batchProcessing = type;
-                                    this_.getData(this_.currentPage);
+                                    this_.getLightList(this_.currentPage);
                                     websocket.close();
                                 }
                             }else{
@@ -3930,7 +4418,7 @@
                                 if(i >= ids_length){
                                     this_.loading.batchProcessingFun = false;
                                     this_.batchProcessing = type;
-                                    this_.getData(this_.currentPage);
+                                    this_.getLightList(this_.currentPage);
                                     websocket.close();
                                 }
                             }
@@ -4123,7 +4611,7 @@
                                 if(i >= ids_length){
                                     this_.loading.batchProcessingFun = false;
                                     this_.batchProcessing = type;
-                                    this_.getData(this_.currentPage);
+                                    this_.getLightList(this_.currentPage);
                                     websocket.close();
                                 }
                             }else{
@@ -4142,7 +4630,7 @@
                                 if(i >= ids_length){
                                     this_.loading.batchProcessingFun = false;
                                     this_.batchProcessing = type;
-                                    this_.getData(this_.currentPage);
+                                    this_.getLightList(this_.currentPage);
                                     websocket.close();
                                 }
                             }
@@ -4719,6 +5207,92 @@
                                 }
                             }
                         }
+                        .left_button{
+                            display: flex;
+                            >span{
+                                height:2rem;line-height:2rem;
+                                font-size: 1rem;
+                                font-family: PingFangSC-Regular, PingFang SC;
+                                font-weight: 400;
+                                color:rgba(101,112,133,1);
+                            }
+                            >div{
+                                margin-left: 1rem;
+                                padding: 0 0.5rem;
+                                height:2rem;line-height:2rem;
+                                border: 1px solid #E8E8E8;
+                                cursor:pointer;
+                                >span{
+                                    font-size: 1rem;
+                                    font-family: PingFangSC-Regular, PingFang SC;
+                                    font-weight: 400;
+                                    color:rgba(101,112,133,1);
+                                }
+                            }
+                            .lampcontrol_type_select{
+                                >span{
+                                    color: #FC8440;
+                                }
+                            }
+                            .dimming_slider_box{
+                                display: flex;
+                                // width: 15rem;
+                                .el-slider{
+                                    position: relative;
+                                    top: 0;
+                                    width: 8rem;
+                                    .el-slider__runway{
+                                        margin: 0.7rem 0 0.7rem 1rem;
+                                        height: 0.6rem;
+                                        .el-slider__bar{
+                                            background-color: #fc8440;
+                                            height: 0.6rem;
+                                        }
+                                        .el-slider__button-wrapper{
+                                            top: -0.5rem;
+                                            width: 1.2rem;height: 1.2rem;
+                                            .el-slider__button{
+                                                width:100%;height: 100%;
+                                                background:url(../img/GIS/Lamp_icon-pre.png);
+                                                background-size: 100% 100%;
+                                                border:0px;
+                                            }
+
+                                        }
+                                    }
+                                }
+                                .span_last{
+                                    float: right;
+                                    color: #FC8440;
+                                    margin-left: 27px;
+                                }
+                            }
+                            >:nth-child(6){
+                                border: 0px;
+                                color: #FE7325;
+                                margin-left: 0px;
+                                span{
+                                    color: #FC8440;
+                                    text-decoration:underline;
+                                    cursor:pointer;
+                                }
+                            }
+                            >div:nth-child(7){
+                                border: 0px;
+                                color: #FE7325;
+                                padding: 0px;
+                                span{
+                                    color: #888888;
+                                    text-decoration:underline;
+                                    cursor:pointer;
+                                }
+                            }
+                            .wxzzt{
+                                span{
+                                    color: #666666;
+                                }
+                            }
+                        }
                     }
                     .table_top_r{
                         display: flex;
@@ -4791,7 +5365,7 @@
                             color: rgba(163, 175, 187, 1);
                         }
                     }
-                    .State{
+                    .status{
                         display: flex;align-items: center;justify-content: center;
                         img{
                             width: 1.3rem;
@@ -4819,9 +5393,9 @@
                                 font-size:1rem;
                                 font-family:PingFang-SC-Medium,PingFang-SC;
                                 font-weight:500;
-                                color:rgba(255,255,255,1);
+                                color:#BC4502;
                                 &.light50{
-                                    color: #BC4502;
+                                    color: #FFFFFF;
                                 }
                                 &.light0{
                                     color: #657085;

+ 19 - 2
webConfig/src/views/userManagement.vue

@@ -439,6 +439,10 @@
                 if(obj.key == 'role_'){
                     this.getUserSub_list();
                 }
+                if(obj.key == 'accountForm.roleType'){
+                    this.accountForm.company = null;
+                    this.getCompanyNav();
+                }
             },
             getUserInfo(id,callback,error){
                 base.ajax_post(
@@ -550,6 +554,20 @@
                 this.accountType = '0';
             },
             accountNextStep(){
+                if(!this.accountForm.company){
+                    this.$notify({
+                        message: 'Company cannot be empty',
+                        type: 'warning'
+                    });
+                    return
+                }
+                if(!this.accountForm.account){
+                    this.$notify({
+                        message: 'Account name cannot be empty',
+                        type: 'warning'
+                    });
+                    return
+                }
                 this.getPrivilege_list();
                 this.accountType = '1';
             },
@@ -596,14 +614,13 @@
             },
             /*公司下拉列表*/
             getCompanyNav(){
-                console.log(this.sideBarCompanyType)
                 base.ajax_post(
                     allUel.user.company_nav,
                     {
                         username:this.username,
                         client_key:this.client_key,
                         token:this.token,
-                        type:this.sideBarCompanyType,
+                        type:this.accountForm.roleType,
                     },
                     {},
                     data =>{