Merge branch 'hc-dataproduct-v1112' into lsf-dataproduct-1024
| | |
| | | BaseContentLayout: typeof import('./components/core/BaseContentLayout.vue')['default'] |
| | | BaseMap: typeof import('./components/map/BaseMap.vue')['default'] |
| | | BasePanelLayout: typeof import('./components/core/BasePanelLayout.vue')['default'] |
| | | CompGenericWrapper: typeof import('./components/CompGenericWrapper.vue')['default'] |
| | | CompQuickSet: typeof import('./components/search-option/CompQuickSet.vue')['default'] |
| | | Content: typeof import('./components/core/Content.vue')['default'] |
| | | ElAside: typeof import('element-plus/es')['ElAside'] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- dialogå
裹 --> |
| | | <el-dialog v-if="currType == 'dialog'" :title="title" :model-value="visible" @opened="$emit('update:visible', true)" |
| | | @closed="$emit('update:visible', false)" destroy-on-close> |
| | | <div v-if="visible"> |
| | | <slot name="content"></slot> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- drawerå
裹 --> |
| | | <el-drawer v-if="currType == 'drawer'" :title="title" size="45%" direction="ltr" :model-value="visible" |
| | | @opened="$emit('update:visible', true)" @closed="$emit('update:visible', false)" destroy-on-close> |
| | | <slot name="content"></slot> |
| | | </el-drawer> |
| | | <!-- é»è®¤æ å
裹 --> |
| | | <div v-if="currType == 'normal'"> |
| | | <slot></slot> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import { ref, defineEmits, watch } from 'vue'; |
| | | const props = defineProps({ |
| | | visible: Boolean, |
| | | title: String, |
| | | type: { |
| | | type: String, |
| | | default: 'normal' |
| | | } |
| | | }); |
| | | const typeOptions = ref([ |
| | | { id: '0', label: 'dialog' }, |
| | | { id: '1', label: 'drawer' }, |
| | | { id: '10', label: '' } |
| | | ]); |
| | | const currType = ref(''); |
| | | const emit = defineEmits(['update:visible']); |
| | | watch( |
| | | () => props.type, |
| | | (nValue) => { |
| | | currType.value = nValue; |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | </script> |
| | | <style scoped> |
| | | ::v-deep .el-drawer__body { |
| | | padding-top: 0; |
| | | } |
| | | |
| | | ::v-deep .el-drawer__header { |
| | | margin-bottom: 16px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-dialog |
| | | :model-value="dialogVisible" |
| | | @opened="$emit('update:dialogVisible', true)" |
| | | @closed="$emit('update:dialogVisible', false)" |
| | | @opened="handleOpen" |
| | | @closed="handleClose" |
| | | width="66%" |
| | | destroy-on-close |
| | | > |
| | |
| | | class="imgs" |
| | | > |
| | | <el-image |
| | | v-loading="img.loading" |
| | | v-for="(img, i) in typeImgMap.get(activeId)" |
| | | :key="i" |
| | | :class="[img.isSelect ? 'selected' : 'noActive', 'image']" |
| | | fit="cover" |
| | | :src="img.url" |
| | | @click="onSelect(img, i)" |
| | | @load="onOneImgLoadSuccess" |
| | | @error="onOneImgLoadError" |
| | | @load="onOneImgLoadSuccess(img)" |
| | | @error="onOneImgLoadError(img)" |
| | | /> |
| | | </el-scrollbar> |
| | | <el-row v-else justify="space-between"> |
| | |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref, watch, computed } from 'vue'; |
| | | import { ref, watch, computed, onMounted, onUnmounted } from 'vue'; |
| | | |
| | | const props = defineProps({ |
| | | dialogVisible: Boolean, |
| | |
| | | loadedImgCount.value |
| | | ); |
| | | }); |
| | | function onOneImgLoadError(e) { |
| | | function onOneImgLoadError(img) { |
| | | img.loading = false |
| | | loadedImgCount.value++; |
| | | } |
| | | function onOneImgLoadSuccess(e) { |
| | | function onOneImgLoadSuccess(img) { |
| | | img.loading = false |
| | | loadedImgCount.value++; |
| | | } |
| | | watch( |
| | |
| | | img.isSelect = false; |
| | | } |
| | | } |
| | | |
| | | function handleOpen() { |
| | | // if (props.typeImgMap.get(activeId.value) == undefined) { |
| | | // return; |
| | | // } |
| | | // props.typeImgMap.get(activeId.value).forEach((i) => { |
| | | // if (i.isSelect == true) { |
| | | // return; |
| | | // } |
| | | // props.defaultFile.forEach((imgItem) => { |
| | | // if (imgItem.url == i.url) { |
| | | // i.isSelect = true; |
| | | // selectedImgUrlList.value.push(i); |
| | | // } |
| | | // }); |
| | | // }); |
| | | emit('update:dialogVisible', true) |
| | | } |
| | | function handleClose() { |
| | | selectedImgUrlList.value.forEach(item => item.isSelect = false) |
| | | selectedImgUrlList.value = [] |
| | | emit('update:dialogVisible', false) |
| | | } |
| | | function handleSubmit() { |
| | | emit('submit', selectedImgUrlList.value); |
| | | emit('update:dialogVisible', false); |
| | |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | // watch( |
| | | // () => props.defaultFile, |
| | | // (nV, oV) => { |
| | | // if (props.typeImgMap.get(activeId.value) == undefined) { |
| | | // return; |
| | | // } |
| | | // props.typeImgMap.get(activeId.value).forEach((i) => { |
| | | // if (i.isSelect == true) { |
| | | // return; |
| | | // } |
| | | // nV.forEach((imgItem) => { |
| | | // if (imgItem.url == i.url) { |
| | | // i.isSelect = true; |
| | | // selectedImgUrlList.value.push(i); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // }, |
| | | // { deep: true, immediate: true } |
| | | // ); |
| | | |
| | | watch( |
| | | () => props.typeImgMap, |
| | | (newMap, oldMap) => { |
| | | if (newMap.get(activeId.value) == undefined) { |
| | | return; |
| | | } |
| | | newMap.get(activeId.value).forEach((i) => { |
| | | if (i.isSelect == true) { |
| | | return; |
| | | } |
| | | props.defaultFile.forEach((imgItem) => { |
| | | if (imgItem.url == i.url) { |
| | | i.isSelect = true; |
| | | selectedImgUrlList.value.push(i); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | { deep: true, immediate: true } |
| | | ); |
| | | // watch( |
| | | // () => props.typeImgMap, |
| | | // (newMap, oldMap) => { |
| | | // if (newMap.get(activeId.value) == undefined) { |
| | | // return; |
| | | // } |
| | | // newMap.get(activeId.value).forEach((i) => { |
| | | // if (i.isSelect == true) { |
| | | // return; |
| | | // } |
| | | // props.defaultFile.forEach((imgItem) => { |
| | | // if (imgItem.url == i.url) { |
| | | // i.isSelect = true; |
| | | // selectedImgUrlList.value.push(i); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // }, |
| | | // { immediate: true } |
| | | // ); |
| | | </script> |
| | | <style scoped> |
| | | .center { |
| | |
| | | <template> |
| | | <FYImageSelectDialog |
| | | v-loading="loading" |
| | | title="åºæ¯å¾ç" |
| | | :typeList="typesList" |
| | | :typeImgMap="typesMap" |
| | |
| | | return { |
| | | // æ æ°æ® |
| | | typesList: [], |
| | | typesMap: new Map() |
| | | typesMap: new Map(), |
| | | loading: true, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | // å¾çåç±» |
| | | getGroupImgs() { |
| | | mediafileApi.getRoutineByStGuid(this.subtask.stGuid).then((res) => { |
| | | this.loading = true |
| | | let typeList = []; |
| | | let typeMap = new Map(); |
| | | const data = res.data; |
| | |
| | | } |
| | | this.typesList = typeList; |
| | | this.typesMap = typeMap; |
| | | }); |
| | | }).finally(() => (this.loading = false)); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped></style> |
| | | |
| | |
| | | </template> |
| | | <script> |
| | | import problemApi from '@/api/fysp/problemApi.js'; |
| | | import CompGenericWrapper from './CompGenericWrapper.vue'; |
| | | import { $fysp } from '@/api/index.js'; |
| | | import fileUtil from '@/utils/fileUtils.js'; |
| | | import { useCloned } from '@vueuse/core'; |
| | |
| | | export default { |
| | | emits: ['submit', 'cancel'], |
| | | components: { |
| | | CompGenericWrapper |
| | | }, |
| | | watch: { |
| | | oldChangeFileList: { |
| | |
| | | <template> |
| | | <FYImageSelectDialog |
| | | v-loading="loading" |
| | | title="设å¤å¾ç" |
| | | :typeList="typeList" |
| | | :typeImgMap="typeImgMap" |
| | |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { $fysp } from '@/api/index.js'; |
| | | const loading = ref(true) |
| | | const props = defineProps({ |
| | | // å±ç¤ºæ¨¡å¼ |
| | | mode: { |
| | |
| | | const topTypeId = deviceTopTypeElement.typeId; |
| | | deviceImgMap.set(topTypeId, []); |
| | | deviceApi.fetchDevices(props.subtask.sceneId, topTypeId).then((result) => { |
| | | loading.value = true; |
| | | // æ åå屿§å |
| | | for (let i = 0; i < result.data.length; i++) { |
| | | var element = convertKeys(result.data[i]); |
| | |
| | | deviceImgMap.get(topTypeId).push(newDevice); |
| | | } |
| | | } |
| | | }); |
| | | }).finally(() => (loading.value = false)); |
| | | } |
| | | }); |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import CompGenericWrapper from './CompGenericWrapper.vue'; |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | import { $fysp } from '@/api/index'; |
| | | import { toLabel } from '@/enum/device/device'; |
| | | export default { |
| | | components: { CompGenericWrapper }, |
| | | components: { }, |
| | | watch: { |
| | | // éæ©æ¹åçå¬ |
| | | currSelect: { |
| | |
| | | <template> |
| | | <FYImageSelectDialog |
| | | v-loading="loading" |
| | | title="å°è´¦å¾ç" |
| | | :typeList="typeList" |
| | | :typeImgMap="typeImgMap" |
| | |
| | | import userApi from '@/api/fysp/userApi.js'; |
| | | import { svToTz } from '@/enum/scene'; |
| | | import { $fytz } from '@/api/index'; |
| | | const loading = ref(true) |
| | | const props = defineProps({ |
| | | // å±ç¤ºæ¨¡å¼ |
| | | mode: { |
| | |
| | | const typeImgMap = ref(new Map()); |
| | | function getList() { |
| | | userApi.getTzId(props.subtask.sceneId).then((res) => { |
| | | loading.value = true |
| | | let tzUserId = res.tzUserId; |
| | | |
| | | problemApiFytz |
| | |
| | | typeImgMap.value.get(type.typeId).push(item); |
| | | }); |
| | | } |
| | | }); |
| | | }).finally(() => loading.value = false); |
| | | }); |
| | | } |
| | | function getMonth() { |
| | |
| | | </CompGenericWrapper> |
| | | </template> |
| | | <script> |
| | | import CompGenericWrapper from './CompGenericWrapper.vue'; |
| | | import CompProblemAddOrUpd from './CompProblemAddOrUpd.vue'; |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import { useCloned } from '@vueuse/core'; |
| | |
| | | }, |
| | | components: { |
| | | CompProblemAddOrUpd, |
| | | CompGenericWrapper |
| | | }, |
| | | mounted() {}, |
| | | data() { |
| | |
| | | </CompGenericWrapper> |
| | | </template> |
| | | <script> |
| | | import CompGenericWrapper from './CompGenericWrapper.vue'; |
| | | import ArbitraryPhoto from './ArbitraryPhoto.vue'; |
| | | import CompLedgerPhoto from './CompLedgerPhoto.vue'; |
| | | import CompDevicePhoto from './CompDevicePhoto.vue'; |
| | |
| | | ArbitraryPhoto, |
| | | CompDevicePhoto, |
| | | CompLedgerPhoto, |
| | | CompGenericWrapper |
| | | }, |
| | | props: { |
| | | readonly: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // fixme 2024.11.20 åç»ä»¶åå§åæ¶æºé®é¢ |
| | | initPropsCount: 0, |
| | | // åå§é¢è§å¾çindex |
| | | initialIndex: -1, |
| | | // å¾çéæ©æå¤§æ°é |
| | |
| | | }, |
| | | deep: true |
| | | }, |
| | | initPropsCount: { |
| | | handler(nv, ov) { |
| | | if (nv >= 3) { |
| | | this.initOptions(); |
| | | } |
| | | }, |
| | | immediate: true |
| | | }, |
| | | problem: { |
| | | handler(nv, ov) { |
| | | this.initOptions(); |
| | | } |
| | | if (nv != null && nv != undefined) { |
| | | this.initPropsCount++; |
| | | } |
| | | }, |
| | | immediate: true |
| | | }, |
| | | topTask: { |
| | | handler(nv, ov) { |
| | | if (nv != null && nv != undefined) { |
| | | this.initPropsCount++; |
| | | } |
| | | }, |
| | | immediate: true |
| | | }, |
| | | subtask: { |
| | | handler(nv, ov) { |
| | | if (nv != null && nv != undefined) { |
| | | this.initPropsCount++; |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | return array; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initOptions(); |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | onProAdviseChange(value) { |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advice; |
| | | }, |
| | | handlePictureCardPreview(uploadFile) { |
| | | this.initialIndex = this.fileList.indexOf(uploadFile) |
| | | this.initialIndex = this.fileList.indexOf(uploadFile); |
| | | this.previewDialogVisible = true; |
| | | this.previewDialogImageUrl = uploadFile.url; |
| | | }, |