Browse Source

改bug

wangqin
hui 9 months ago
parent
commit
944f14f8f8
  1. 3
      ruoyi-ui/src/main.js
  2. 35
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue
  3. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue
  4. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue

3
ruoyi-ui/src/main.js

@ -3,7 +3,6 @@ import CollapseTransition from "element-ui/lib/transitions/collapse-transition";
import Cookies from "js-cookie";
import Element from "element-ui";
import clickoutside from "element-ui/src/utils/clickoutside";
import "./assets/styles/element-variables.scss";
import "./views/iot/css/iot.css";
import "@/assets/styles/index.scss"; // global css
@ -128,8 +127,6 @@ Vue.component("evtDialogVideo", evtDialogVideo);
Vue.component(CollapseTransition.name, CollapseTransition);
// Vue.component('reproductionImage', reproductionImage)
Vue.directive("clickoutside", clickoutside);
Vue.use(directive);
Vue.use(plugins);
// Vue.use(gisMap)

35
ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue

@ -1,5 +1,6 @@
<template>
<div class="from-content" style="width: 100%">
<!-- <div ref="mask" style="position: fixed; z-index: 9999999; left: 0; top:0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.5);" @click.prevent="onClickMask" v-if="visible"></div> -->
<ElPopover
ref="PopoverRef"
placement="bottom"
@ -10,7 +11,6 @@
v-model="visible"
@show="handleShow"
style="width: 100%"
v-clickoutside="handlerClose"
>
<div
class="InputSearch input"
@ -22,16 +22,17 @@
style="width: 100%"
v-model="value"
:placeholder="placeholder"
clearable
@change="handleSearch"
></ElInput>
<img src="./search.svg" v-show="!disable" @click="visible = !visible" />
<img src="./search.svg" v-show="!disable" @click="onOpenPop" />
</div>
<div
class="InputSearch"
v-else
slot="reference"
ref="ReferenceInputRef"
@click="visible = !visible"
@click="onOpenPop"
>
<span>{{ placeholder }}</span>
<img src="./search.svg"/>
@ -105,6 +106,7 @@ export default {
},
data() {
return {
isClickedBtn: false,
visible: false,
types: this.type,
value: "",
@ -126,18 +128,36 @@ export default {
};
},
},
mounted(){
// document.getElementById("app")
document.addEventListener("click" , ()=>{
if(!this.isClickedBtn){
setTimeout(() => {
this.visible = false;
}, 100)
}
this.isClickedBtn = false;
} , false)
},
methods: {
onOpenPop(){
this.isClickedBtn = true;
this.visible = !this.visible;
},
onClickMask(){
this.visible = false;
},
handleShow() {
if (this.width) return;
this.width = this.$refs.ReferenceInputRef.getBoundingClientRect().width;
},
handleResetForm() {
this.visible = true;
// this.visible = true;
this.$refs.FormConfigRef?.reset();
this.$refs.FormConfigRef.$refs.ElFormRef.resetFields();
this.$refs.PopoverRef.doClose();
// this.$refs.PopoverRef.doClose();
this.$emit(
"handleSearch",
@ -173,10 +193,7 @@ export default {
console.log("catch");
});
}
},
handlerClose() {
this.visible = false;
},
}
},
};
</script>

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue

@ -129,8 +129,8 @@ export default {
methods: {
async handleSwitcherChange(value, data) {
data.state = value;
const isContinue = await confirm({ message: "是否要删除该辖段信息?" })
let op = ["关闭", "开启"][+data.state];
const isContinue = await confirm({ message: `${op}该支路?` })
.catch(() => {
data.state = !value;
});

5
ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue

@ -32,7 +32,6 @@
type="input"
params="word"
:disable="true"
:placeholder="searchText"
@handleSearch="handleSearch"
/>
</div>
@ -140,10 +139,6 @@ export default {
key: "word",
label: "关键词",
},
{
key: "id",
label: "id",
},
{
key: "createTime",
label: "创建时间",

Loading…
Cancel
Save