Merge branch 'master' of http://192.168.1.136:82/monitor_v3/hg-monitor-web
Showing
5 changed files
with
36 additions
and
13 deletions
@@ -59,7 +59,7 @@ export default { | @@ -59,7 +59,7 @@ export default { | ||
59 | ]) | 59 | ]) |
60 | 60 | ||
61 | //自定义选择时间 | 61 | //自定义选择时间 |
62 | - let dateValue=Vue.ref(); | 62 | + let dateValue=Vue.ref([]); |
63 | //选中的聚合频率 | 63 | //选中的聚合频率 |
64 | let checkedId=Vue.ref(); | 64 | let checkedId=Vue.ref(); |
65 | let commandVal=Vue.ref('聚合频率') | 65 | let commandVal=Vue.ref('聚合频率') |
@@ -239,7 +239,8 @@ export default { | @@ -239,7 +239,8 @@ export default { | ||
239 | const getDateTime=(newDate)=>{ | 239 | const getDateTime=(newDate)=>{ |
240 | let dateTime=''; | 240 | let dateTime=''; |
241 | let year=newDate.getFullYear();//获取当前年 | 241 | let year=newDate.getFullYear();//获取当前年 |
242 | - let month=timeFormat(newDate.getMonth()+1);//获取当前月 | 242 | + let month1=(newDate.getMonth()+1)+''; |
243 | + let month=timeFormat(month1);//获取当前月 | ||
243 | let day=timeFormat(newDate.getDate());//获取当前日 | 244 | let day=timeFormat(newDate.getDate());//获取当前日 |
244 | let hours=timeFormat(newDate.getHours()+'');//获取当前时 | 245 | let hours=timeFormat(newDate.getHours()+'');//获取当前时 |
245 | let minutes=timeFormat(newDate.getMinutes()+'');//获取当前分 | 246 | let minutes=timeFormat(newDate.getMinutes()+'');//获取当前分 |
@@ -281,6 +282,8 @@ export default { | @@ -281,6 +282,8 @@ export default { | ||
281 | if(props.dateValueData && props.dateValueData.length>0){ | 282 | if(props.dateValueData && props.dateValueData.length>0){ |
282 | dateValue.value=props.dateValueData | 283 | dateValue.value=props.dateValueData |
283 | changeDate(dateValue.value); | 284 | changeDate(dateValue.value); |
285 | + }else{ | ||
286 | + oneDay(); | ||
284 | } | 287 | } |
285 | checkedId.value=props.intervalGroup; | 288 | checkedId.value=props.intervalGroup; |
286 | } | 289 | } |
@@ -304,12 +307,19 @@ export default { | @@ -304,12 +307,19 @@ export default { | ||
304 | }); | 307 | }); |
305 | } | 308 | } |
306 | 309 | ||
310 | + const oneDay=()=>{ | ||
311 | + const end = getDateTime(new Date()); | ||
312 | + const start = formatDate(1,'d'); | ||
313 | + dateValue.value=[start,end] | ||
314 | + changeDate(dateValue.value) | ||
315 | + | ||
316 | + } | ||
307 | // 挂载完 | 317 | // 挂载完 |
308 | Vue.onMounted(() => { | 318 | Vue.onMounted(() => { |
309 | isDetail(); | 319 | isDetail(); |
310 | - | ||
311 | }) | 320 | }) |
312 | return { | 321 | return { |
322 | + oneDay, | ||
313 | commandVal, | 323 | commandVal, |
314 | calcDayNum, | 324 | calcDayNum, |
315 | calcDay, | 325 | calcDay, |
1 | <div > | 1 | <div > |
2 | <!-- 表格--> | 2 | <!-- 表格--> |
3 | <el-table :border="showBorder" v-loading="loading" :size="size" ref="multipleTable" @selection-change="handleSelectionChange" :data="dataList" stripe header-row-class-name="tbl-header-class" :height="height" | 3 | <el-table :border="showBorder" v-loading="loading" :size="size" ref="multipleTable" @selection-change="handleSelectionChange" :data="dataList" stripe header-row-class-name="tbl-header-class" :height="height" |
4 | - style="width: 100%;margin: 0px 0px;"> | 4 | + style="width: 100%;margin: 0px 0px; font-size:13.5px;"> |
5 | <el-table-column v-if="showSelection && columns.length > 0" align="center" type="selection" width="55" /> | 5 | <el-table-column v-if="showSelection && columns.length > 0" align="center" type="selection" width="55" /> |
6 | <el-table-column v-if="showIndex && columns.length > 0" type="index" :label="indexLabel" align="center" width="50"/> | 6 | <el-table-column v-if="showIndex && columns.length > 0" type="index" :label="indexLabel" align="center" width="50"/> |
7 | 7 | ||
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | <div v-html="getTextContent(scope.row[item.prop])"> | 25 | <div v-html="getTextContent(scope.row[item.prop])"> |
26 | </div> | 26 | </div> |
27 | </template> | 27 | </template> |
28 | - <div style="overflow: hidden; text-overflow: ellipsis; font-size:15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;"> | 28 | + <div style="overflow: hidden; text-overflow: ellipsis;display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;"> |
29 | {{scope.row[item.prop]}} | 29 | {{scope.row[item.prop]}} |
30 | </div> | 30 | </div> |
31 | </el-tooltip> | 31 | </el-tooltip> |
@@ -162,7 +162,7 @@ export default { | @@ -162,7 +162,7 @@ export default { | ||
162 | let prePage = (val) => { | 162 | let prePage = (val) => { |
163 | // console.log(`当前页: ${val}`) | 163 | // console.log(`当前页: ${val}`) |
164 | // props.currentPage = val - 1; | 164 | // props.currentPage = val - 1; |
165 | - currentPage.value = val; | 165 | + currentPage.value = val-1; |
166 | callback(); | 166 | callback(); |
167 | } | 167 | } |
168 | 168 | ||
@@ -170,7 +170,7 @@ export default { | @@ -170,7 +170,7 @@ export default { | ||
170 | let nextPage = (val) => { | 170 | let nextPage = (val) => { |
171 | // console.log(`当前页: ${val}`) | 171 | // console.log(`当前页: ${val}`) |
172 | // props.currentPage = val + 1; | 172 | // props.currentPage = val + 1; |
173 | - currentPage.value = val; | 173 | + currentPage.value = val+1; |
174 | callback(); | 174 | callback(); |
175 | } | 175 | } |
176 | 176 |
@@ -5,11 +5,13 @@ | @@ -5,11 +5,13 @@ | ||
5 | <el-row style="margin-bottom: 5px;margin-top: 5px"> | 5 | <el-row style="margin-bottom: 5px;margin-top: 5px"> |
6 | <el-col :span="24"> | 6 | <el-col :span="24"> |
7 | <div class="flex-div-start margin-top-bottom-10"> | 7 | <div class="flex-div-start margin-top-bottom-10"> |
8 | - <el-tooltip placement="right-end"> | ||
9 | - <template #content>关键字检索包含<br />资源名称<br />IP地址</template> | 8 | + <el-tooltip> |
9 | + <template #content>关键字检索包含<br/>资源名称<br/>IP地址</template> | ||
10 | <el-input style="width:160px;margin-left: 10px;float: left;" class="margin-right-10" | 10 | <el-input style="width:160px;margin-left: 10px;float: left;" class="margin-right-10" |
11 | v-model="keyWords" | 11 | v-model="keyWords" |
12 | - placeholder="输入关键字" @click.danger="deleteItem(scope.row,scope.$index)"/> | 12 | + placeholder="输入关键字" |
13 | + clearable/> | ||
14 | + </el-input> | ||
13 | </el-tooltip> | 15 | </el-tooltip> |
14 | <el-dropdown style="margin-top: -15px;margin-left: 10px;float: left;"> | 16 | <el-dropdown style="margin-top: -15px;margin-left: 10px;float: left;"> |
15 | <el-icon class="el-icon--right"> | 17 | <el-icon class="el-icon--right"> |
@@ -57,9 +59,12 @@ | @@ -57,9 +59,12 @@ | ||
57 | <template #default="{row,prop,column}"> | 59 | <template #default="{row,prop,column}"> |
58 | <div v-if="prop == 'resName'"> | 60 | <div v-if="prop == 'resName'"> |
59 | <!-- 资源名称点击事件 --> | 61 | <!-- 资源名称点击事件 --> |
60 | - <el-button type="text" size="small" @click.prevent="resourceClick(row)"> | ||
61 | - <span class="">{{row.resName}}</span> | ||
62 | - </el-button> | 62 | + <el-tooltip placement="top"> |
63 | + <el-button type="text" size="small" @click.prevent="resourceClick(row)"> | ||
64 | + <span class="">{{row.resName}}</span> | ||
65 | + </el-button> | ||
66 | + <template #content>{{row.resName}}</template> | ||
67 | + </el-tooltip> | ||
63 | </div> | 68 | </div> |
64 | </template> | 69 | </template> |
65 | <template #tools="{scope}"> | 70 | <template #tools="{scope}"> |
@@ -202,6 +202,14 @@ export default { | @@ -202,6 +202,14 @@ export default { | ||
202 | } else { | 202 | } else { |
203 | if (['protocolType', 'portDesc'].indexOf(e.prop) === -1 && !/^\d+$/.test(item[e.prop])) { | 203 | if (['protocolType', 'portDesc'].indexOf(e.prop) === -1 && !/^\d+$/.test(item[e.prop])) { |
204 | msg = e.label + '请输入数字'; | 204 | msg = e.label + '请输入数字'; |
205 | + }else{ | ||
206 | + if(['protocolType', 'portDesc'].indexOf(e.prop) === -1 && item[e.prop].length>=8){ | ||
207 | + msg = e.label + '不能超过8位'; | ||
208 | + }else{ | ||
209 | + if(['protocolType', 'portDesc'].indexOf(e.prop) === -1 && item[e.prop]<=0){ | ||
210 | + msg = e.label + '只能大于零'; | ||
211 | + } | ||
212 | + } | ||
205 | } | 213 | } |
206 | } | 214 | } |
207 | }) | 215 | }) |
-
Please register or login to post a comment