sunyadv 5 лет назад
Родитель
Сommit
de776bec10

+ 1 - 0
target/classes/main/resources/application.properties

@@ -14,6 +14,7 @@ spring.thymeleaf.jackson.date-format=yyyy-MM-dd HH:mm:ss
 # Êý¾ÝÔ´ÅäÖÃ
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+#spring.datasource.url=jdbc:mysql://118.190.47.230:3306/cloud_model_test?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
 spring.datasource.username=root
 spring.datasource.password=p011430seya1026
 #spring.datasource.druid.test-on-borrow=true

+ 3 - 1
ys_int/src/i18n/lang/en.js

@@ -361,7 +361,9 @@ const lang = {
 		year: "year",
 		compName: "Corporate Name",
 		state0: "Not Enabled",
-		state1: "Enabled",
+        state1: "Enabled",
+        state2: "Starting",
+        state3: "Discontinued",
         use: "Enable",
         disuse: "Disable",
         issued: "Issued",

+ 3 - 1
ys_int/src/i18n/lang/zh.js

@@ -362,7 +362,9 @@ const lang = {
 		year: "年",
 		compName: "公司名称",
 		state0: "未启用",
-		state1: "已启用",
+        state1: "已启用",
+        state2: "启用中",
+        state3: "停用中",
         use: "启用",
         disuse: "停用",
         issued: "下发",

+ 8 - 8
ys_int/src/views/Home.vue

@@ -41,11 +41,11 @@
                         <!-- 警告的页面 -->
                         <el-tab-pane name="1">
                             <span slot="label">
-                                <span v-if="unreadCount[1] == 0">{{$t('home.warning')}}</span>
-                                <span v-else>{{$t('home.warning')}}({{unreadCount[1]}})</span>
+                                <span v-if="unreadCount[2] == 0">{{$t('home.warning')}}</span>
+                                <span v-else>{{$t('home.warning')}}({{unreadCount[2]}})</span>
                             </span>
-                            <div class="popover-item" v-if="popoverData[1].length == 0">{{$t('home.noWarning')}}</div>
-                            <div class="popover-item" v-for="item in popoverData[1]">
+                            <div class="popover-item" v-if="popoverData[2].length == 0">{{$t('home.noWarning')}}</div>
+                            <div class="popover-item" v-for="item in popoverData[2]">
                                 <div style="cursor: pointer;" @click="locationHerf(item.id, item.refId, item.noticeType, null)">
                                     <p class="popover-title">
                                         <span v-if="item.isRead == 1" class="isRead">{{item.projectName}}</span>
@@ -60,11 +60,11 @@
                         <!-- 保养的页面 -->
                         <el-tab-pane name="2">
                             <span slot="label">
-                                <span v-if="unreadCount[2] == 0">{{$t('home.maintain')}}</span>
-                                <span v-else>{{$t('home.maintain')}}({{unreadCount[2]}})</span>
+                                <span v-if="unreadCount[1] == 0">{{$t('home.maintain')}}</span>
+                                <span v-else>{{$t('home.maintain')}}({{unreadCount[1]}})</span>
                             </span>
-                            <div class="popover-item" v-if="popoverData[2].length == 0">{{$t('home.noMaintain')}}</div>
-                            <div class="popover-item" v-for="item in popoverData[2]">
+                            <div class="popover-item" v-if="popoverData[1].length == 0">{{$t('home.noMaintain')}}</div>
+                            <div class="popover-item" v-for="item in popoverData[1]">
                                 <div style="cursor: pointer;" @click="locationHerf(item.id, item.refId, item.noticeType, null)">
                                     <p class="popover-title">
                                         <span v-if="item.isRead == 1" class="isRead">{{item.projectName}}</span>

+ 6 - 4
ys_int/src/views/base/allocation.vue

@@ -70,7 +70,9 @@
             <el-table-column :label="$t('basic.equipmentState')" align="center" width="120" sortable>
                 <template slot-scope="scope">
                     <span v-if="scope.row.isUse == 0">{{$t('basic.state0')}}</span>
-                    <span v-else>{{$t('basic.state1')}}</span>
+                    <span v-else-if="scope.row.isUse == 1">{{$t('basic.state1')}}</span>
+                    <span v-else-if="scope.row.isUse == 2">{{$t('basic.state2')}}</span>
+                    <span v-else-if="scope.row.isUse == 3">{{$t('basic.state3')}}</span>
                 </template>
             </el-table-column>
             <el-table-column :label="$t('base.operate')" align="center" width="160">
@@ -78,7 +80,7 @@
                     <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 0" type="primary" @click="openEnable(scope.$index)">{{$t('basic.use')}}</el-button>
                     <el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 1" type="danger" @click="disableEquipment(scope.$index)">{{$t('basic.disuse')}}</el-button>
                     <!--  :disabled="scope.row.isUse == 1" -->
-                    <el-button size="small" :style="scope.row.modelNo!=null?'':'float:right;margin-right:6px'" @click="showEdit(scope.$index, scope.row, scope.row.isUse == 1)">{{$t('base.edit')}}</el-button>
+                    <el-button size="small" :style="scope.row.modelNo!=null?(parseInt(scope.row.isUse)>=2?'float:right;margin-right:6px':''):'float:right;margin-right:6px'" @click="showEdit(scope.$index, scope.row, scope.row.isUse == 1)">{{$t('base.edit')}}</el-button>
                 </template>
             </el-table-column>
         </el-table>
@@ -483,7 +485,7 @@
 
             //启用设备
             enable() {
-                this.allocations[this.activeIndex].isUse = 1;
+                // this.allocations[this.activeIndex].isUse = 1;
                 this.operateDialogVisible = false;
                 var str = this.allocations[this.activeIndex].equipmentNo;
                 this.http.post( this.port.base.setPacket, {
@@ -516,7 +518,7 @@
 
             //停用云模盒
             disableEquipment(index) {
-                this.allocations[index].isUse = 1;
+                // this.allocations[index].isUse = 1;
                 var str = this.allocations[index].equipmentNo;
                 this.http.post( this.port.base.setPacket, {
                     lowPowerLimit: this.allocations[index].alarmBattery,//.toString(16),