forked from integrated_whb/integrated_whb_vue
init
parent
34dd98ed80
commit
aefcd3d4e3
|
@ -29,9 +29,7 @@ import { setAvatar } from "@/request/api.js";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useVModels } from "@vueuse/core";
|
import { useVModels } from "@vueuse/core";
|
||||||
import { useUserStore } from "@/pinia/user.js";
|
|
||||||
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
visible: {
|
visible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -44,7 +42,7 @@ const props = defineProps({
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emits = defineEmits(["update:visible", "update:form"]);
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
const { visible, form } = useVModels(props, emits);
|
const { visible, form } = useVModels(props, emits);
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const rules = {
|
const rules = {
|
||||||
|
@ -60,13 +58,10 @@ const fnSubmit = debounce(
|
||||||
}
|
}
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("FFILE", form.value.file[0].raw);
|
formData.append("FFILE", form.value.file[0].raw);
|
||||||
const resData = await setAvatar(formData);
|
await setAvatar(formData);
|
||||||
fnClose();
|
fnClose();
|
||||||
ElMessage.success("修改成功");
|
ElMessage.success("修改成功");
|
||||||
userStore.setUserInfo({
|
emits("get-data");
|
||||||
...userStore.getUserInfo,
|
|
||||||
userPhoto: resData.userPhoto,
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
{ atBegin: true }
|
{ atBegin: true }
|
||||||
);
|
);
|
||||||
|
|
|
@ -67,7 +67,7 @@ const props = defineProps({
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emits = defineEmits(["update:visible", "update:form"]);
|
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||||
const { visible, form } = useVModels(props, emits);
|
const { visible, form } = useVModels(props, emits);
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
const validatePass = (rule, value, callback) => {
|
const validatePass = (rule, value, callback) => {
|
||||||
|
@ -118,6 +118,7 @@ const fnSubmit = debounce(
|
||||||
});
|
});
|
||||||
fnClose();
|
fnClose();
|
||||||
ElMessage.success("修改成功");
|
ElMessage.success("修改成功");
|
||||||
|
emits("get-data");
|
||||||
},
|
},
|
||||||
{ atBegin: true }
|
{ atBegin: true }
|
||||||
);
|
);
|
||||||
|
|
|
@ -52,10 +52,12 @@
|
||||||
<update-info
|
<update-info
|
||||||
v-model:visible="data.userDialog.visible"
|
v-model:visible="data.userDialog.visible"
|
||||||
v-model:form="data.userDialog.form"
|
v-model:form="data.userDialog.form"
|
||||||
|
@get-data="fnGetInfo"
|
||||||
/>
|
/>
|
||||||
<update-avatar
|
<update-avatar
|
||||||
v-model:visible="data.avatarDialog.visible"
|
v-model:visible="data.avatarDialog.visible"
|
||||||
v-model:form="data.avatarDialog.form"
|
v-model:form="data.avatarDialog.form"
|
||||||
|
@get-data="fnGetInfo"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
:route="{ path: menu.path }"
|
:route="{ path: menu.path }"
|
||||||
>
|
>
|
||||||
<component
|
<component
|
||||||
:is="'icon-application-menu'"
|
v-if="menu.meta?.icon"
|
||||||
|
:is="'icon-' + menu.meta.icon"
|
||||||
theme="filled"
|
theme="filled"
|
||||||
fill="#a5b2c2"
|
fill="#a5b2c2"
|
||||||
size="18"
|
size="18"
|
||||||
|
@ -20,7 +21,8 @@
|
||||||
<el-sub-menu v-else-if="fnIsShowSubmenu(menu)" :index="menu.path">
|
<el-sub-menu v-else-if="fnIsShowSubmenu(menu)" :index="menu.path">
|
||||||
<template #title>
|
<template #title>
|
||||||
<component
|
<component
|
||||||
:is="'icon-application-menu'"
|
v-if="menu.meta?.icon"
|
||||||
|
:is="'icon-' + menu.meta.icon"
|
||||||
theme="filled"
|
theme="filled"
|
||||||
fill="#a5b2c2"
|
fill="#a5b2c2"
|
||||||
size="18"
|
size="18"
|
||||||
|
|
|
@ -337,7 +337,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useVModels } from "@vueuse/core";
|
import { useVModels } from "@vueuse/core";
|
||||||
import { reactive, onMounted } from "vue";
|
import { reactive } from "vue";
|
||||||
import { findCharIndex } from "@/assets/js/utils.js";
|
import { findCharIndex } from "@/assets/js/utils.js";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -362,7 +362,7 @@ const data = reactive({
|
||||||
signs: [],
|
signs: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
const fnInit = () => {
|
||||||
data.info = props.pd.pd;
|
data.info = props.pd.pd;
|
||||||
const measuresList = props.pd.measuresList;
|
const measuresList = props.pd.measuresList;
|
||||||
for (let i = 0; i < measuresList.length; i++) {
|
for (let i = 0; i < measuresList.length; i++) {
|
||||||
|
@ -382,8 +382,8 @@ onMounted(() => {
|
||||||
data.gasList = props.pd.gasList;
|
data.gasList = props.pd.gasList;
|
||||||
data.gas = props.pd.gas || {};
|
data.gas = props.pd.gas || {};
|
||||||
data.signs = props.pd.signs;
|
data.signs = props.pd.signs;
|
||||||
});
|
};
|
||||||
|
fnInit();
|
||||||
const emits = defineEmits(["update:visible"]);
|
const emits = defineEmits(["update:visible"]);
|
||||||
const { visible } = useVModels(props, emits);
|
const { visible } = useVModels(props, emits);
|
||||||
const fnClose = () => {
|
const fnClose = () => {
|
||||||
|
|
|
@ -330,7 +330,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useVModels } from "@vueuse/core";
|
import { useVModels } from "@vueuse/core";
|
||||||
import { reactive, onMounted } from "vue";
|
import { reactive } from "vue";
|
||||||
import { findCharIndex } from "@/assets/js/utils.js";
|
import { findCharIndex } from "@/assets/js/utils.js";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -353,7 +353,7 @@ const data = reactive({
|
||||||
signs: [],
|
signs: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
const fnInit = () => {
|
||||||
data.info = props.pd.pd;
|
data.info = props.pd.pd;
|
||||||
const measuresList = props.pd.measuresList;
|
const measuresList = props.pd.measuresList;
|
||||||
for (let i = 0; i < measuresList.length; i++) {
|
for (let i = 0; i < measuresList.length; i++) {
|
||||||
|
@ -371,7 +371,8 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
data.measuresList = measuresList;
|
data.measuresList = measuresList;
|
||||||
data.signs = props.pd.signs;
|
data.signs = props.pd.signs;
|
||||||
});
|
};
|
||||||
|
fnInit();
|
||||||
|
|
||||||
const emits = defineEmits(["update:visible"]);
|
const emits = defineEmits(["update:visible"]);
|
||||||
const { visible } = useVModels(props, emits);
|
const { visible } = useVModels(props, emits);
|
||||||
|
|
|
@ -348,7 +348,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useVModels } from "@vueuse/core";
|
import { useVModels } from "@vueuse/core";
|
||||||
import { reactive, onMounted } from "vue";
|
import { reactive } from "vue";
|
||||||
import { findCharIndex } from "@/assets/js/utils.js";
|
import { findCharIndex } from "@/assets/js/utils.js";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -371,7 +371,7 @@ const data = reactive({
|
||||||
signs: [],
|
signs: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
const fnInit = () => {
|
||||||
data.info = props.pd.pd;
|
data.info = props.pd.pd;
|
||||||
const measuresList = props.pd.measuresList;
|
const measuresList = props.pd.measuresList;
|
||||||
for (let i = 0; i < measuresList.length; i++) {
|
for (let i = 0; i < measuresList.length; i++) {
|
||||||
|
@ -390,7 +390,8 @@ onMounted(() => {
|
||||||
data.measuresList = measuresList;
|
data.measuresList = measuresList;
|
||||||
data.gasList = props.pd.gasList;
|
data.gasList = props.pd.gasList;
|
||||||
data.signs = props.pd.signs;
|
data.signs = props.pd.signs;
|
||||||
});
|
};
|
||||||
|
fnInit();
|
||||||
|
|
||||||
const emits = defineEmits(["update:visible"]);
|
const emits = defineEmits(["update:visible"]);
|
||||||
const { visible } = useVModels(props, emits);
|
const { visible } = useVModels(props, emits);
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from "vue";
|
import { reactive } from "vue";
|
||||||
import { reduction } from "../js/map";
|
import { reduction } from "../js/map";
|
||||||
|
import { useFullscreen } from "@vueuse/core";
|
||||||
|
|
||||||
|
const { isFullscreen, toggle } = useFullscreen();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
rightOptionsList: [
|
rightOptionsList: [
|
||||||
{
|
{
|
||||||
|
@ -32,9 +34,9 @@ const data = reactive({
|
||||||
img: new URL("/src/assets/images/map/rico1.png", import.meta.url).href,
|
img: new URL("/src/assets/images/map/rico1.png", import.meta.url).href,
|
||||||
checkImg: new URL("/src/assets/images/map/rico1_on.png", import.meta.url)
|
checkImg: new URL("/src/assets/images/map/rico1_on.png", import.meta.url)
|
||||||
.href,
|
.href,
|
||||||
check: true,
|
check: isFullscreen,
|
||||||
label: "全屏",
|
label: "全屏",
|
||||||
action: fullscreen,
|
action: toggle,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
img: new URL("/src/assets/images/map/rico2.png", import.meta.url).href,
|
img: new URL("/src/assets/images/map/rico2.png", import.meta.url).href,
|
||||||
|
@ -59,19 +61,6 @@ const data = reactive({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
function fullscreen() {
|
|
||||||
const el = document.documentElement;
|
|
||||||
if (el.requestFullscreen) {
|
|
||||||
el.requestFullscreen();
|
|
||||||
} else if (el.msRequestFullscreen) {
|
|
||||||
el.msRequestFullscreen();
|
|
||||||
} else if (el.mozRequestFullScreen) {
|
|
||||||
el.mozRequestFullScreen();
|
|
||||||
} else if (el.webkitRequestFullscreen) {
|
|
||||||
el.webkitRequestFullscreen();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.right_options {
|
.right_options {
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import LayoutTitle from "./title.vue";
|
import LayoutTitle from "./title.vue";
|
||||||
import CountUp from "vue-countup-v3";
|
import CountUp from "vue-countup-v3";
|
||||||
import { onMounted, reactive } from "vue";
|
import { reactive } from "vue";
|
||||||
import echarts1 from "../js/echarts1.js";
|
import echarts1 from "../js/echarts1.js";
|
||||||
import echarts2 from "../js/echarts2.js";
|
import echarts2 from "../js/echarts2.js";
|
||||||
import {
|
import {
|
||||||
|
@ -128,19 +128,6 @@ const getCameraAlarmTypeData = async () => {
|
||||||
getCameraAlarmData();
|
getCameraAlarmData();
|
||||||
getCameraAlarmTimeData();
|
getCameraAlarmTimeData();
|
||||||
getCameraAlarmTypeData();
|
getCameraAlarmTypeData();
|
||||||
onMounted(() => {
|
|
||||||
echarts1(
|
|
||||||
"main1",
|
|
||||||
["烟雾", "水电", "烟雾", "烟雾", "烟雾"],
|
|
||||||
[12.2, 15, 11, 8, 16]
|
|
||||||
);
|
|
||||||
echarts2(
|
|
||||||
"main2",
|
|
||||||
["1月", "2月", "3月", "4月", "5月", "6月", "7月"],
|
|
||||||
[393, 831, 933, 1200, 1386, 1721, 2027],
|
|
||||||
[393, 438, 102, 267, 186, 315, 316]
|
|
||||||
);
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container {
|
.container {
|
||||||
|
|
|
@ -16,4 +16,3 @@ const { LIST_TYPE } = route.query;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
DATESTART: row.DATESTART,
|
DATESTART: row.DATESTART,
|
||||||
DATEEND: row.DATEEND,
|
DATEEND: row.DATEEND,
|
||||||
ID: row.LISTMANAGER_ID,
|
ID: row.LISTMANAGER_ID,
|
||||||
LIST_TYPE:row.LIST_TYPE,
|
LIST_TYPE: row.LIST_TYPE,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col v-if="writeresults" :span="24">
|
<el-col v-if="writeresults" :span="24">
|
||||||
<el-form-item label="检查结果" prop="CHECK_RESULT">
|
<el-form-item label="检查结果" prop="CHECK_RESULT">
|
||||||
<el-input v-model="form.CHECK_RESULT" placeholder="请输入检查结果" />
|
<el-input
|
||||||
|
v-model="form.CHECK_RESULT"
|
||||||
|
placeholder="请输入检查结果"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
|
@ -95,7 +95,6 @@ const fnGetData = async () => {
|
||||||
data.hiddenImgs = addingPrefixToFile(resData.pd.hiddenImgs);
|
data.hiddenImgs = addingPrefixToFile(resData.pd.hiddenImgs);
|
||||||
data.ysImgs = addingPrefixToFile(resData.pd.ysImgs);
|
data.ysImgs = addingPrefixToFile(resData.pd.ysImgs);
|
||||||
data.zgImgs = addingPrefixToFile(resData.pd.zgImgs);
|
data.zgImgs = addingPrefixToFile(resData.pd.zgImgs);
|
||||||
|
|
||||||
};
|
};
|
||||||
fnGetData();
|
fnGetData();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -95,7 +95,6 @@ const stateList = [
|
||||||
];
|
];
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
console.log(route);
|
|
||||||
const { INSPECTION_ID } = route.query;
|
const { INSPECTION_ID } = route.query;
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||||
|
|
Loading…
Reference in New Issue