From db67f31f92e4d92eea2a556712abd06c03f5033b Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期五, 26 一月 2024 13:52:27 +0800
Subject: [PATCH] 1、用户管理、角色管理、设备车间管理以及大屏车间管理页面的相关功能操作完成提示由message调整与mdc模块相同的notification 2、大屏车间管理页面新增授权标识字段
---
src/views/mdc/base/modules/deviceLog/LogInfo.vue | 143 ++++++++++++++++++++++++++---------------------
1 files changed, 79 insertions(+), 64 deletions(-)
diff --git a/src/views/mdc/base/modules/deviceLog/LogInfo.vue b/src/views/mdc/base/modules/deviceLog/LogInfo.vue
index 0321998..58000dd 100644
--- a/src/views/mdc/base/modules/deviceLog/LogInfo.vue
+++ b/src/views/mdc/base/modules/deviceLog/LogInfo.vue
@@ -4,27 +4,34 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
- <a-col :md="6" :sm="6">
+ <a-col :md="4" :sm="4">
<a-form-item label="璁惧缂栧彿">
- <a-input placeholder="杈撳叆璁惧缂栧彿鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input>
+ <a-input placeholder="璇烽�夋嫨璁惧" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="6">
<a-form-item label="璁惧鍚嶇О">
- <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input>
+ <a-input placeholder="璇烽�夋嫨璁惧" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input>
</a-form-item>
</a-col>
- <a-col :md="6" :sm="6">
+ <a-col :md="4" :sm="4">
<a-form-item label="鏃ユ湡">
- <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" format='YYYY-MM-DD'/>
+ <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange"
+ format='YYYY-MM-DD'/>
</a-form-item>
- </a-col>
- <a-col :md="3" :sm="3">
- <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
</a-col>
<a-col :md="2" :sm="2" :xs="2">
- <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+ <a-space>
+ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+ <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+ </a-space>
</a-col>
+ <!--<a-col :md="3" :sm="3">-->
+ <!--<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>-->
+ <!--</a-col>-->
+ <!--<a-col :md="2" :sm="2" :xs="2">-->
+ <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>-->
+ <!--</a-col>-->
</a-row>
</a-form>
</div>
@@ -60,9 +67,9 @@
<span v-if="item.status == 23"
:style='{display: "inline-block",width:item.dateProportion, height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span>
</div>
- <div v-if="item.status == 22" style="z-index: 999;"
- :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}'
- v-for="item in waring">
+ <div v-if="item.status == 22" style="z-index: 999;"
+ :style='{display: "inline-block",left:item.left,width:item.dateProportion, height: "100%",position:"absolute"}'
+ v-for="item in waring">
<span
:style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span>
</div>
@@ -150,9 +157,9 @@
</a-tabs>
</div>
</div>
- <work-chart-model ref="workChartModel"></work-chart-model>
+ <work-chart-model ref="workChartModel" :collectTime="this.queryParams.collectTime"
+ :equipment="this.equipment"></work-chart-model>
<work-history-model ref="workHistoryModel"></work-history-model>
-
</div>
</template>
@@ -177,17 +184,17 @@
props: { equement: {} },
data() {
return {
- readOnly:true,
+ readOnly: true,
defaultId: '',
defaultName: '',
middleTime: '',
- queryParam:{},
+ queryParam: {},
queryParams: {
- collectTime:undefined,
+ collectTime: undefined
},
- loadingstayus:false,
- loadingrunStatus:false,
- loadingwarnStatus:false,
+ loadingstayus: false,
+ loadingrunStatus: false,
+ loadingwarnStatus: false,
normal: [],
waring: [],
normalList: [],
@@ -201,7 +208,7 @@
getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid',
list: '/mdc/mdcEquipmentRunningSection/logList'
},
- ProStartId:''
+ ProStartId: ''
}
},
methods: {
@@ -224,27 +231,27 @@
tabChange(val) {
this.activeKey = val
},
- disabledDate(current){
+ disabledDate(current) {
//Can not slect days before today and today
- return current && current > moment().subtract('days', 0);
+ return current && current > moment().subtract('days', 0)
},
queryChart() {
// this.normal = []
// this.waring = []
- this.loadingstayus = true;
- this.loadingrunStatus = true;
+ this.loadingstayus = true
+ this.loadingrunStatus = true
this.loadingwarnStatus = true
getAction(this.url.list, this.queryParams).then((res) => {
this.normalList = []
this.waringList = []
this.runList = []
- this.loadingstayus = false;
- this.loadingrunStatus = false;
+ this.loadingstayus = false
+ this.loadingrunStatus = false
this.loadingwarnStatus = false
this.normal = []
this.waring = []
if (res.success) {
- if(res.result != null){
+ if (res.result != null) {
for (let i = 0; i < res.result.length; i++) {
this.normalList.push(res.result[i])
if ('22' == res.result[i].status) {
@@ -254,11 +261,11 @@
res.result[i].left = leftTmp / 86400 * 100 + '%'
this.waring.push(res.result[i])
- }else if('3' == res.result[i].status){
+ } else if ('3' == res.result[i].status) {
this.runList.push(res.result[i])
res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%'
this.normal.push(res.result[i])
- }else{
+ } else {
res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%'
this.normal.push(res.result[i])
// console.log(this.normal)
@@ -325,17 +332,24 @@
},
searchQuery() {
// console.log(this.queryParams.collectTime)
- if(this.queryParams.collectTime != undefined){
+ if (this.queryParams.collectTime != undefined) {
this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
+ if (!this.queryParams.equipmentId || !this.queryParams.equipmentName) {
+ this.$notification.warning({
+ message: '娑堟伅',
+ description: '璇烽�夋嫨璁惧'
+ })
+ return false
+ }
this.queryChart()
- }else{
+ } else {
// this.$message.warning("璇烽�夋嫨鏃堕棿")
+ console.log('瑙﹀彂鎻愮ず')
this.$notification.warning({
- message:'娑堟伅',
- description:"璇烽�夋嫨鏃堕棿"
- });
+ message: '娑堟伅',
+ description: '璇烽�夋嫨鏃堕棿'
+ })
}
-
// this.queryList()
},
searchReset() {
@@ -348,28 +362,29 @@
// this.onClearSelected()
},
openWorkChart() {
- if(!this.equipment.equipmentId){
+ if (!this.equipment.equipmentId) {
// this.$message.warning("璇烽�夋嫨璁惧杩涜鏌ヨ")
this.$notification.warning({
- message:'娑堟伅',
- description:"璇烽�夋嫨璁惧杩涜鏌ヨ"
- });
- }else{
+ message: '娑堟伅',
+ description: '璇烽�夋嫨璁惧杩涜鏌ヨ'
+ })
+ } else {
+ // 鍒ゆ柇鏄惁鐐瑰嚮璁惧鏃ュ織琛ㄦ牸琛岀殑鏁版嵁锛屾鏃朵负鐐瑰嚮琛ㄦ牸鏁版嵁涓篺alse
+ this.$refs.workChartModel.isClicklogListRow = false
this.$refs.workChartModel.add(this.equipment)
this.$refs.workChartModel.title = '宸ヤ綔鏇茬嚎'
}
-
},
openHistoryChart() {
// console.log(this.equipment);
- if(!this.equipment.equipmentId){
+ if (!this.equipment.equipmentId) {
// this.$message.warning("璇烽�夋嫨璁惧杩涜鏌ヨ")
this.$notification.warning({
- message:'娑堟伅',
- description:"璇烽�夋嫨璁惧杩涜鏌ヨ"
- });
+ message: '娑堟伅',
+ description: '璇烽�夋嫨璁惧杩涜鏌ヨ'
+ })
// console.log(1111)
- } else{
+ } else {
this.$refs.workHistoryModel.add(this.equipment)
this.$refs.workHistoryModel.title = '鍘嗗彶鏃ュ織'
}
@@ -380,13 +395,13 @@
this.searchQuery()
},
dataAfter() {
- if((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')){
+ if ((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')) {
// this.$message.warning("璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�")
this.$notification.warning({
- message:'娑堟伅',
- description:'璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�'
- });
- }else{
+ message: '娑堟伅',
+ description: '璇烽�夋嫨浠婂ぉ浠ュ強浠婂ぉ涔嬪墠鐨勬棩鏈燂紒锛�'
+ })
+ } else {
this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD')
this.searchQuery()
}
@@ -407,16 +422,17 @@
this.equipment = {}
// _this.$message.warning('璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒')
_this.$notification.warning({
- message:'娑堟伅',
- description:'璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
- });
+ message: '娑堟伅',
+ description: '璇疯仈绯荤鐞嗗憳锛屽紑鏀捐澶囨潈闄愶紒'
+ })
}
- }else{
+ } else {
// this.$message.warning(res.message)
_this.$notification.warning({
- message:'娑堟伅',
- description:res.message
- });
+ message: '娑堟伅',
+ description: res.message
+ })
+
}
})
}
@@ -424,14 +440,12 @@
created() {
this.queryParams.collectTime = moment()
this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
- this.initEquipment();
+ this.initEquipment()
// this.queryTreeData();
- },
- mounted() {
-
},
watch: {
equement(val) {
+ console.log('閫氳繃watch瑙﹀彂')
if (val && val.equipmentId) {
this.$set(this.queryParams, 'equipmentName', val.equipmentName)
this.$set(this.queryParams, 'equipmentId', val.equipmentId)
@@ -486,7 +500,8 @@
#mdcLogShow > div {
flex: 1;
}
+
/*.mdcLogShowOne{*/
- /*position: absolute;*/
+ /*position: absolute;*/
/*}*/
</style>
--
Gitblit v1.9.3