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 { ref } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
|
@ -44,7 +42,7 @@ const props = defineProps({
|
|||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form"]);
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
|
@ -60,13 +58,10 @@ const fnSubmit = debounce(
|
|||
}
|
||||
const formData = new FormData();
|
||||
formData.append("FFILE", form.value.file[0].raw);
|
||||
const resData = await setAvatar(formData);
|
||||
await setAvatar(formData);
|
||||
fnClose();
|
||||
ElMessage.success("修改成功");
|
||||
userStore.setUserInfo({
|
||||
...userStore.getUserInfo,
|
||||
userPhoto: resData.userPhoto,
|
||||
});
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
|
|
|
@ -67,7 +67,7 @@ const props = defineProps({
|
|||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form"]);
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const formRef = ref(null);
|
||||
const validatePass = (rule, value, callback) => {
|
||||
|
@ -118,6 +118,7 @@ const fnSubmit = debounce(
|
|||
});
|
||||
fnClose();
|
||||
ElMessage.success("修改成功");
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
|
|
|
@ -52,10 +52,12 @@
|
|||
<update-info
|
||||
v-model:visible="data.userDialog.visible"
|
||||
v-model:form="data.userDialog.form"
|
||||
@get-data="fnGetInfo"
|
||||
/>
|
||||
<update-avatar
|
||||
v-model:visible="data.avatarDialog.visible"
|
||||
v-model:form="data.avatarDialog.form"
|
||||
@get-data="fnGetInfo"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
:route="{ path: menu.path }"
|
||||
>
|
||||
<component
|
||||
:is="'icon-application-menu'"
|
||||
v-if="menu.meta?.icon"
|
||||
:is="'icon-' + menu.meta.icon"
|
||||
theme="filled"
|
||||
fill="#a5b2c2"
|
||||
size="18"
|
||||
|
@ -20,7 +21,8 @@
|
|||
<el-sub-menu v-else-if="fnIsShowSubmenu(menu)" :index="menu.path">
|
||||
<template #title>
|
||||
<component
|
||||
:is="'icon-application-menu'"
|
||||
v-if="menu.meta?.icon"
|
||||
:is="'icon-' + menu.meta.icon"
|
||||
theme="filled"
|
||||
fill="#a5b2c2"
|
||||
size="18"
|
||||
|
|
|
@ -337,7 +337,7 @@
|
|||
|
||||
<script setup>
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { reactive, onMounted } from "vue";
|
||||
import { reactive } from "vue";
|
||||
import { findCharIndex } from "@/assets/js/utils.js";
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -362,7 +362,7 @@ const data = reactive({
|
|||
signs: [],
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
const fnInit = () => {
|
||||
data.info = props.pd.pd;
|
||||
const measuresList = props.pd.measuresList;
|
||||
for (let i = 0; i < measuresList.length; i++) {
|
||||
|
@ -382,8 +382,8 @@ onMounted(() => {
|
|||
data.gasList = props.pd.gasList;
|
||||
data.gas = props.pd.gas || {};
|
||||
data.signs = props.pd.signs;
|
||||
});
|
||||
|
||||
};
|
||||
fnInit();
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const { visible } = useVModels(props, emits);
|
||||
const fnClose = () => {
|
||||
|
|
|
@ -330,7 +330,7 @@
|
|||
|
||||
<script setup>
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { reactive, onMounted } from "vue";
|
||||
import { reactive } from "vue";
|
||||
import { findCharIndex } from "@/assets/js/utils.js";
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -353,7 +353,7 @@ const data = reactive({
|
|||
signs: [],
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
const fnInit = () => {
|
||||
data.info = props.pd.pd;
|
||||
const measuresList = props.pd.measuresList;
|
||||
for (let i = 0; i < measuresList.length; i++) {
|
||||
|
@ -371,7 +371,8 @@ onMounted(() => {
|
|||
}
|
||||
data.measuresList = measuresList;
|
||||
data.signs = props.pd.signs;
|
||||
});
|
||||
};
|
||||
fnInit();
|
||||
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const { visible } = useVModels(props, emits);
|
||||
|
|
|
@ -348,7 +348,7 @@
|
|||
|
||||
<script setup>
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { reactive, onMounted } from "vue";
|
||||
import { reactive } from "vue";
|
||||
import { findCharIndex } from "@/assets/js/utils.js";
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -371,7 +371,7 @@ const data = reactive({
|
|||
signs: [],
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
const fnInit = () => {
|
||||
data.info = props.pd.pd;
|
||||
const measuresList = props.pd.measuresList;
|
||||
for (let i = 0; i < measuresList.length; i++) {
|
||||
|
@ -390,7 +390,8 @@ onMounted(() => {
|
|||
data.measuresList = measuresList;
|
||||
data.gasList = props.pd.gasList;
|
||||
data.signs = props.pd.signs;
|
||||
});
|
||||
};
|
||||
fnInit();
|
||||
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const { visible } = useVModels(props, emits);
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
import { reduction } from "../js/map";
|
||||
import { useFullscreen } from "@vueuse/core";
|
||||
|
||||
const { isFullscreen, toggle } = useFullscreen();
|
||||
const data = reactive({
|
||||
rightOptionsList: [
|
||||
{
|
||||
|
@ -32,9 +34,9 @@ const data = reactive({
|
|||
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)
|
||||
.href,
|
||||
check: true,
|
||||
check: isFullscreen,
|
||||
label: "全屏",
|
||||
action: fullscreen,
|
||||
action: toggle,
|
||||
},
|
||||
{
|
||||
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>
|
||||
<style scoped lang="scss">
|
||||
.right_options {
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<script setup>
|
||||
import LayoutTitle from "./title.vue";
|
||||
import CountUp from "vue-countup-v3";
|
||||
import { onMounted, reactive } from "vue";
|
||||
import { reactive } from "vue";
|
||||
import echarts1 from "../js/echarts1.js";
|
||||
import echarts2 from "../js/echarts2.js";
|
||||
import {
|
||||
|
@ -128,19 +128,6 @@ const getCameraAlarmTypeData = async () => {
|
|||
getCameraAlarmData();
|
||||
getCameraAlarmTimeData();
|
||||
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>
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
|
|
|
@ -16,4 +16,3 @@ const { LIST_TYPE } = route.query;
|
|||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
<el-row>
|
||||
<el-col v-if="writeresults" :span="24">
|
||||
<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-col>
|
||||
<el-col :span="24">
|
||||
|
|
|
@ -95,7 +95,6 @@ const fnGetData = async () => {
|
|||
data.hiddenImgs = addingPrefixToFile(resData.pd.hiddenImgs);
|
||||
data.ysImgs = addingPrefixToFile(resData.pd.ysImgs);
|
||||
data.zgImgs = addingPrefixToFile(resData.pd.zgImgs);
|
||||
|
||||
};
|
||||
fnGetData();
|
||||
</script>
|
||||
|
|
|
@ -95,7 +95,6 @@ const stateList = [
|
|||
];
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
console.log(route);
|
||||
const { INSPECTION_ID } = route.query;
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
|
|
Loading…
Reference in New Issue