From 8a2d62b33aef3785a6f100c5343375be9d513156 Mon Sep 17 00:00:00 2001 From: renpy Date: Mon, 24 Jul 2023 18:23:12 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../images/abnormalAlarm/title_right.png | Bin 0 -> 1056 bytes src/style.less | 4 +- .../alarmCenter/alarmContactGroup/index.vue | 107 ++++++++++--- .../alarmCenter/alarmHistory/index.vue | 149 +++++++++++++----- .../abnormalAlarm/components/searchBar.vue | 57 ++++--- 5 files changed, 231 insertions(+), 86 deletions(-) create mode 100644 src/assets/images/abnormalAlarm/title_right.png diff --git a/src/assets/images/abnormalAlarm/title_right.png b/src/assets/images/abnormalAlarm/title_right.png new file mode 100644 index 0000000000000000000000000000000000000000..88b1e84c27484fe1534050e1bbfd2dc5300514ad GIT binary patch literal 1056 zcmaJ=Pe>F|9Gw+6y9A}>Hq%&`tdA6em zF%O|2LUbsJx>VOror*|O%l<$@K~Q$-uypejbO`K?x?6{~fj93D-}n8#-|zk2!a%yO zuC}?BVVJsPznr1-ARWhRs_FmoOzZ`nnn*lH2Jt8)9mFc{>a$cv(nB7Dx2Nfg&-IxQsy89A!0TSUhu@D!C1JW0YVb-I^=VU=Y~ zXTMCeV7#kXyud*(r4lfe`aje#%4mmV&>z456n3&x7UDC=!IQR1FK)EO3uQ?$8z}_a zS&S!2RUF7;f}K3JfGBVxXdBW^4HujNFiRykUDqU`GuE33#1ioY z6a^tJMBmTt#>}L+DyxJ8Z50zS{Wn+q>ebu)f)G>*%N2joY|n2}I6mht_%~*8Mfi zv#rNX%d7KScOUe9$afb`Urc - + @@ -50,15 +50,21 @@ show-size-changer show-quick-jumper :total="page.total" - :show-total="(total, range) => `Total ${total} items Page ${currentPage} / ${Math.ceil(total / page.pageSize)}`" + :show-total="(total, range) => `Total ${total} items Page ${page.currentPage} / ${Math.ceil(total / page.pageSize)}`" show-less-items @change="handlePageChange" @showSizeChange="handleSizeChange" /> - - + +
- - + + + + + + +
-
-
+ + + @@ -136,7 +157,8 @@ export default { 'background: #02282b;;margin-bottom: 20px;border: solid 1px #416f7f;overflow: hidden', targetKeys: [], groupName: "", - currGroupId:"" + currGroupId: "", + form: this.$form.createForm(this) } }, mounted() { @@ -173,7 +195,12 @@ export default { if (res.success) { this.visible = true this.isAdd = false - this.groupName = res.result.name + // this.groupName = res.result.name + this.$nextTick(() => { + this.form.setFieldsValue({ + name: res.result.name, + }); + }) this.targetKeys = res.result.userIds this.currGroupId = res.result.id } else { @@ -195,29 +222,41 @@ export default { } }) }, - setGroupName(e) { - this.groupName = e.target.value - }, + // setGroupName(e) { + // this.groupName = e.target.value + // }, handleChange(targetKeys, direction, moveKeys) { console.log(targetKeys, direction, moveKeys); this.targetKeys= targetKeys; }, handleOk() { - if (this.isAdd) { - this.createContactGroup() - } else { - this.updateContactGroup() - } + this.form.validateFields((err, values) => { + if (!err) { + if (this.targetKeys.length>0) { + if (this.isAdd) { + this.createContactGroup(values.name) + } else { + this.updateContactGroup(values.name) + } + } else { + this.$message.warning("Please select User") + } + } + }); }, - updateContactGroup() { + onCancel() { + this.visible = false + }, + updateContactGroup(name) { let params = { - name: this.groupName, + name, description: "", userIds: this.targetKeys, id:this.currGroupId } httpAction("/alarmContactGroup/update", params, "put").then(res => { if (res.success) { + this.visible = false this.$message.success("success") this.getAlarmGroup() } else { @@ -225,14 +264,15 @@ export default { } }) }, - createContactGroup() { + createContactGroup(name) { let params = { - name: this.groupName, + name, description: "", userIds:this.targetKeys, } postAction("/alarmContactGroup/create", params).then(res => { if (res.success) { + this.visible = false this.$message.success("success") this.getAlarmGroup() } else { @@ -283,6 +323,11 @@ export default { console.log('search:', dir, value); }, showModal() { + this.targetKeys = [] + this.groupName = "" + this.form.setFieldsValue({ + name: "", + }); this.visible = true; }, }, @@ -290,6 +335,13 @@ export default { \ No newline at end of file diff --git a/src/views/abnormalAlarm/components/searchBar.vue b/src/views/abnormalAlarm/components/searchBar.vue index ac8b67f..ca83215 100644 --- a/src/views/abnormalAlarm/components/searchBar.vue +++ b/src/views/abnormalAlarm/components/searchBar.vue @@ -41,7 +41,8 @@ @@ -159,28 +160,33 @@ export default { margin-right: 9px; } } -::v-deep .ant-form-item { - display: flex; - margin-bottom: 0; - .ant-form-item-label,.ant-form-item-control { - line-height: 32px; - height: 32px; - } - .ant-form-item-label { - flex-shrink: 0; - margin-right: 10px; - label { - font-size: 16px; - font-family: ArialMT; - color: #ade6ee; - &::after { - display: none; +::v-deep { + .ant-form-item { + display: flex; + margin-bottom: 0; + .ant-form-item-label,.ant-form-item-control { + line-height: 32px; + height: 32px; + } + .ant-form-item-label { + flex-shrink: 0; + margin-right: 10px; + label { + font-size: 16px; + font-family: ArialMT; + color: #ade6ee; + &::after { + display: none; + } } } - } - .ant-form-item-control-wrapper { - width: 100%; - overflow: hidden; + .ant-calendar-range-picker-separator{ + color: white; + } + .ant-form-item-control-wrapper { + width: 100%; + overflow: hidden; + } } } .ant-select { @@ -197,4 +203,13 @@ export default { position: relative; background: #03353f; } +:global{ + .asd{ + .ant-calendar-range .ant-calendar-input , + .ant-calendar-range .ant-calendar-time-picker-input{ + color: red !important; + background: none !important; + } + } +} \ No newline at end of file