| | |
| | | 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'] |
| | | ElAffix: typeof import('element-plus/es')['ElAffix'] |
| | |
| | | ElHeader: typeof import('element-plus/es')['ElHeader'] |
| | | ElIcon: typeof import('element-plus/es')['ElIcon'] |
| | | ElImage: typeof import('element-plus/es')['ElImage'] |
| | | ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] |
| | | ElInput: typeof import('element-plus/es')['ElInput'] |
| | | ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] |
| | | ElLink: typeof import('element-plus/es')['ElLink'] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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 |
| | | :title="title" |
| | | :model-value="dialogVisible" |
| | | @opened="$emit('update:dialogVisible', true)" |
| | | @closed="$emit('update:dialogVisible', false)" |
| | | @opened="handleOpen" |
| | | @closed="handleClose" |
| | | width="66%" |
| | | destroy-on-close |
| | | > |
| | | <div class="main" v-loading="loading"> |
| | | <div class="main"> |
| | | <el-row justify="end" v-if="!readonly"> |
| | | <el-text size="small" type="info" class="m-r-8" |
| | | >æå¤éæ©{{ maxSelect }}å¼ å¾ç</el-text |
| | |
| | | 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({ |
| | | // æ é¢ |
| | | title: String, |
| | | 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> |
| | | <div v-if="legend" class="state-label"> |
| | | <el-input |
| | | v-model="filterText" |
| | | icon="Search" |
| | | style="width: 200px" |
| | | placeholder="å
³é®åçé" |
| | | clearable |
| | | /> |
| | | <el-tooltip placement="bottom-start" effect="dark"> |
| | | <template #content> |
| | | <el-space> |
| | | <el-space v-for="(item, index) in stateLabels" :key="index" :size="1"> |
| | | <el-icon :color="item.color"> |
| | | <component :is="item.icon"></component> |
| | | </el-icon> |
| | | {{ item.name }} |
| | | <!-- <el-text size="small">{{ item.name }}</el-text> --> |
| | | </el-space> |
| | | </el-space> |
| | | <br /> |
| | | <el-space> |
| | | <el-space :size="1"> |
| | | <el-icon :size="16" color="var(--el-color-success)"> |
| | | <Avatar /> |
| | | </el-icon> |
| | | æ£å¨æ§è¡å·¡æ¥ |
| | | </el-space> |
| | | <el-space :size="1"> |
| | | <el-icon :size="16" color="var(--el-color-info)"> |
| | | <Avatar /> |
| | | </el-icon> |
| | | æªæ§è¡ |
| | | </el-space> |
| | | </el-space> |
| | | </template> |
| | | <el-space> |
| | | <el-icon class="cursor-p" :size="16" color="var(--el-color-primary)" |
| | | ><QuestionFilled |
| | | /></el-icon> |
| | | <el-text size="small" class="cursor-p">å®¡æ ¸ç¶æå¾ä¾</el-text> |
| | | </el-space> |
| | | </el-tooltip> |
| | | </div> |
| | | <el-tree |
| | | ref="treeRef" |
| | | class="el-tree" |
| | | v-loading="isLoading" |
| | | :data="dataList" |
| | | :props="defaultProps" |
| | | @node-click="handleNodeClick" |
| | | :filter-node-method="filterNode" |
| | | default-expand-all |
| | | highlight-current |
| | | check-on-click-node |
| | |
| | | : 'custom-tree-node' |
| | | " |
| | | > |
| | | <el-icon v-if="data.type == 2" color="var(--el-color-success)" |
| | | ><SuccessFilled |
| | | /></el-icon> |
| | | <el-icon v-else-if="data.type == 1" color="var(--el-color-warning)" |
| | | ><WarningFilled |
| | | /></el-icon> |
| | | <el-icon v-else-if="data.type == 0" color="var(--el-color-danger)" |
| | | ><WarningFilled |
| | | /></el-icon> |
| | | <div>{{ node.label }}</div> |
| | | <el-icon |
| | | v-if="data.status == 'æ£å¨æ§è¡'" |
| | | :size="16" |
| | | color="var(--el-color-success)" |
| | | style="margin-left: -16px" |
| | | > |
| | | <Avatar /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-if="data.status == 'æªæ§è¡'" |
| | | :size="16" |
| | | color="var(--el-color-info)" |
| | | style="margin-left: -16px" |
| | | > |
| | | <Avatar /> |
| | | </el-icon> |
| | | <!-- <el-icon :color="stateLabels[data.type].color"> |
| | | <component :is="stateLabels[data.type].icon"></component> |
| | | </el-icon> --> |
| | | <el-icon |
| | | v-if="data.type == 0" |
| | | :size="16" |
| | | color="var(--el-color-info)" |
| | | > |
| | | <SuccessFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 1" |
| | | :size="16" |
| | | color="var(--el-color-danger)" |
| | | > |
| | | <QuestionFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 2" |
| | | :size="16" |
| | | color="var(--el-color-warning)" |
| | | > |
| | | <QuestionFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 3" |
| | | :size="16" |
| | | color="var(--el-color-danger)" |
| | | > |
| | | <WarnTriangleFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 4" |
| | | :size="16" |
| | | color="var(--el-color-danger)" |
| | | > |
| | | <WarningFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 5" |
| | | :size="16" |
| | | color="var(--el-color-warning)" |
| | | > |
| | | <WarningFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 6" |
| | | :size="16" |
| | | color="var(--el-color-success)" |
| | | > |
| | | <SuccessFilled /> |
| | | </el-icon> |
| | | <!-- <el-text>{{ node.label }}</el-text> --> |
| | | {{ node.label }} |
| | | <span v-if="data.count"> |
| | | {{ '_(' + data.count + ')' }} |
| | | <!-- <el-text size="small">ç¹æ¬¡</el-text>) --> |
| | | </span> |
| | | </div> |
| | | </slot> |
| | | </template> |
| | |
| | | } |
| | | ] |
| | | }, |
| | | loading: Boolean |
| | | loading: Boolean, |
| | | // æ¯å¦å±ç¤ºå¾ä¾ |
| | | legend: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | emits: ['itemClick'], |
| | | data() { |
| | | return { |
| | | filterText: '', |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'title' |
| | | }, |
| | | isLoading: this.loading |
| | | isLoading: this.loading, |
| | | stateLabels: [ |
| | | { |
| | | color: 'var(--el-color-info)', |
| | | name: 'æ é®é¢', |
| | | icon: 'SuccessFilled' |
| | | }, |
| | | { |
| | | color: 'var(--el-color-danger)', |
| | | name: 'é®é¢æªå®¡æ ¸', |
| | | icon: 'QuestionFilled' |
| | | }, |
| | | { |
| | | color: 'var(--el-color-warning)', |
| | | name: 'é®é¢é¨åå®¡æ ¸', |
| | | icon: 'QuestionFilled' |
| | | }, |
| | | { |
| | | color: 'var(--el-color-danger)', |
| | | name: 'æªæ´æ¹', |
| | | icon: 'WarnTriangleFilled' |
| | | }, |
| | | { |
| | | color: 'var(--el-color-danger)', |
| | | name: 'æ´æ¹æªå®¡æ ¸', |
| | | icon: 'WarningFilled' |
| | | }, |
| | | { |
| | | color: 'var(--el-color-warning)', |
| | | name: 'æ´æ¹é¨åå®¡æ ¸', |
| | | icon: 'WarningFilled' |
| | | }, |
| | | { |
| | | color: 'var(--el-color-success)', |
| | | name: 'å®¡æ ¸å®æ', |
| | | icon: 'SuccessFilled' |
| | | } |
| | | ] |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | for (const [key, value] of itemMap) { |
| | | const i = { |
| | | title: key, |
| | | count: value.length, |
| | | children: [] |
| | | }; |
| | | value.forEach((v) => { |
| | |
| | | } |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.treeRef.filter(val); |
| | | }, |
| | | loading(nValue) { |
| | | this.isLoading = nValue; |
| | | }, |
| | |
| | | dataList(nValue) { |
| | | if (this.isLoading) { |
| | | if (nValue.length > 0) { |
| | | this.dataList.forEach((d) => { |
| | | d.children.forEach((c) => { |
| | | c.selected = false; |
| | | }); |
| | | }); |
| | | // this.dataList.forEach((d) => { |
| | | // d.children.forEach((c) => { |
| | | // c.selected = false; |
| | | // }); |
| | | // }); |
| | | if (nValue[0].children.length > 0) { |
| | | const c = nValue[0].children[0]; |
| | | c.selected = true; |
| | | // c.selected = true; |
| | | this.$emit('itemClick', c); |
| | | } else { |
| | | nValue[0].selected = true; |
| | | // nValue[0].selected = true; |
| | | } |
| | | } |
| | | this.isLoading = false; |
| | |
| | | }, |
| | | methods: { |
| | | handleNodeClick(data) { |
| | | this.dataList.forEach((d) => { |
| | | d.children.forEach((c) => { |
| | | c.selected = false; |
| | | }); |
| | | }); |
| | | data.selected = true; |
| | | // this.dataList.forEach((d) => { |
| | | // d.children.forEach((c) => { |
| | | // c.selected = false; |
| | | // }); |
| | | // }); |
| | | // data.selected = true; |
| | | //ç¶èç¹çç¹å»äºä»¶ä¸åä¼ é |
| | | if (data.children == undefined) { |
| | | this.$emit('itemClick', data); |
| | | } |
| | | }, |
| | | |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.title.includes(value); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .el-tree { |
| | | // background-color: aliceblue; |
| | | // width: var(--el-aside-width, 200px) |
| | | } |
| | | |
| | | .custom-tree-node { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | .selected-tree-node { |
| | | color: var(--el-color-primary); |
| | | } |
| | | |
| | | .state-label { |
| | | position: sticky; |
| | | z-index: 1; |
| | | top: 0; |
| | | background-color: white; |
| | | // box-shadow: var(--el-box-shadow-light); |
| | | border-bottom: var(--el-border); |
| | | display: flex; |
| | | padding-bottom: 4px; |
| | | } |
| | | </style> |
| | |
| | | :key="i" |
| | | :type="b.color ? b.color : 'primary'" |
| | | size="small" |
| | | plain |
| | | @click="b.click" |
| | | >{{ b.name }}</el-button |
| | | > |
| | |
| | | </el-row> |
| | | <el-row class="tag-group" v-if="title"> |
| | | <el-space> |
| | | <el-tag v-for="(d, i) in descriptions" :key="i" type="info" size="small">{{ |
| | | <el-tag v-for="(d, i) in descriptions" :key="i" :type="d.type" size="small">{{ |
| | | d.name + ': ' + d.value |
| | | }}</el-tag> |
| | | </el-space> |
| | |
| | | </el-header> |
| | | <el-container> |
| | | <el-aside class="el-aside" :style="'height: ' + mainHeight"> |
| | | <el-scrollbar> |
| | | <el-scrollbar :noresize="true" style="position: relative;"> |
| | | <slot name="aside"></slot> |
| | | </el-scrollbar> |
| | | </el-aside> |
| | |
| | | <style scoped> |
| | | .el-aside { |
| | | /* width: initial; */ |
| | | /* overflow-x: auto; */ |
| | | position: relative; |
| | | /* height: calc(100vh - 60px * 2 - 20px * 2); */ |
| | | /* background-color: aqua; */ |
| | |
| | | </template> |
| | | <template #aside> |
| | | <SideList |
| | | legend |
| | | :items="subtasks" |
| | | :loading="sideLoading" |
| | | @item-click="chooseSubtask" |
| | |
| | | class="el-scrollbar" |
| | | v-loading="mainLoading" |
| | | > |
| | | <template v-if="compProblemCardVisible"> |
| | | <CompProblemCard |
| | | :key="i" |
| | | v-for="(p, i) in curProList" |
| | | :index="i + 1" |
| | | :problem="p" |
| | | :subtask="curSubtask.data" |
| | | :topTask="topTask" |
| | | @updated="onProSubmited" |
| | | @submit="updateSubtask" |
| | | ></CompProblemCard> |
| | | </template> |
| | | <CompProblemCard |
| | | :key="i" |
| | | v-for="(p, i) in curProList" |
| | | :index="i + 1" |
| | | :problem="p" |
| | | :subtask="curSubtask.data" |
| | | :topTask="topTask" |
| | | @submit="updateSubtask" |
| | | @check="handleProblemCheck" |
| | | ></CompProblemCard> |
| | | </el-scrollbar> |
| | | <el-empty v-else description="ææ è®°å½" v-loading="mainLoading" /> |
| | | <el-empty v-else description="ææ é®é¢" v-loading="mainLoading" /> |
| | | </template> |
| | | </BaseContentLayout> |
| | | <el-dialog |
| | | v-model="proAddOrUpdDialogVisible" |
| | | :before-close="proAddOrUpdDialogClose" |
| | | width="50%" |
| | | <CompProblemAddOrUpd |
| | | title="æ°å¢é®é¢" |
| | | > |
| | | <CompProblemAddOrUpd |
| | | v-if="proAddOrUpdDialogVisible" |
| | | :subtask="curSubtask.data" |
| | | :topTask="topTask" |
| | | ref="compProblemAddOrUpdRef" |
| | | @submited="newProSubmit" |
| | | /> |
| | | </el-dialog> |
| | | v-if="proAddOrUpdDialogVisible" |
| | | v-model:visible="proAddOrUpdDialogVisible" |
| | | :subtask="curSubtask.data" |
| | | :topTask="topTask" |
| | | ref="compProblemAddOrUpdRef" |
| | | @cancel="onAddProCanceled" |
| | | @submit="updateSubtask" |
| | | /> |
| | | <ArbitraryPhoto |
| | | v-if="anyPhotoDialog" |
| | | v-model:dialog-visible="anyPhotoDialog" |
| | |
| | | :subtask="curSubtask.data" |
| | | ref="arbitraryPhotoRef" |
| | | ></ArbitraryPhoto> |
| | | <el-drawer |
| | | direction="ltr" |
| | | v-model="deviceShowDialog" |
| | | :before-close="beforeDeviceShowDialogclose" |
| | | <CompDeviceShowTest |
| | | title="设æ½è®¾å¤" |
| | | size="45%" |
| | | v-model:visible="deviceShowDialog" |
| | | v-if="deviceShowDialog" |
| | | ref="deviceShowRef" |
| | | > |
| | | <CompDeviceShowTest v-if="deviceShowDialog" ref="deviceShowRef"> |
| | | </CompDeviceShowTest> |
| | | </el-drawer> |
| | | </CompDeviceShowTest> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | compProblemCardVisible: true, |
| | | // 设å¤å¾ |
| | | deviceShowDialog: false, |
| | | // ä»»æå¾ |
| | |
| | | buttons: [ |
| | | { |
| | | name: 'æ°å¢é®é¢', |
| | | color: 'success', |
| | | // color: 'success', |
| | | color: 'primary', |
| | | click: () => { |
| | | this.proAddOrUpdDialogVisible = true; |
| | | } |
| | | }, |
| | | { |
| | | name: 'åºæ¯å¾ç', |
| | | color: 'warning', |
| | | // color: 'warning', |
| | | color: 'primary', |
| | | click: () => { |
| | | this.anyPhotoDialog = true; |
| | | } |
| | | }, |
| | | { |
| | | name: '设æ½è®¾å¤', |
| | | color: 'info', |
| | | color: 'primary', |
| | | click: () => { |
| | | this.openDeviceShowDialog(); |
| | | } |
| | |
| | | this.$refs.deviceShowRef.init(this.curSubtask.data.scene); |
| | | }); |
| | | }, |
| | | // å
³é设å¤å¾å¼¹çª |
| | | beforeDeviceShowDialogclose(done) { |
| | | // this.deviceShowDialog = false; |
| | | done(); |
| | | }, |
| | | // å
³éä»»æå¾çå¼¹çª |
| | | beforeAnyPhotoDialogclose() { |
| | | this.anyPhotoDialog = false; |
| | | }, |
| | | handleCloseCheckAnyPhono() { |
| | | this.beforeAnyPhotoDialogclose(); |
| | | }, |
| | | proAddOrUpdDialogClose() { |
| | | this.proAddOrUpdDialogVisible = false; |
| | | }, |
| | | //æ¥è¯¢åä»»å¡ç»è®¡ä¿¡æ¯ |
| | | search(formSearch) { |
| | | this.topTask = formSearch.topTask; |
| | |
| | | taskApi.getSubtaskSummary(param).then((res) => { |
| | | const list = []; |
| | | res.forEach((s) => { |
| | | const t = this.getSubtaskType(s); |
| | | const t = ProCheckProxy.getSubtaskType(s); |
| | | list.push({ |
| | | status: s.subtask.status, |
| | | type: t, |
| | | title: s.stName, |
| | | categoly: s.stPlanTime.split('T')[0], |
| | |
| | | this.mainLoading = false; |
| | | } |
| | | }); |
| | | }, |
| | | //è·åä»»å¡é®é¢çå®¡æ ¸æ
åµ |
| | | getSubtaskType(s) { |
| | | let type = 0; |
| | | if (s.proNum == 0) { |
| | | type = 2; |
| | | } else if (s.proCheckedNum == 0) { |
| | | type = 0; |
| | | } else if (s.proCheckedNum < s.proNum) { |
| | | type = 1; |
| | | } else { |
| | | type = 2; |
| | | } |
| | | return type; |
| | | }, |
| | | //ç¹å»å·¦ä¾§èåä»»å¡äºä»¶ |
| | | chooseSubtask(s) { |
| | |
| | | this.mainLoading = false; |
| | | }); |
| | | }, |
| | | onAddProCanceled() { |
| | | }, |
| | | // é®é¢å¡çç»ä»¶ä¸»å¨åèµ·å·æ°ç¶ç»ä»¶æ°æ® |
| | | updateSubtask(refresh = true) { |
| | | updateSubtask(refresh = false) { |
| | | this.curSubtask.data.proCheckedNum++; |
| | | this.curSubtask.type = this.getSubtaskType(this.curSubtask.data); |
| | | if (refresh) { |
| | | this.refreshCurrSubtask(); |
| | | this.curSubtask.type = ProCheckProxy.getSubtaskType(this.curSubtask.data); |
| | | if (this.proAddOrUpdDialogVisible) { |
| | | this.proAddOrUpdDialogVisible = false; |
| | | } |
| | | }, |
| | | onProSubmited(isOk) { |
| | | this.proAddOrUpdDialogClose(); |
| | | if (!isOk) { |
| | | return; |
| | | } |
| | | this.updateSubtask(); |
| | | }, |
| | | newProSubmit(isOk) { |
| | | this.proAddOrUpdDialogVisible = false; |
| | | if (!isOk) { |
| | | return; |
| | | } |
| | | this.refreshCurrSubtask(); |
| | | this.refreshCurrSubtask(refresh); |
| | | }, |
| | | // å·æ°å½åéä¸åä»»å¡ |
| | | refreshCurrSubtask() { |
| | | this.compProblemCardVisible = false; |
| | | refreshCurrSubtask(refresh) { |
| | | this.sideLoading = false; |
| | | this.mainLoading = true; |
| | | // this.mainLoading = true; |
| | | setTimeout(() => { |
| | | taskApi |
| | | .getProBySubtask(this.curSubtask.data.stGuid) |
| | | .then((res) => { |
| | | this.curProList = res; |
| | | if (refresh) { |
| | | this.curProList = res; |
| | | return; |
| | | } |
| | | const currProLen = this.curProList.length; |
| | | // 䏿¹åæ°ç»å¯¹åå¼ç¨çåæä¸éæ°èµå¼ |
| | | for (let index = 0; index < res.length; index++) { |
| | | const element = res[index]; |
| | | if (currProLen < index + 1) { |
| | | this.curProList.push(element); |
| | | } else { |
| | | this.curProList[index] = element; |
| | | } |
| | | } |
| | | // this.curSubtask = s; |
| | | }) |
| | | .finally(() => { |
| | | this.mainLoading = false; |
| | | this.compProblemCardVisible = true; |
| | | // this.mainLoading = false; |
| | | }); |
| | | }, 150); |
| | | }, |
| | | // é®é¢å®¡æ ¸å®æåï¼æ´æ°å·¦ä¾§å表对åºåä»»å¡ç¶æ |
| | | handleProblemCheck(){ |
| | | const status = ProCheckProxy.calProStatus(this.curProList) |
| | | this.curSubtask.data.proNum = status.proNum |
| | | this.curSubtask.data.proCheckedNum = status.proCheckedNum |
| | | this.curSubtask.data.changeNum = status.changeNum |
| | | this.curSubtask.data.changeCheckedNum = status.changeCheckedNum |
| | | this.curSubtask.type = ProCheckProxy.getSubtaskType(this.curSubtask.data) |
| | | } |
| | | }, |
| | | mounted() {} |
| | |
| | | import { $fysp } from '@/api/index' |
| | | import { $fysp } from '@/api/index'; |
| | | |
| | | //é®é¢ç¶æ |
| | | const proStatus = { |
| | |
| | | change_unCheck: 'change_unCheck', |
| | | change_fail: 'change_fail', |
| | | change_pass: 'change_pass' |
| | | } |
| | | }; |
| | | |
| | | export default { |
| | | //ç»è®¡é®é¢ |
| | |
| | | const status = { |
| | | //é®é¢æ°é |
| | | proNum: proList.length, |
| | | // é®é¢å®¡æ ¸æ° |
| | | proCheckedNum: 0, |
| | | //æ´æ¹æ°é |
| | | changeNum: 0, |
| | | //æ´æ¹å®¡æ ¸æ°é |
| | | changeCheckedNum: 0, |
| | | //å¾
å®¡æ ¸æ°é |
| | | uncheckNum: 0, |
| | | //å·²å®¡æ ¸éè¿æ°é |
| | |
| | | passPer: '0%', |
| | | //å®¡æ ¸ç |
| | | checkPer: '0%' |
| | | } |
| | | }; |
| | | |
| | | proList.forEach((p) => { |
| | | if (p.ischanged) status.changeNum++ |
| | | if (p.ischanged) status.changeNum++; |
| | | |
| | | if (p.extension3 == 'fail' || p.extension3 == 'change_fail') status.unpassNum++ |
| | | if (p.extension3 == 'fail' || p.extension3 == 'change_fail') |
| | | status.unpassNum++; |
| | | else if ( |
| | | p.extension3 == 'unCheck' || |
| | | p.extension3 == 'change_unCheck' || |
| | | (p.extension3 == 'pass' && p.ischanged) |
| | | ) |
| | | status.uncheckNum++ |
| | | else status.passNum++ |
| | | status.uncheckNum++; |
| | | else status.passNum++; |
| | | |
| | | if (p.extension3 == proStatus.pass) { |
| | | status.proCheckedNum++; |
| | | } |
| | | if (p.extension3 == proStatus.change_pass) { |
| | | status.changeCheckedNum++; |
| | | } |
| | | |
| | | status.changePer = |
| | | String( |
| | | (status.changeNum / status.proNum) * 100 |
| | | ? ((status.changeNum / status.proNum) * 100).toFixed(1) |
| | | : 0 |
| | | ) + '%' |
| | | ) + '%'; |
| | | status.passPer = |
| | | String( |
| | | (status.passNum / status.proNum) * 100 |
| | | ? ((status.passNum / status.proNum) * 100).toFixed(1) |
| | | : 0 |
| | | ) + '%' |
| | | ) + '%'; |
| | | status.checkPer = |
| | | String( |
| | | ((status.passNum + status.unpassNum) / status.proNum) * 100 |
| | | ? (((status.passNum + status.unpassNum) / status.proNum) * 100).toFixed(1) |
| | | ? ( |
| | | ((status.passNum + status.unpassNum) / status.proNum) * |
| | | 100 |
| | | ).toFixed(1) |
| | | : 0 |
| | | ) + '%' |
| | | }) |
| | | ) + '%'; |
| | | }); |
| | | |
| | | return status |
| | | return status; |
| | | }, |
| | | |
| | | //ç»è®¡é®é¢ï¼è¿åæ°ç»å½¢å¼ |
| | | proStatusArray(proList) { |
| | | const status = this.calProStatus(proList) |
| | | const status = this.calProStatus(proList); |
| | | return [ |
| | | { name: 'é®é¢æ°', value: status.proNum }, |
| | | { name: 'æ´æ¹æ°', value: status.changeNum }, |
| | | { name: 'å¾
å®¡æ ¸', value: status.uncheckNum }, |
| | | { name: 'å·²å®¡æ ¸', value: status.passNum }, |
| | | { name: 'æªéè¿', value: status.unpassNum }, |
| | | { name: 'æ´æ¹ç', value: status.changePer }, |
| | | { name: 'éè¿ç', value: status.passPer }, |
| | | { name: 'å®¡æ ¸ç', value: status.checkPer } |
| | | ] |
| | | { name: 'é®é¢æ°', value: status.proNum, type: 'info' }, |
| | | { |
| | | name: 'æ´æ¹æ°', |
| | | value: status.changeNum, |
| | | type: status.changeNum < status.proNum ? 'danger' : 'info' |
| | | }, |
| | | { |
| | | name: 'å¾
å®¡æ ¸', |
| | | value: status.uncheckNum, |
| | | type: status.uncheckNum > 0 ? 'danger' : 'info' |
| | | }, |
| | | { name: 'å·²å®¡æ ¸', value: status.passNum, type: 'info' }, |
| | | // { |
| | | // name: 'æªéè¿', |
| | | // value: status.unpassNum, |
| | | // type: status.unpassNum > 0 ? 'danger' : 'info' |
| | | // }, |
| | | { |
| | | name: 'æ´æ¹ç', |
| | | value: status.changePer, |
| | | type: |
| | | status.proNum > 0 && status.changePer != '100.0%' |
| | | ? 'danger' |
| | | : 'success' |
| | | }, |
| | | // { |
| | | // name: 'éè¿ç', |
| | | // value: status.passPer, |
| | | // type: |
| | | // status.proNum > 0 && status.passPer != '100.0%' ? 'danger' : 'success' |
| | | // }, |
| | | { |
| | | name: 'å®¡æ ¸ç', |
| | | value: status.checkPer, |
| | | type: |
| | | status.proNum > 0 && status.checkPer != '100.0%' |
| | | ? 'danger' |
| | | : 'success' |
| | | } |
| | | ]; |
| | | }, |
| | | |
| | | //é®é¢å¾çåæ´æ¹å¾ç |
| | |
| | | title: 'æ´æ¹å¾ç', |
| | | path: [] |
| | | } |
| | | ] |
| | | ]; |
| | | if (pro.mediafileList) { |
| | | pro.mediafileList.forEach((m) => { |
| | | pics[m.ischanged ? 1 : 0].path.push(`${$fysp.imgUrl}${m.extension1}${m.guid}.jpg`) |
| | | }) |
| | | pics[m.ischanged ? 1 : 0].path.push( |
| | | `${$fysp.imgUrl}${m.extension1}${m.guid}.jpg` |
| | | ); |
| | | }); |
| | | } |
| | | |
| | | return pics |
| | | return pics; |
| | | }, |
| | | |
| | | //é®é¢å®¡æ ¸ç¶æè½¬æ¢ä¸æ |
| | | proStatusMap(p) { |
| | | switch (p) { |
| | | case proStatus.unCheck: |
| | | return { name: 'é®é¢æªå®¡æ ¸', type: 'warning', index: 0, checkable: true, deletable: true, changeable: false } |
| | | return { |
| | | name: 'é®é¢æªå®¡æ ¸', |
| | | type: 'warning', |
| | | index: 0, |
| | | checkable: true, |
| | | deletable: true, |
| | | changeable: false |
| | | }; |
| | | case proStatus.pass: |
| | | return { name: 'é®é¢éè¿', type: 'success', index: 1, checkable: false, deletable: true, changeable: false } |
| | | return { |
| | | name: 'é®é¢éè¿', |
| | | type: 'success', |
| | | index: 1, |
| | | checkable: false, |
| | | deletable: true, |
| | | changeable: false |
| | | }; |
| | | case proStatus.fail: |
| | | return { name: 'é®é¢ä¸éè¿', type: 'danger', index: 1, checkable: false, deletable: true, changeable: false } |
| | | return { |
| | | name: 'é®é¢ä¸éè¿', |
| | | type: 'danger', |
| | | index: 1, |
| | | checkable: false, |
| | | deletable: true, |
| | | changeable: false |
| | | }; |
| | | case proStatus.change_unCheck: |
| | | return { name: 'æ´æ¹æªå®¡æ ¸', type: 'warning', index: 2, checkable: true, deletable: false, changeable: true } |
| | | return { |
| | | name: 'æ´æ¹æªå®¡æ ¸', |
| | | type: 'warning', |
| | | index: 2, |
| | | checkable: true, |
| | | deletable: false, |
| | | changeable: true |
| | | }; |
| | | case proStatus.change_fail: |
| | | return { name: 'æ´æ¹ä¸éè¿', type: 'danger', index: 3, checkable: false, deletable: false, changeable: true } |
| | | return { |
| | | name: 'æ´æ¹ä¸éè¿', |
| | | type: 'danger', |
| | | index: 3, |
| | | checkable: false, |
| | | deletable: false, |
| | | changeable: true |
| | | }; |
| | | case proStatus.change_pass: |
| | | return { name: 'æ´æ¹éè¿', type: 'success', index: 3, checkable: false, deletable: false, changeable: true } |
| | | return { |
| | | name: 'æ´æ¹éè¿', |
| | | type: 'success', |
| | | index: 3, |
| | | checkable: false, |
| | | deletable: false, |
| | | changeable: true |
| | | }; |
| | | default: |
| | | return { name: 'é®é¢æªå®¡æ ¸', type: 'warning', index: 0, checkable: true, deletable: true } |
| | | return { |
| | | name: 'é®é¢æªå®¡æ ¸', |
| | | type: 'warning', |
| | | index: 0, |
| | | checkable: true, |
| | | deletable: true |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | //è·åä»»å¡é®é¢çå®¡æ ¸æ
åµ |
| | | getSubtaskType(s) { |
| | | let type = 0; |
| | | // æ é®é¢ |
| | | if (s.proNum == 0) { |
| | | type = 0; |
| | | } |
| | | // é®é¢æªå®¡æ ¸ |
| | | else if (s.proCheckedNum == 0) { |
| | | type = 1; |
| | | } |
| | | // é®é¢é¨åå®¡æ ¸ |
| | | else if (s.proCheckedNum < s.proNum) { |
| | | type = 2; |
| | | } |
| | | // æªæ´æ¹ |
| | | else if (s.changeNum < s.proNum) { |
| | | type = 3; |
| | | } |
| | | // æ´æ¹æªå®¡æ ¸ |
| | | else if (s.changeCheckedNum == 0) { |
| | | type = 4; |
| | | } |
| | | // æ´æ¹é¨åå®¡æ ¸ |
| | | else if (s.changeCheckedNum < s.changeNum) { |
| | | type = 5; |
| | | } |
| | | // å®å
¨å®¡æ ¸ |
| | | else { |
| | | type = 6; |
| | | } |
| | | return type; |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @returns ä¸ä¸ä¸ªé®é¢ç¶æ |
| | | */ |
| | | proNextStatus(s, isPass) { |
| | | let status, action |
| | | let status, action; |
| | | switch (s) { |
| | | case proStatus.unCheck: |
| | | status = isPass ? proStatus.pass : proStatus.fail |
| | | action = isPass ? 0 : 1 |
| | | break |
| | | status = isPass ? proStatus.pass : proStatus.fail; |
| | | action = isPass ? 0 : 1; |
| | | break; |
| | | case proStatus.change_unCheck: |
| | | status = isPass ? proStatus.change_pass : proStatus.change_fail |
| | | action = isPass ? 2 : 3 |
| | | break |
| | | status = isPass ? proStatus.change_pass : proStatus.change_fail; |
| | | action = isPass ? 2 : 3; |
| | | break; |
| | | } |
| | | return { status: status, action: action } |
| | | return { status: status, action: action }; |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @returns ä¸ä¸ä¸ªé®é¢ç¶æ |
| | | */ |
| | | proBeforeStatus(s) { |
| | | let status, action |
| | | let status, action; |
| | | switch (s) { |
| | | case proStatus.fail: |
| | | case proStatus.pass: |
| | | status = proStatus.unCheck |
| | | action = 4 |
| | | break |
| | | case proStatus.change_fail: |
| | | status = proStatus.unCheck; |
| | | action = 4; |
| | | break; |
| | | case proStatus.change_fail: |
| | | case proStatus.change_pass: |
| | | status = proStatus.change_unCheck |
| | | action = 5 |
| | | break |
| | | status = proStatus.change_unCheck; |
| | | action = 5; |
| | | break; |
| | | } |
| | | return { status: status, action: action } |
| | | return { status: status, action: action }; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <template> |
| | | <FYImageSelectDialog |
| | | v-loading="loading" |
| | | title="åºæ¯å¾ç" |
| | | :typeList="typesList" |
| | | :typeImgMap="typesMap" |
| | |
| | | // æ æ°æ® |
| | | typesList: [], |
| | | typesMap: new Map(), |
| | | loading: true, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | // å¾çåç±» |
| | | getGroupImgs() { |
| | | mediafileApi.getRoutineByStGuid(this.subtask.stGuid).then((res) => { |
| | | this.loading = true |
| | | let typeList = []; |
| | | let typeMap = new Map(); |
| | | function hasThisTypeName(typeName) { |
| | | return typeList.map((item) => item.typeName).indexOf(typeName) != -1; |
| | | } |
| | | function addNewType(typeId, typeName, img) { |
| | | typeList.push({ |
| | | typeId: typeId, |
| | | typeName: typeName |
| | | }); |
| | | typeMap.set(typeId, [img]); |
| | | } |
| | | function addToThisType(typeId, img) { |
| | | typeMap.get(typeId).push(img); |
| | | } |
| | | const data = res.data; |
| | | for (const e of data) { |
| | | let img = { |
| | |
| | | }; |
| | | const businesstype = e.businesstype; |
| | | const businesstypeid = e.businesstypeid; |
| | | if (hasThisTypeName(businesstype)) { |
| | | addToThisType(businesstypeid, img); |
| | | if ( |
| | | typeList.find((item) => item.typeName == businesstype) != undefined |
| | | ) { |
| | | typeMap.get(businesstypeid).push(img); |
| | | } else { |
| | | addNewType(businesstypeid, businesstype, img); |
| | | typeList.push({ |
| | | typeId: businesstypeid, |
| | | typeName: businesstype |
| | | }); |
| | | typeMap.set(businesstypeid, [img]); |
| | | } |
| | | } |
| | | |
| | | this.typesList = typeList; |
| | | this.typesMap = typeMap; |
| | | }); |
| | | }).finally(() => (this.loading = false)); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped></style> |
| | | |
| | |
| | | <template> |
| | | <div> |
| | | <div class="t-card_item"> |
| | | æ´æ¹å¾ç |
| | | <div> |
| | | <el-button @click="choseChangePic" :disabled="fileList.length >= 3">仿件夹éå</el-button> |
| | | <CompGenericWrapper type="dialog"> |
| | | <template #content> |
| | | <el-row> |
| | | <el-col> |
| | | <el-form-item label="æ´æ¹å¾ç"> |
| | | <el-button @click="choseChangePic" :disabled="fileList.length >= 3" |
| | | >仿件夹éå</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="!fileList || fileList.length <= 0"> |
| | | <el-empty style="height: 145px" description="请添å å¾ç" /> |
| | | </el-col> |
| | | <el-col> |
| | | <el-upload |
| | | class="img-upload" |
| | | ref="uploadRef" |
| | | v-model:file-list="fileList" |
| | | list-type="picture-card" |
| | | multiple |
| | | :auto-upload="false" |
| | | crossorigin="Anonymous" |
| | | :before-remove="beforeRemoveFile" |
| | | :on-preview="handlePictureCardPreview" |
| | | :disabled="readonly" |
| | | accept="image/*" |
| | | > |
| | | <template #trigger v-if="fileList.length < 3 && !readonly"> |
| | | <el-button |
| | | v-if="fileList.length < 3" |
| | | type="primary" |
| | | id="uploadBtnId" |
| | | style="display: none" |
| | | ></el-button> |
| | | <el-icon> |
| | | <Plus /> |
| | | </el-icon> |
| | | </template> |
| | | <template #tip> |
| | | <div style="color: #f56c6c"> |
| | | æå°ä¸ä¼ ä¸å¼ å¾çï¼æå¤éæ©ä¸å¼ å¾ç |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="flex-div"> |
| | | <el-button type="primary" @click="onSubmit">ä¿å</el-button> |
| | | <el-button @click="onCancel">åæ¶</el-button> |
| | | </div> |
| | | </div> |
| | | <el-upload |
| | | class="img-upload" |
| | | ref="uploadRef" |
| | | v-model:file-list="fileList" |
| | | list-type="picture-card" |
| | | multiple |
| | | :auto-upload="false" |
| | | crossorigin="Anonymous" |
| | | :before-remove="beforeRemoveFile" |
| | | :on-preview="handlePictureCardPreview" |
| | | :disabled="readonly" |
| | | accept="image/*" |
| | | > |
| | | <template #trigger v-if="fileList.length < 3 && !readonly"> |
| | | <el-button |
| | | v-if="fileList.length < 3" |
| | | type="primary" |
| | | id="uploadBtnId" |
| | | style="display: none" |
| | | ></el-button> |
| | | <el-icon> |
| | | <Plus /> |
| | | </el-icon> |
| | | </template> |
| | | <template #tip> |
| | | <div style="color: #f56c6c">æå°ä¸ä¼ ä¸å¼ å¾çï¼æå¤éæ©ä¸å¼ å¾ç</div> |
| | | </template> |
| | | </el-upload> |
| | | <div class="flex-div"> |
| | | <el-button type="primary" @click="onSubmit">ä¿å</el-button> |
| | | <el-button @click="this.$emit('submited', false)">åæ¶</el-button> |
| | | </div> |
| | | <ArbitraryPhoto |
| | | :max-select="maxSelectImgCount - fileList.length" |
| | | v-if="anyPhotoDialog" |
| | | v-model:dialog-visible="anyPhotoDialog" |
| | | @submit="handleSelectedAnyPhono" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="arbitraryPhotoRef" |
| | | > |
| | | </ArbitraryPhoto> |
| | | <el-dialog |
| | | title="å°è´¦å¾ç" |
| | | width="80%" |
| | | v-model="ledgerPicDialog" |
| | | :before-close="beforeLedgerPicDialogclose" |
| | | > |
| | | <LedgerPic |
| | | v-if="ledgerPicDialog" |
| | | @selectByLedgerPicEvent="handleLedgerPicPhono" |
| | | :month="month" |
| | | :subtask="subtask" |
| | | ref="ledgerPicRef" |
| | | > |
| | | </LedgerPic> |
| | | </el-dialog> |
| | | </div> |
| | | <el-dialog v-model="previewDialogVisible"> |
| | | <img w-full :src="previewDialogImageUrl" alt="é¢è§" class="preview-pic" /> |
| | | </el-dialog> |
| | | <el-image-viewer |
| | | v-if="previewDialogVisible" |
| | | :url-list="fileList.map((item) => item.url)" |
| | | :initial-index="initialIndex" |
| | | @close="previewDialogVisible = false" |
| | | alt="é¢è§" |
| | | class="preview-pic" |
| | | /> |
| | | </template> |
| | | </CompGenericWrapper> |
| | | </template> |
| | | <script> |
| | | import ArbitraryPhoto from './ArbitraryPhoto.vue'; |
| | | import LedgerPic from './CompLedgerPic.vue'; |
| | | import problemApi from '@/api/fysp/problemApi.js'; |
| | | |
| | | import { $fysp } from '@/api/index.js'; |
| | | import fileUtil from '@/utils/fileUtils.js'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { ElMessage } from 'element-plus'; |
| | | export default { |
| | | emits: ['submit', 'cancel'], |
| | | components: { |
| | | ArbitraryPhoto, |
| | | LedgerPic |
| | | }, |
| | | watch: { |
| | | oldChangeFileList: { |
| | | handler(nv, ov) { |
| | | this.initParams(); |
| | | }, |
| | | immediate: true |
| | | }, |
| | | fileList: { |
| | | handler(newFileList, oldFileList) { |
| | | this.pictureValidate(); |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // åå§å¾çé¢è§index |
| | | initialIndex: -1, |
| | | // å¾çéæ©æå¤§æ°é |
| | | maxSelectImgCount: 3, |
| | | previewDialogImageUrl: '', |
| | |
| | | anyPhotoDialog: false |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.initParams(); |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | pictureValidate() { |
| | | if (this.changeType == 1 && this.fileList.length < 1) { |
| | |
| | | return true; |
| | | }, |
| | | initParams() { |
| | | if (this.changeType == 0) { |
| | | if (!this.changeType || this.changeType == 0) { |
| | | return; |
| | | } |
| | | let beforeEditImgList = []; |
| | |
| | | ); |
| | | this.fileList = useCloned(beforeEditImgList).cloned.value; |
| | | this.oldFileList = useCloned(beforeEditImgList).cloned.value; |
| | | }, |
| | | onCancel() { |
| | | this.$emit("cancel") |
| | | this.$emit('update:visible', false) |
| | | }, |
| | | onSubmit() { |
| | | if (!this.pictureValidate()) { |
| | |
| | | |
| | | problemApi.updateChange(data).then((res) => {}); |
| | | }); |
| | | that.$emit('submited', true); |
| | | that.$emit('submit', true); |
| | | } else { |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | data.append('problemId', that.problemId); |
| | |
| | | data.append('images', image); |
| | | }); |
| | | problemApi.changeProblem(data).then((res) => {}); |
| | | that.$emit('submited', true); |
| | | that.$emit('submit', true); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | handlePictureCardPreview(uploadFile) { |
| | | this.initialIndex = this.fileList.indexOf(uploadFile) |
| | | this.previewDialogVisible = true; |
| | | this.previewDialogImageUrl = uploadFile.url; |
| | | }, |
| | | handleSelectedAnyPhono(data) { |
| | | this.beforeAnyPhotoDialogclose(); |
| | | let isExist = false; |
| | | for (const item of data) { |
| | | for (const already of this.fileList) { |
| | | if (item.url == already.url) { |
| | | isExist = true; |
| | | } |
| | | } |
| | | if (!isExist) { |
| | | this.fileList.push({ |
| | | url: item.url, |
| | | name: '1' |
| | | }); |
| | | } |
| | | isExist = false; |
| | | } |
| | | }, |
| | | handleLedgerPicPhono(data) { |
| | | let isExist = false; |
| | | for (const item of data) { |
| | | for (const already of this.fileList) { |
| | | if (item.url == already.url) { |
| | | isExist = true; |
| | | } |
| | | } |
| | | if (!isExist) { |
| | | this.fileList.push({ |
| | | url: item.url, |
| | | name: '1' |
| | | }); |
| | | } |
| | | isExist = false; |
| | | } |
| | | |
| | | this.beforeAnyPhotoDialogclose(); |
| | | }, |
| | | chosePicFromAnyPic() { |
| | | this.anyPhotoDialog = true; |
| | | }, |
| | | // ä»æä»¶å¤¹ä¸ |
| | | choseChangePic() { |
| | |
| | | // 触åç¹å»äºä»¶ |
| | | btnElement.click(); |
| | | } |
| | | }, |
| | | chosePicFromLedgerPic() { |
| | | // 使ç¨Dateå¯¹è±¡è§£ææ¥æå符串 |
| | | var date = new Date(this.subtask.subtask.planstarttime.splice(0, 7)); |
| | | // è·åæä»½ä¿¡æ¯ï¼æä»½æ¯ä»0å¼å§çï¼æä»¥éè¦å 1 |
| | | this.month = date.getMonth() + 1; |
| | | if (String(this.month).length == 1) { |
| | | this.month = `0${this.month}`; |
| | | } |
| | | var year = date.getFullYear(); |
| | | this.month = `${year}-${this.month}`; |
| | | this.ledgerPicDialog = true; |
| | | }, |
| | | beforeAnyPhotoDialogclose() { |
| | | this.anyPhotoDialog = false; |
| | | }, |
| | | beforeLedgerPicDialogclose() { |
| | | this.ledgerPicDialog = false; |
| | | } |
| | | } |
| | | }; |
| | |
| | | height: 100%; |
| | | } |
| | | ::v-deep .el-upload--picture-card { |
| | | border: 0 !important; |
| | | display: none; |
| | | } |
| | | /* éèel-uploadä¸ä¼ æåç»ä»¶ */ |
| | | ::v-deep .el-upload-list__item-status-label { |
| | | display: none !important; |
| | | } |
| | | </style> |
| | |
| | | <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> |
| | | <div> |
| | | <!-- é项 --> |
| | | <!-- 设å¤ç±»å --> |
| | | <el-row> |
| | | <el-col> |
| | | <el-tabs |
| | | class="child_select" |
| | | placeholder="设å¤ç±»å" |
| | | v-model="currSelect.topDeviceTypeId" |
| | | > |
| | | <el-tab-pane |
| | | v-for="item in deviceTopTypes" |
| | | :key="item.id" |
| | | :name="item.id" |
| | | <CompGenericWrapper type="drawer"> |
| | | <template #content> |
| | | <!-- é项 --> |
| | | <!-- 设å¤ç±»å --> |
| | | <el-row> |
| | | <el-col> |
| | | <el-tabs |
| | | class="child_select" |
| | | placeholder="设å¤ç±»å" |
| | | v-model="currSelect.topDeviceTypeId" |
| | | > |
| | | <template #label> |
| | | <el-badge |
| | | :value="item.count" |
| | | :type="item.count == 0 ? 'danger' : 'primary'" |
| | | > |
| | | <span class="custom-tabs-label"> |
| | | <span>{{ item.label }}</span> |
| | | </span> |
| | | </el-badge> |
| | | </template> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-col> |
| | | </el-row> |
| | | <el-collapse v-model="activeNames" style="border: 4px"> |
| | | <el-collapse-item |
| | | v-for="item in formInfo" |
| | | :key="item.id" |
| | | :name="item.id" |
| | | class="collapse-item-class" |
| | | > |
| | | <template #title> |
| | | <div |
| | | style="display: flex; width: 100%; justify-content: space-between" |
| | | > |
| | | <div style=""> |
| | | <el-descriptions style="" :column="3" size="small" border> |
| | | <el-descriptions-item width="64px" :label="currSelect.topDeviceTypeId == 0 ? 'ç«ç¹åç§°' : '设å¤åç§°'" :span="3">{{ |
| | | item.name || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="ä¾åºå">{{ |
| | | item.supplier || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¿ç»´å">{{ |
| | | item.maintainer || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¿ç»´é¢æ¬¡"> |
| | | <el-select |
| | | v-model="item.maintainFrequency" |
| | | :disabled="isDisabled" |
| | | style="width: 150px" |
| | | > |
| | | <el-option |
| | | v-for="frequency of maintainFrequencysArray" |
| | | :key="frequency.key" |
| | | :label="frequency.value" |
| | | :value="frequency.key" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è¿ç»´äººå">{{ |
| | | item.maintainStaff || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¿ç»´èç³»æ¹å¼">{{ |
| | | item.maintainTel || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="åçåå·">{{ |
| | | item.brandModel || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¿è¡ç¶æ"> |
| | | <el-select |
| | | v-model="item.runningStatus" |
| | | :disabled="isDisabled" |
| | | style="width: 150px" |
| | | > |
| | | <el-option |
| | | v-for="status of runStatusArray" |
| | | :key="status.key" |
| | | :label="status.value" |
| | | :value="status.key" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ç±»å"> |
| | | {{ item._typename || 'æ ' }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | |
| | | <div style="display: flex"> |
| | | <!-- <div class="sub-title">{{ item.name }}</div> --> |
| | | <!-- å¾ç --> |
| | | <div class="image-container"> |
| | | <div |
| | | class="block-div" |
| | | @click="onClickPic($event)" |
| | | v-for="(status, index) in item._statusList" |
| | | :key="index" |
| | | <el-tab-pane |
| | | v-for="item in deviceTopTypes" |
| | | :key="item.id" |
| | | :name="item.id" |
| | | > |
| | | <template #label> |
| | | <el-badge |
| | | :value="item.count" |
| | | :type="item.count == 0 ? 'danger' : 'primary'" |
| | | > |
| | | <el-image |
| | | v-if="index == 0" |
| | | fit="cover" |
| | | class="pic-style" |
| | | :src="status._picUrl" |
| | | :preview-src-list="Array.of(status._picUrl)" |
| | | /> |
| | | <span class="abstract_pic_text" v-if="index == 0">{{ |
| | | `ææ°ç¶æå¾ç ${status.dlCreateTime.slice(0, 10)}` |
| | | }}</span> |
| | | <span class="custom-tabs-label"> |
| | | <span>{{ item.label }}</span> |
| | | </span> |
| | | </el-badge> |
| | | </template> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-col> |
| | | </el-row> |
| | | <el-collapse v-model="activeNames" style="border: 4px"> |
| | | <el-collapse-item |
| | | v-for="item in formInfo" |
| | | :key="item.id" |
| | | :name="item.id" |
| | | class="collapse-item-class" |
| | | > |
| | | <template #title> |
| | | <div |
| | | style="display: flex; width: 100%; justify-content: space-between" |
| | | > |
| | | <div style=""> |
| | | <el-descriptions style="" :column="3" size="small" border> |
| | | <el-descriptions-item |
| | | width="64px" |
| | | :label=" |
| | | currSelect.topDeviceTypeId == 0 ? 'ç«ç¹åç§°' : '设å¤åç§°' |
| | | " |
| | | :span="3" |
| | | >{{ item.name || 'æ ' }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="ä¾åºå">{{ |
| | | item.supplier || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¿ç»´å">{{ |
| | | item.maintainer || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¿ç»´é¢æ¬¡"> |
| | | <el-select |
| | | v-model="item.maintainFrequency" |
| | | :disabled="isDisabled" |
| | | style="width: 150px" |
| | | > |
| | | <el-option |
| | | v-for="frequency of maintainFrequencysArray" |
| | | :key="frequency.key" |
| | | :label="frequency.value" |
| | | :value="frequency.key" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è¿ç»´äººå">{{ |
| | | item.maintainStaff || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¿ç»´èç³»æ¹å¼">{{ |
| | | item.maintainTel || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="åçåå·">{{ |
| | | item.brandModel || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¿è¡ç¶æ"> |
| | | <el-select |
| | | v-model="item.runningStatus" |
| | | :disabled="isDisabled" |
| | | style="width: 150px" |
| | | > |
| | | <el-option |
| | | v-for="status of runStatusArray" |
| | | :key="status.key" |
| | | :label="status.value" |
| | | :value="status.key" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ç±»å"> |
| | | {{ item._typename || 'æ ' }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | |
| | | <div style="display: flex"> |
| | | <!-- <div class="sub-title">{{ item.name }}</div> --> |
| | | <!-- å¾ç --> |
| | | <div class="image-container"> |
| | | <div |
| | | class="block-div" |
| | | @click="onClickPic($event)" |
| | | v-for="(status, index) in item._statusList" |
| | | :key="index" |
| | | > |
| | | <el-image |
| | | v-if="index == 0" |
| | | fit="cover" |
| | | class="pic-style" |
| | | :src="status._picUrl" |
| | | :preview-src-list="Array.of(status._picUrl)" |
| | | /> |
| | | <span class="abstract_pic_text" v-if="index == 0">{{ |
| | | `ææ°ç¶æå¾ç ${status.dlCreateTime.slice(0, 10)}` |
| | | }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <!-- 详ç»å
容å¼å§ --> |
| | | <el-form :model="item" class="form_class"> |
| | | <el-form-item label="ç¶æ"> |
| | | <el-tabs tab-position="top"> |
| | | <el-tab-pane |
| | | v-for="(status, i) in item._statusList" |
| | | :label="status.dlCreateTime.slice(0, 10)" |
| | | :key="i" |
| | | > |
| | | <el-form :model="status" class="form-class"> |
| | | <el-form-item label="ä½ç½®" style="margin-bottom: 10px"> |
| | | {{ status.dlLocation }} |
| | | </el-form-item> |
| | | <el-form-item label="å¾ç"> |
| | | <!-- å¾ç --> |
| | | <el-space> |
| | | <div v-if="status._paths && status._paths.length > 0"> |
| | | <el-image |
| | | v-for="(path, i) in status._paths" |
| | | fit="cover" |
| | | class="pic-style" |
| | | :src="path" |
| | | :preview-src-list="Array.of(path)" |
| | | :key="i" |
| | | /> |
| | | </div> |
| | | <el-empty v-else></el-empty> |
| | | </el-space> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- 详ç»å
å®¹ç»æ --> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | <!-- ç©ºç¶æ --> |
| | | <el-empty v-if="isEmpty" /> |
| | | </div> |
| | | </template> |
| | | <!-- 详ç»å
容å¼å§ --> |
| | | <el-form :model="item" class="form_class"> |
| | | <el-form-item label="ç¶æ"> |
| | | <el-tabs tab-position="top"> |
| | | <el-tab-pane |
| | | v-for="(status, i) in item._statusList" |
| | | :label="status.dlCreateTime.slice(0, 10)" |
| | | :key="i" |
| | | > |
| | | <el-form :model="status" class="form-class"> |
| | | <el-form-item label="ä½ç½®" style="margin-bottom: 10px"> |
| | | {{ status.dlLocation }} |
| | | </el-form-item> |
| | | <el-form-item label="å¾ç"> |
| | | <!-- å¾ç --> |
| | | <el-space> |
| | | <div v-if="status._paths && status._paths.length > 0"> |
| | | <el-image |
| | | v-for="(path, i) in status._paths" |
| | | fit="cover" |
| | | class="pic-style" |
| | | :src="path" |
| | | :preview-src-list="Array.of(path)" |
| | | :key="i" |
| | | /> |
| | | </div> |
| | | <el-empty v-else></el-empty> |
| | | </el-space> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- 详ç»å
å®¹ç»æ --> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | <!-- ç©ºç¶æ --> |
| | | <el-empty v-if="isEmpty" |
| | | /></template> |
| | | </CompGenericWrapper> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import { $fysp } from '@/api/index'; |
| | | import { toLabel } from '@/enum/device/device'; |
| | | export default { |
| | | components: {}, |
| | | 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'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | 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() { |
| | |
| | | <template> |
| | | <div> |
| | | <el-tabs v-model="activeName" type="card"> |
| | | <el-tab-pane v-for="(item, i) in ranges" :key="i" :label="item" :name="item"> </el-tab-pane> |
| | | </el-tabs> |
| | | <div class="proList"> |
| | | <el-card class="card-style" shadow="hover"> |
| | | <el-descriptions v-loading="loading"> |
| | | <el-descriptions-item label="æ»åºç°æ¬¡æ°">{{ curProList.length }}</el-descriptions-item> |
| | | <!-- <el-descriptions-item label="å¤ç°ç">{{ repeteRate }}%</el-descriptions-item> --> |
| | | </el-descriptions> |
| | | <!-- <el-descriptions v-loading="loading" column="3"> |
| | | <CompGenericWrapper type="dialog"> |
| | | <template #content> |
| | | <el-tabs v-model="activeName" type="card"> |
| | | <el-tab-pane |
| | | v-for="(item, i) in ranges" |
| | | :key="i" |
| | | :label="item" |
| | | :name="item" |
| | | > |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <div class="proList"> |
| | | <el-card class="card-style" shadow="hover" v-loading="loading"> |
| | | <el-descriptions> |
| | | <el-descriptions-item label="æ»åºç°æ¬¡æ°">{{ |
| | | curProList.length |
| | | }}</el-descriptions-item> |
| | | <!-- <el-descriptions-item label="å¤ç°ç">{{ repeteRate }}%</el-descriptions-item> --> |
| | | </el-descriptions> |
| | | <!-- <el-descriptions v-loading="loading" column="3"> |
| | | <div v-for="pro in curProList"> |
| | | <el-descriptions-item>{{ pro.problemname }}</el-descriptions-item> |
| | | <el-descriptions-item label="ä»»å¡åç§°">{{ pro._stName }}</el-descriptions-item> |
| | |
| | | </el-descriptions-item> |
| | | </div> |
| | | </el-descriptions> --> |
| | | <el-table :data="curProList" style="width: 100%"> |
| | | <el-table-column type="index" width="50" /> |
| | | <el-table-column prop="problemname" label="é®é¢"/> |
| | | <el-table-column prop="_time" label="æ¶é´" width="250" /> |
| | | <el-table-column label="æä½" width="180"> |
| | | <template v-slot="scope"> |
| | | <el-button link type="primary" @click="info(scope.row)">详æ
</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | <el-dialog |
| | | <el-table :data="curProList" style="width: 100%"> |
| | | <el-table-column type="index" width="50" /> |
| | | <el-table-column prop="problemname" label="é®é¢" /> |
| | | <el-table-column prop="_time" label="æ¶é´" width="250" /> |
| | | <el-table-column label="æä½" width="180"> |
| | | <template v-slot="scope"> |
| | | <el-button link type="primary" @click="info(scope.row)" |
| | | >详æ
</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </div> |
| | | <CompProblemAddOrUpd |
| | | v-model:visible="proAddOrUpdDialogVisible" |
| | | title="é¢è§" |
| | | v-model="proAddOrUpdDialogVisible" |
| | | :before-close="proAddOrUpdDialogClose" |
| | | width="80%" |
| | | > |
| | | <CompProblemAddOrUpd |
| | | v-if="proAddOrUpdDialogVisible" |
| | | :subtask="subtask" |
| | | :topTask="topTask" |
| | | :problem="previewPro" |
| | | :readonly="true" |
| | | ref="compProblemAddOrUpdRef" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | :subtask="subtask" |
| | | :topTask="topTask" |
| | | :problem="previewPro" |
| | | :readonly="true" |
| | | ref="compProblemAddOrUpdRef" |
| | | /> |
| | | <el-dialog destroy-on-close> </el-dialog> |
| | | </template> |
| | | </CompGenericWrapper> |
| | | </template> |
| | | <script> |
| | | import CompProblemAddOrUpd from './CompProblemAddOrUpd.vue'; |
| | |
| | | export default { |
| | | computed: { |
| | | // repeteRate() { |
| | | // return this.curProList.length !== 0 ? (this.curProList.length - 1) / this.subtaskCount * 1.0 : 0 |
| | | // return this.curProList.length !== 0 ? (this.curProList.length - 1) / this.subtaskCount * 1.0 : 0 |
| | | // }, |
| | | }, |
| | | props: { |
| | |
| | | handler(newObj, oldObj) { |
| | | this.handleClick(); |
| | | } |
| | | }, |
| | | problem: { |
| | | handler(nv, ov) { |
| | | this.deepCopyPro = useCloned(this.problem).cloned.value; |
| | | this.getRecentPros(); |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | components: { |
| | | CompProblemAddOrUpd |
| | | CompProblemAddOrUpd, |
| | | }, |
| | | mounted() { |
| | | |
| | | this.deepCopyPro = useCloned(this.problem).cloned.value; |
| | | this.getRecentPros(); |
| | | }, |
| | | mounted() {}, |
| | | data() { |
| | | return { |
| | | proAddOrUpdDialogVisible: false, |
| | |
| | | info(pro) { |
| | | this.previewPro = pro; |
| | | this.proAddOrUpdDialogVisible = true; |
| | | }, |
| | | // å
³é详æ
å¼¹çª |
| | | proAddOrUpdDialogClose() { |
| | | this.proAddOrUpdDialogVisible = false; |
| | | }, |
| | | // 忢æ¶é´èå´ |
| | | handleClick() { |
| | |
| | | * */ |
| | | async getRecentPros() { |
| | | this.loading = true; |
| | | this.subtaskCount = 0 |
| | | this.subtaskCount = 0; |
| | | // è·ååä»»å¡å表 |
| | | await taskApi.getSubtaskByScene(this.generateQueryParam()).then((subtasks) => { |
| | | this.curProList = []; |
| | | if (subtasks) { |
| | | subtasks.forEach((subtask) => { |
| | | // è·åé®é¢å表 |
| | | this.getProBySubtask(subtask); |
| | | }); |
| | | } |
| | | }); |
| | | await taskApi |
| | | .getSubtaskByScene(this.generateQueryParam()) |
| | | .then((subtasks) => { |
| | | this.curProList = []; |
| | | if (subtasks) { |
| | | subtasks.forEach((subtask) => { |
| | | // è·åé®é¢å表 |
| | | this.getProBySubtask(subtask); |
| | | }); |
| | | } |
| | | }); |
| | | // é¢å¤å¤ç |
| | | this.curProList.sort((o1, o2) => o2.getDate() - o1.getDate()); |
| | | this.loading = false; |
| | |
| | | pros.forEach((pro) => { |
| | | if (pro.ptguid == this.deepCopyPro.ptguid) { |
| | | pro._stName = subtask.stName; |
| | | pro._time = this.$fm.formatYMD(subtask.stPlanTime) |
| | | pro._time = this.$fm.formatYMD(subtask.stPlanTime); |
| | | this.curProList.push(pro); |
| | | } |
| | | }); |
| | |
| | | <template> |
| | | <div class="main-container"> |
| | | <el-form :model="problem" label-width="auto" style="max-width: 95%"> |
| | | <el-form-item label="é®é¢ä½ç½®" prop="locationid"> |
| | | <el-select |
| | | v-model="deepCopyProblem.locationid" |
| | | @change="onProLocationChange" |
| | | class="row" |
| | | :disabled="readonly" |
| | | <CompGenericWrapper type="dialog"> |
| | | <template #content> |
| | | <div class="main-container"> |
| | | <el-form |
| | | :rules="rules" |
| | | :model="deepCopyProblem" |
| | | label-width="auto" |
| | | style="max-width: 95%" |
| | | ref="formRef" |
| | | > |
| | | <el-option |
| | | v-for="item in posList" |
| | | :key="item.index" |
| | | :label="item.text" |
| | | :value="item.index" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="é®é¢ç±»å" prop="proType"> |
| | | <el-select |
| | | v-model="proType" |
| | | @change="onProTypeChange" |
| | | class="row" |
| | | :disabled="readonly" |
| | | <el-form-item label="é®é¢ä½ç½®" prop="locationid"> |
| | | <el-select |
| | | v-model="deepCopyProblem.locationid" |
| | | @change="onProLocationChange" |
| | | class="row" |
| | | :disabled="readonly" |
| | | > |
| | | <el-option |
| | | v-for="item in posList" |
| | | :key="item.index" |
| | | :label="item.text" |
| | | :value="item.index" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="é®é¢ç±»å" prop="_proType"> |
| | | <el-select |
| | | v-model="deepCopyProblem._proType" |
| | | @change="onProTypeChange" |
| | | class="row" |
| | | :disabled="readonly" |
| | | > |
| | | <el-option |
| | | v-for="item in problemTypeOptions" |
| | | :key="item.typeid" |
| | | :label="item.typename" |
| | | :value="item.typename" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="é®é¢æè¿°" prop="description"> |
| | | <el-select |
| | | v-model="deepCopyProblem.description" |
| | | @change="onProDesChange" |
| | | class="row" |
| | | :disabled="readonly" |
| | | > |
| | | <el-option |
| | | v-for="item in descriptionOptions" |
| | | :key="item.guid" |
| | | :label="item.description" |
| | | :value="item.description" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="è¡¥å
说æ" :disabled="readonly" prop="proRemark"> |
| | | <el-input |
| | | v-model="proRemark" |
| | | type="textarea" |
| | | @change="onProRemarkChange" |
| | | class="row" |
| | | placeholder="请è¾å
¥" |
| | | :disabled="readonly" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="é®é¢å»ºè®®" prop="advice"> |
| | | <el-select |
| | | v-model="deepCopyProblem.advice" |
| | | class="row" |
| | | :disabled="readonly" |
| | | @change="onProAdviseChange" |
| | | > |
| | | <el-option |
| | | v-for="item in adviseOptions" |
| | | :key="item.adGuid" |
| | | :label="item.adName" |
| | | :value="item.adName" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="é®é¢å»ºè®®ä¿®æ£" |
| | | prop="_adviseEdit" |
| | | :disabled="false" |
| | | > |
| | | <el-input |
| | | v-model="deepCopyProblem._adviseEdit" |
| | | type="textarea" |
| | | @change="onProAdviseEditChange" |
| | | class="row" |
| | | placeholder="请è¾å
¥é®é¢å»ºè®®ä¿®æ£" |
| | | :disabled="readonly" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="é®é¢å¾ç"> |
| | | <el-row> |
| | | <el-col> |
| | | <el-button |
| | | @click="chosePicFromAnyPic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >ä»åºæ¯å¾çéå</el-button |
| | | > |
| | | <el-button |
| | | @click="chosePicFromDevicePic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >ä»è®¾å¤å¾çéå</el-button |
| | | > |
| | | <el-button |
| | | @click="chosePicFromLedgerPic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >ä»å°è´¦éå</el-button |
| | | > |
| | | <el-button |
| | | @click="choseChangePic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >仿件夹éå</el-button |
| | | > |
| | | </el-col> |
| | | <el-col v-if="!fileList || fileList.length <= 0"> |
| | | <el-empty |
| | | style="height: 145px" |
| | | class="img-upload" |
| | | description="请添å å¾ç" |
| | | /> |
| | | </el-col> |
| | | <el-col> |
| | | <el-upload |
| | | v-show="fileList && fileList.length > 0" |
| | | class="img-upload" |
| | | ref="uploadRef" |
| | | v-model:file-list="fileList" |
| | | list-type="picture-card" |
| | | multiple |
| | | :auto-upload="false" |
| | | crossorigin="Anonymous" |
| | | :before-remove="beforeRemoveFile" |
| | | :on-preview="handlePictureCardPreview" |
| | | :disabled="readonly" |
| | | accept="image/*" |
| | | > |
| | | <template #trigger v-if="fileList.length < 3 && !readonly"> |
| | | <el-button |
| | | v-if="fileList.length < 3" |
| | | type="primary" |
| | | id="uploadBtnId" |
| | | style="display: none" |
| | | ></el-button> |
| | | <el-icon> |
| | | <Plus /> |
| | | </el-icon> |
| | | </template> |
| | | <template #tip> |
| | | <div style="color: #f56c6c"> |
| | | æå°ä¸ä¼ ä¸å¼ å¾çï¼æå¤éæ©ä¸å¼ å¾ç |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmit" v-show="!readonly" |
| | | >ä¿å</el-button |
| | | > |
| | | <el-button @click="onCancel" v-show="!readonly" |
| | | >åæ¶</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <ArbitraryPhoto |
| | | :max-select="maxSelectImgCount - fileList.length" |
| | | v-model:dialog-visible="anyPhotoDialog" |
| | | @submit="handleSelectedAnyPhono" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="arbitraryPhotoRef" |
| | | > |
| | | <el-option |
| | | v-for="item in problemTypeOptions" |
| | | :key="item.typeid" |
| | | :label="item.typename" |
| | | :value="item.typename" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="é®é¢æè¿°" prop="description"> |
| | | <el-select |
| | | v-model="deepCopyProblem.description" |
| | | @change="onProDesChange" |
| | | class="row" |
| | | :disabled="readonly" |
| | | </ArbitraryPhoto> |
| | | <CompLedgerPhoto |
| | | :max-select="maxSelectImgCount - fileList.length" |
| | | v-model:dialog-visible="ledgerPicDialog" |
| | | @submit="handleLedgerPicPhono" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="ledgerPhotoRef" |
| | | ></CompLedgerPhoto> |
| | | <CompDevicePhoto |
| | | :max-select="maxSelectImgCount - fileList.length" |
| | | v-model:dialog-visible="deiveceImgDialog" |
| | | @submit="handleSelectedDevicePhono" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="deiveceImgDialogRef" |
| | | > |
| | | <el-option |
| | | v-for="item in descriptionOptions" |
| | | :key="item.guid" |
| | | :label="item.description" |
| | | :value="item.description" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="è¡¥å
说æ" :disabled="readonly" prop="proRemark"> |
| | | <el-input |
| | | v-model="proRemark" |
| | | type="textarea" |
| | | @change="onProRemarkChange" |
| | | class="row" |
| | | placeholder="请è¾å
¥" |
| | | :disabled="readonly" |
| | | </CompDevicePhoto> |
| | | <el-image-viewer |
| | | v-if="previewDialogVisible" |
| | | :url-list="fileList.map((item) => item.url)" |
| | | :initial-index="initialIndex" |
| | | @close="previewDialogVisible = false" |
| | | alt="é¢è§" |
| | | class="preview-pic" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="é®é¢å»ºè®®" prop="advise"> |
| | | <el-select |
| | | v-model="deepCopyProblem.advise" |
| | | class="row" |
| | | :disabled="readonly" |
| | | @change="onProAdviseChange" |
| | | > |
| | | <el-option |
| | | v-for="item in adviseOptions" |
| | | :key="item.adGuid" |
| | | :label="item.adName" |
| | | :value="item.adName" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-show="deepCopyProblem.advise && deepCopyProblem.advise != ''" |
| | | label="é®é¢å»ºè®®ä¿®æ£" |
| | | prop="_adviseEdit" |
| | | :disabled="false" |
| | | > |
| | | <el-input |
| | | v-model="deepCopyProblem._adviseEdit" |
| | | type="textarea" |
| | | @change="onProAdviseEditChange" |
| | | class="row" |
| | | placeholder="请è¾å
¥é®é¢å»ºè®®ä¿®æ£" |
| | | :disabled="readonly" |
| | | /> |
| | | </el-form-item> |
| | | <div class="t-card_item"> |
| | | é®é¢å¾ç |
| | | <div> |
| | | <el-button |
| | | @click="chosePicFromAnyPic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >ä»åºæ¯å¾çéå</el-button |
| | | > |
| | | <el-button |
| | | @click="chosePicFromDevicePic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >ä»è®¾å¤å¾çéå</el-button |
| | | > |
| | | <el-button |
| | | @click="chosePicFromLedgerPic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >ä»å°è´¦éå</el-button |
| | | > |
| | | <el-button |
| | | @click="choseChangePic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >仿件夹éå</el-button |
| | | > |
| | | </div> |
| | | <!-- <el-dialog v-model="previewDialogVisible"> |
| | | |
| | | </el-dialog> --> |
| | | </div> |
| | | <el-upload |
| | | class="img-upload" |
| | | ref="uploadRef" |
| | | v-model:file-list="fileList" |
| | | list-type="picture-card" |
| | | multiple |
| | | :auto-upload="false" |
| | | crossorigin="Anonymous" |
| | | :before-remove="beforeRemoveFile" |
| | | :on-preview="handlePictureCardPreview" |
| | | :disabled="readonly" |
| | | accept="image/*" |
| | | > |
| | | <template #trigger v-if="fileList.length < 3 && !readonly"> |
| | | <el-button |
| | | v-if="fileList.length < 3" |
| | | type="primary" |
| | | id="uploadBtnId" |
| | | style="display: none" |
| | | ></el-button> |
| | | <el-icon> |
| | | <Plus /> |
| | | </el-icon> |
| | | </template> |
| | | <template #tip> |
| | | <div style="color: #f56c6c">æå°ä¸ä¼ ä¸å¼ å¾çï¼æå¤éæ©ä¸å¼ å¾ç</div> |
| | | </template> |
| | | </el-upload> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmit" v-show="!readonly" |
| | | >ä¿å</el-button |
| | | > |
| | | <el-button @click="this.$emit('submited', false)" v-show="!readonly" |
| | | >åæ¶</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <ArbitraryPhoto |
| | | :max-select="maxSelectImgCount - fileList.length" |
| | | v-if="anyPhotoDialog" |
| | | v-model:dialog-visible="anyPhotoDialog" |
| | | @submit="handleSelectedAnyPhono" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="arbitraryPhotoRef" |
| | | > |
| | | </ArbitraryPhoto> |
| | | <CompLedgerPhoto |
| | | :max-select="maxSelectImgCount - fileList.length" |
| | | v-if="ledgerPicDialog" |
| | | v-model:dialog-visible="ledgerPicDialog" |
| | | @submit="handleLedgerPicPhono" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="ledgerPhotoRef" |
| | | ></CompLedgerPhoto> |
| | | <CompDevicePhoto |
| | | :max-select="maxSelectImgCount - fileList.length" |
| | | v-if="deiveceImgDialog" |
| | | v-model:dialog-visible="deiveceImgDialog" |
| | | @submit="handleSelectedDevicePhono" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="deiveceImgDialogRef" |
| | | > |
| | | </CompDevicePhoto> |
| | | |
| | | <el-dialog v-model="previewDialogVisible"> |
| | | <img w-full :src="previewDialogImageUrl" alt="é¢è§" class="preview-pic" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | </CompGenericWrapper> |
| | | </template> |
| | | <script> |
| | | import ArbitraryPhoto from './ArbitraryPhoto.vue'; |
| | | import LedgerPic from './CompLedgerPic.vue'; |
| | | import CompLedgerPhoto from './CompLedgerPhoto.vue'; |
| | | import CompDevicePhoto from './CompDevicePhoto.vue'; |
| | | import problemApi from '@/api/fysp/problemApi.js'; |
| | | |
| | | import { $fysp } from '@/api/index.js'; |
| | | import fileUtil from '@/utils/fileUtils.js'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | export default { |
| | | emits: ['submit', 'cancel'], |
| | | components: { |
| | | ArbitraryPhoto, |
| | | CompDevicePhoto, |
| | | CompLedgerPhoto |
| | | CompLedgerPhoto, |
| | | }, |
| | | props: { |
| | | readonly: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // fixme 2024.11.20 åç»ä»¶åå§åæ¶æºé®é¢ |
| | | initPropsCount: 0, |
| | | // åå§é¢è§å¾çindex |
| | | initialIndex: -1, |
| | | // å¾çéæ©æå¤§æ°é |
| | | maxSelectImgCount: 3, |
| | | previewDialogVisible: false, |
| | |
| | | month: -1, |
| | | ledgerPicDialog: false, |
| | | rules: { |
| | | proType: { |
| | | _proType: { |
| | | required: true, |
| | | message: 'é®é¢ç±»åä¸è½ä¸ºç©º', |
| | | trigger: 'change' |
| | |
| | | message: 'é®é¢ä½ç½®ä¸è½ä¸ºç©º', |
| | | trigger: 'change' |
| | | }, |
| | | advise: { |
| | | advice: { |
| | | required: true, |
| | | message: 'é®é¢å»ºè®®ä¸è½ä¸ºç©º', |
| | | trigger: 'change' |
| | | }, |
| | | proRemark: { |
| | | required: true, |
| | | message: 'è¡¥å
说æä¸è½ä¸ºç©º', |
| | | trigger: 'change' |
| | | } |
| | | }, |
| | |
| | | }, |
| | | deep: true |
| | | }, |
| | | // å½é®é¢å»ºè®®æ¹åæ¶é®é¢å»ºè®®ä¿®æ£è·çæ¹å |
| | | deepCopyProblem: { |
| | | initPropsCount: { |
| | | handler(nv, ov) { |
| | | // å¾çæ ¡éª |
| | | nv._adviseEdit = ov.advise; |
| | | if (nv >= 3) { |
| | | this.initOptions(); |
| | | } |
| | | }, |
| | | deep: true |
| | | immediate: true |
| | | }, |
| | | problem: { |
| | | handler(nv, ov) { |
| | | 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: { |
| | |
| | | const descriptions = []; |
| | | |
| | | this.problemTypeList.forEach((item) => { |
| | | if (item.typename == this.proType) { |
| | | if (item.typename == this.deepCopyProblem._proType) { |
| | | descriptions.push(item); |
| | | } |
| | | }); |
| | |
| | | }, []); |
| | | }, |
| | | adviseOptions() { |
| | | console.log(this.currProTypeGuid, this.problem.guid, this.suggestions); |
| | | |
| | | let problemGuid = this.currProTypeGuid || this.problem.guid; |
| | | let array = this.suggestions.filter( |
| | | (item) => item.adProblemtypeguid == problemGuid |
| | | ); |
| | | console.log( |
| | | this.suggestions.filter( |
| | | (item) => item.adProblemtypeguid == problemGuid |
| | | ), |
| | | this.adviseOptions |
| | | ); |
| | | |
| | | return array; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initOptions(); |
| | | this.getDeviceImgList(); |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | onProAdviseChange(value) { |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advise; |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advice; |
| | | }, |
| | | handlePictureCardPreview(uploadFile) { |
| | | this.initialIndex = this.fileList.indexOf(uploadFile); |
| | | this.previewDialogVisible = true; |
| | | this.previewDialogImageUrl = uploadFile.url; |
| | | }, |
| | | beforeDeiveceImgDialogclose() { |
| | | this.deiveceImgDialog = false; |
| | | }, |
| | | // æ åå屿§å |
| | | convertKeys(obj) { |
| | | // å°ä¸ä¸ªjså¯¹è±¡ä¸æædiï¼wiï¼piå¼å¤´ç屿§å
¨é¨æ¹æå»æè¿äºåç¼å¹¶ä¸éæ°å为驼峰å¼å½å |
| | | const newObj = {}; |
| | | for (const key in obj) { |
| | | let newKey = key; |
| | | if (key.startsWith('di')) { |
| | | newKey = key.substring(2); |
| | | } else if (key.startsWith('wi')) { |
| | | newKey = key.substring(2); |
| | | } else if (key.startsWith('pi')) { |
| | | newKey = key.substring(2); |
| | | } |
| | | newKey = newKey.charAt(0).toLowerCase() + newKey.slice(1); |
| | | newObj[newKey] = obj[key]; |
| | | } |
| | | return newObj; |
| | | }, |
| | | // ä¿åç¶æä¿¡æ¯ |
| | | saveStatus(device, status) { |
| | | var _picUrl = $fysp.imgUrl + status.dlPicUrl; |
| | | device._picUrl = _picUrl; |
| | | status._picUrl = _picUrl; |
| | | if ('_statusList' in device) { |
| | | device._statusList.push(status); |
| | | } else { |
| | | device._statusList = Array.of(status); |
| | | } |
| | | // æåº |
| | | device._statusList.sort(function (x, y) { |
| | | return new Date(x.dlCreateTime) - new Date(y.dlCreateTime); // éåºï¼ååºååä¹ |
| | | }); |
| | | }, |
| | | async getDeviceImgList() { |
| | | this.deviceImgObjList = []; |
| | | for (const deviceTopTypeElement of this.deviceTopTypes) { |
| | | const topTypeId = deviceTopTypeElement.id; |
| | | await deviceApi |
| | | .fetchDevices(this.subtask.sceneId, topTypeId) |
| | | .then((result) => { |
| | | // æ åå屿§å |
| | | for (let i = 0; i < result.data.length; i++) { |
| | | var element = this.convertKeys(result.data[i]); |
| | | // è·å设å¤ç¶æä¿¡æ¯ |
| | | let data = { |
| | | deviceId: element.id, |
| | | sceneId: element.sceneGuid, |
| | | deviceTypeId: topTypeId |
| | | }; |
| | | deviceApi |
| | | .fetchDeviceStatus(data) |
| | | .then((status) => { |
| | | var statusData = status.data; |
| | | var imgPaths = []; |
| | | |
| | | if (statusData) { |
| | | if (statusData.length == 0) { |
| | | this.deviceImgObjList.push(element); |
| | | return; |
| | | } |
| | | element = this.convertKeys(result.data[i]); |
| | | for (let j = 0; j < statusData.length; j++) { |
| | | // å¤å¶åºä¸ä¸ªè®¾å¤å¯¹è±¡ |
| | | var newDevice = useCloned(element).cloned.value; |
| | | const statusItem = statusData[j]; |
| | | // 设å¤å¯¹è±¡æ·»å ä¸ä¸ªå±æ§åè¡¨å±æ§ç¨æ¥ä¿å设å¤ç¶æ |
| | | this.saveStatus(newDevice, statusItem); |
| | | newDevice.dlLocation = statusItem.dlLocation; |
| | | newDevice.topTypeId = topTypeId; |
| | | |
| | | this.deviceImgObjList.push(newDevice); |
| | | } |
| | | } |
| | | }) |
| | | .catch((err) => {}); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | initOptions() { |
| | | if (!this.problem || !this.subtask || !this.topTask) { |
| | | return; |
| | | } |
| | | if (this.problem == undefined || this.problem == null) { |
| | | this.deepCopyProblem = {}; |
| | | } else { |
| | | this.deepCopyProblem = useCloned(this.problem).cloned.value; |
| | | this.currProTypeGuid = this.problem.guid; |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advise; |
| | | this.deepCopyProblem.advice = this.deepCopyProblem.advise; |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advice; |
| | | } |
| | | |
| | | this.type = 'guid' in this.deepCopyProblem ? 1 : 0; |
| | |
| | | currDescription = currProName; |
| | | this.problemTypeList.forEach((item) => { |
| | | if (item.description == currDescription) { |
| | | this.proType = item.typename; |
| | | this.deepCopyProblem._proType = item.typename; |
| | | } |
| | | }); |
| | | this.deepCopyProblem.description = currDescription; |
| | |
| | | |
| | | this.problemTypeList.forEach((item) => { |
| | | if (item.description === currDescription) { |
| | | this.proType = item.typename; |
| | | this.deepCopyProblem._proType = item.typename; |
| | | } |
| | | }); |
| | | this.deepCopyProblem.description = currDescription; |
| | |
| | | } |
| | | }, |
| | | handleLedgerPicPhono(data) { |
| | | this.beforeLedgerPicDialogclose(); |
| | | let isExist = false; |
| | | for (const item of data) { |
| | | for (const already of this.fileList) { |
| | |
| | | // é»è®¤é®é¢æè¿°åé®é¢å»ºè®®ä¸ºç¬¬ä¸ä¸ª |
| | | this.currProTypeGuid = this.descriptionOptions[0].guid; |
| | | this.deepCopyProblem.description = this.descriptionOptions[0].description; |
| | | this.deepCopyProblem.advise = this.adviseOptions[0].adName; |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advise; |
| | | this.onProDesChange(this.deepCopyProblem.description); |
| | | this.deepCopyProblem.advice = this.adviseOptions[0].adName; |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advice; |
| | | }, |
| | | findProByProDesName(name) { |
| | | let result; |
| | |
| | | }, |
| | | onProDesChange(value) { |
| | | let currPro = this.findProByProDesName(value); |
| | | this.deepCopyProblem.advise = ''; |
| | | this.currProTypeGuid = currPro.guid; |
| | | // this.deepCopyProblem.description = currPro.description; |
| | | this.changeProblemname(); |
| | | this.deepCopyProblem.advise = ''; |
| | | |
| | | var adName = |
| | | this.adviseOptions.length == 0 ? '' : this.adviseOptions[0].adName; |
| | | this.deepCopyProblem.advise = adName; |
| | | this.deepCopyProblem.advice = adName; |
| | | this.$nextTick(() => { |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advice; |
| | | }); |
| | | }, |
| | | onProLocationChange(value) { |
| | | this.posList.forEach((item) => { |
| | |
| | | } |
| | | return true; |
| | | }, |
| | | // TODO |
| | | validateForm() {}, |
| | | onCancel() { |
| | | this.$emit("cancel") |
| | | this.$emit('update:visible', false) |
| | | }, |
| | | onSubmit() { |
| | | this.validateForm(); |
| | | // å¾çæ ¡éª |
| | | if (!this.pictureValidate()) { |
| | | return; |
| | | } |
| | | // æ°æ®åå¤ |
| | | let deepCopyPro = useCloned(this.deepCopyProblem).cloned.value; |
| | | let data = new FormData(); |
| | | var picUrls = []; |
| | | this.fileList.forEach((item) => { |
| | | if (!('guid' in item)) { |
| | | // æ°ç |
| | | let exclude = false; |
| | | for (let index = 0; index < this.oldFileList.length; index++) { |
| | | const element = this.oldFileList[index]; |
| | | if (item.url == element.url) { |
| | | exclude = true; |
| | | break; |
| | | this.$refs.formRef.validate((valid) => { |
| | | if (valid && this.pictureValidate()) { |
| | | // æ°æ®åå¤ |
| | | let deepCopyPro = useCloned(this.deepCopyProblem).cloned.value; |
| | | let data = new FormData(); |
| | | var picUrls = []; |
| | | this.fileList.forEach((item) => { |
| | | if (!('guid' in item)) { |
| | | // æ°ç |
| | | let exclude = false; |
| | | for (let index = 0; index < this.oldFileList.length; index++) { |
| | | const element = this.oldFileList[index]; |
| | | if (item.url == element.url) { |
| | | exclude = true; |
| | | break; |
| | | } |
| | | } |
| | | if (!exclude) { |
| | | picUrls.push(item.url); |
| | | } |
| | | exclude = false; |
| | | // picUrls.push(item) |
| | | } |
| | | }); |
| | | if (this.type == 1) { |
| | | let deleteImgCopy = this.deleteImg; |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | data.append('deleteImg', deleteImgCopy); |
| | | deepCopyPro.advise = deepCopyPro.advice; |
| | | delete deepCopyPro['advice']; |
| | | delete deepCopyPro['mediafileList']; |
| | | delete deepCopyPro['description']; |
| | | delete deepCopyPro['_adviseEdit']; |
| | | delete deepCopyPro['_proType']; |
| | | delete deepCopyPro['proType']; |
| | | data.append('problem', JSON.stringify(deepCopyPro)); |
| | | files.forEach((image) => { |
| | | data.append('images', image); |
| | | }); |
| | | problemApi.updateProblem(data).then((res) => {}); |
| | | }); |
| | | this.$emit('submit', false); |
| | | } else { |
| | | const deepCopySubTask = useCloned(this.subtask).cloned.value; |
| | | const that = this; |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | deepCopyPro.insGuid = deepCopySubTask.insGuid; |
| | | delete deepCopyPro['description']; |
| | | deepCopyPro.proName = deepCopyPro.problemname; |
| | | delete deepCopyPro['problemname']; |
| | | deepCopyPro.ptGuid = that.findProTypeByGuid( |
| | | that.currProTypeGuid |
| | | ).guid; |
| | | deepCopyPro.locationId = deepCopyPro.locationid; |
| | | delete deepCopyPro['locationid']; |
| | | delete deepCopyPro['_adviseEdit']; |
| | | delete deepCopyPro['_proType']; |
| | | data.append('problemVo', JSON.stringify(deepCopyPro)); |
| | | files.forEach((image) => { |
| | | data.append('images', image); |
| | | }); |
| | | problemApi.newProblem(data).then((res) => {}); |
| | | }); |
| | | this.$emit('submit', true); |
| | | } |
| | | if (!exclude) { |
| | | picUrls.push(item.url); |
| | | } |
| | | exclude = false; |
| | | // picUrls.push(item) |
| | | } |
| | | }); |
| | | if (this.type == 1) { |
| | | let deleteImgCopy = this.deleteImg; |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | data.append('deleteImg', deleteImgCopy); |
| | | delete deepCopyPro['mediafileList']; |
| | | delete deepCopyPro['description']; |
| | | data.append('problem', JSON.stringify(deepCopyPro)); |
| | | files.forEach((image) => { |
| | | data.append('images', image); |
| | | }); |
| | | problemApi.updateProblem(data).then((res) => {}); |
| | | }); |
| | | } else { |
| | | const deepCopySubTask = useCloned(this.subtask).cloned.value; |
| | | const that = this; |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | deepCopyPro.insGuid = deepCopySubTask.insGuid; |
| | | delete deepCopyPro['advise']; |
| | | delete deepCopyPro['description']; |
| | | deepCopyPro.proName = deepCopyPro.problemname; |
| | | delete deepCopyPro['problemname']; |
| | | deepCopyPro.ptGuid = that.findProTypeByGuid( |
| | | that.currProTypeGuid |
| | | ).guid; |
| | | deepCopyPro.locationId = deepCopyPro.locationid; |
| | | delete deepCopyPro['locationid']; |
| | | data.append('problemVo', JSON.stringify(deepCopyPro)); |
| | | files.forEach((image) => { |
| | | data.append('images', image); |
| | | }); |
| | | problemApi.newProblem(data).then((res) => {}); |
| | | }); |
| | | } |
| | | this.$emit('submited', true); |
| | | }, |
| | | handleSelectedAnyPhono(data) { |
| | | this.beforeAnyPhotoDialogclose(); |
| | |
| | | }, |
| | | beforeLedgerPicDialogclose() { |
| | | this.ledgerPicDialog = false; |
| | | }, |
| | | |
| | | destoryMyself() { |
| | | this.$destroy(); |
| | | } |
| | | } |
| | | }; |
| | |
| | | .img-upload { |
| | | margin-top: 30px; |
| | | margin-bottom: 30px; |
| | | margin-left: 63px; |
| | | } |
| | | .row { |
| | | width: 100%; |
| | |
| | | height: 100%; |
| | | } |
| | | ::v-deep .el-upload--picture-card { |
| | | border: 0 !important; |
| | | display: none; |
| | | } |
| | | /* éèel-uploadä¸ä¼ æåç»ä»¶ */ |
| | | ::v-deep .el-upload-list__item-status-label { |
| | | display: none !important; |
| | | } |
| | | </style> |
| | |
| | | type="danger" |
| | | size="small" |
| | | @click="deletePro" |
| | | :disabled="!proStatus.deletable" |
| | | disabled |
| | | >å é¤</el-button |
| | | > |
| | | <el-button |
| | | <!-- <el-button |
| | | type="danger" |
| | | size="small" |
| | | @click="beforePro" |
| | | @click="deletePro" |
| | | :disabled="!proStatus.deletable" |
| | | >å é¤</el-button |
| | | > --> |
| | | <!-- å®¡æ ¸é©³åæä½ --> |
| | | <!-- <el-button |
| | | v-if=" |
| | | this.problem.extension3 == 'fail' || |
| | | this.problem.extension3 == 'change_fail' |
| | | " |
| | | type="danger" |
| | | size="small" |
| | | @click="revokePro" |
| | | :disabled="proStatus.checkable" |
| | | >æ¤é</el-button |
| | | >æ¤é驳å</el-button |
| | | > |
| | | <el-button |
| | | v-else |
| | | type="warning" |
| | | size="small" |
| | | @click="rejectPro" |
| | | :disabled="!proStatus.checkable" |
| | | >驳å</el-button |
| | | >å®¡æ ¸é©³å</el-button |
| | | > --> |
| | | <el-button |
| | | v-if=" |
| | | this.problem.extension3 == 'pass' || |
| | | this.problem.extension3 == 'change_pass' |
| | | " |
| | | type="danger" |
| | | size="small" |
| | | @click="revokePro" |
| | | :disabled="proStatus.checkable" |
| | | >æ¤ééè¿</el-button |
| | | > |
| | | <el-button |
| | | v-else |
| | | type="success" |
| | | size="small" |
| | | @click="passPro" |
| | | :disabled="!proStatus.checkable" |
| | | >éè¿</el-button |
| | | >å®¡æ ¸éè¿</el-button |
| | | > |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <div class="dialog-wrapper"> |
| | | <el-dialog |
| | | title="é®é¢æ´æ£" |
| | | width="50%" |
| | | v-model="proAddOrUpdDialogVisible" |
| | | :before-close="proAddOrUpdDialogClose" |
| | | > |
| | | <CompProblemAddOrUpd |
| | | v-if="proAddOrUpdDialogVisible" |
| | | :problem="deepCopyPro" |
| | | :subtask="deepCopySubtask" |
| | | :topTask="deepCopyTopTask" |
| | | ref="compProblemAddOrUpdRef" |
| | | @submited="onProSubmited" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | <el-dialog width="80%" title="æ´æ¹æäº¤" v-model="addChangeDialogVisible"> |
| | | <ComChangeEdit |
| | | :changeType="0" |
| | | v-if="addChangeDialogVisible" |
| | | :problemId="problem.guid" |
| | | :subtask="subtask" |
| | | :month="month" |
| | | @submited="onAddChangeSubmited" |
| | | /> |
| | | </el-dialog> |
| | | <el-dialog |
| | | width="50%" |
| | | title="æ´æ¹æ£éª" |
| | | v-model="changeEditDialogVisible" |
| | | :before-close="changeEditDialogClose" |
| | | > |
| | | <ComChangeEdit |
| | | :changeType="1" |
| | | v-if="changeEditDialogVisible" |
| | | :problemId="problem.guid" |
| | | :oldChangeFileList="problem.mediafileList" |
| | | :subtask="subtask" |
| | | :month="month" |
| | | @submited="onChangeSubmited" |
| | | /> |
| | | </el-dialog> |
| | | <CompProblemAddOrUpd |
| | | title="é®é¢æ´æ£" |
| | | v-if="proAddOrUpdDialogVisible" |
| | | v-model:visible="proAddOrUpdDialogVisible" |
| | | :problem="deepCopyPro" |
| | | :subtask="subtask" |
| | | :topTask="topTask" |
| | | ref="compProblemAddOrUpdRef" |
| | | @cancel="onProCanceled" |
| | | @submit="onProSubmited" |
| | | /> |
| | | <!-- æ´æ¹ --> |
| | | <ComChangeEdit |
| | | :title="changeType == 1 ? 'æ´æ¹æ£éª' : 'æ´æ¹æäº¤'" |
| | | v-if="changeDialogVisible" |
| | | v-model:visible="changeDialogVisible" |
| | | :changeType="changeType" |
| | | :problemId="problem.guid" |
| | | :subtask="subtask" |
| | | :month="month" |
| | | :oldChangeFileList="problem.mediafileList" |
| | | @cancel="onChangeCanceled" |
| | | @submit="onChangeSubmited" |
| | | /> |
| | | <!-- é®é¢å¤ç° --> |
| | | <el-dialog |
| | | width="50%" |
| | | <CompProRecent |
| | | title="é®é¢å¤ç°" |
| | | v-model="proRecentDialogVisible" |
| | | :before-close="proRecentDialogClose" |
| | | > |
| | | <CompProRecent |
| | | v-if="proRecentDialogVisible" |
| | | :subtask="subtask" |
| | | :topTask="topTask" |
| | | :problem="problem" |
| | | /> |
| | | </el-dialog> |
| | | v-if="proRecentDialogVisible" |
| | | v-model:visible="proRecentDialogVisible" |
| | | :subtask="subtask" |
| | | :topTask="topTask" |
| | | :problem="problem" |
| | | /> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import CompProRecent from './CompProRecent.vue'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | export default { |
| | | emits: ['check', 'submit', 'cancel'], |
| | | components: { |
| | | CompProblemAddOrUpd, |
| | | ComChangeEdit, |
| | |
| | | default: 1 |
| | | } |
| | | }, |
| | | emits: ['submit'], |
| | | data() { |
| | | return { |
| | | changeDialogVisible: false, |
| | | changeType: -1, |
| | | addChangeDialogVisible: false, |
| | | // è¿ææ
åµ |
| | | proRecentDialogVisible: false, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | onAddChangeSubmited() { |
| | | this.$emit('updated', true); |
| | | this.addChangeDialogVisible = false; |
| | | }, |
| | | // è¿ææ
åµå¼¹çªå
³é |
| | | proRecentDialogClose() { |
| | | this.proRecentDialogVisible = false; |
| | | }, |
| | | newProblem() { |
| | | this.proAddOrUpdDialogVisible = true; |
| | | onProCanceled() { |
| | | this.proAddOrUpdDialogVisible = false; |
| | | }, |
| | | onProSubmited(isOk) { |
| | | this.$emit('updated', isOk); |
| | | this.$emit('submit', isOk); |
| | | this.proAddOrUpdDialogVisible = false; |
| | | }, |
| | | onChangeCanceled() { |
| | | }, |
| | | onChangeSubmited(isOk) { |
| | | this.$emit('updated', isOk); |
| | | this.changeEditDialogVisible = false; |
| | | }, |
| | | proAddOrUpdDialogClose() { |
| | | this.proAddOrUpdDialogVisible = false; |
| | | }, |
| | | changeEditDialogClose() { |
| | | this.changeEditDialogVisible = false; |
| | | this.$emit('submit', isOk); |
| | | this.changeDialogVisible = false; |
| | | }, |
| | | deletePro() { |
| | | useMessageBoxTip({ |
| | |
| | | passPro() { |
| | | this.checkPro(true); |
| | | }, |
| | | beforePro() { |
| | | revokePro() { |
| | | const pro = this.problem; |
| | | let status = this.proStatus; |
| | | let doneMsg; |
| | |
| | | .checkProblem({ pId: pro.guid, action: action }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | pro.extension3 = status; |
| | | this.$emit('submit', false); |
| | | pro.extension3 = status |
| | | this.$emit('check'); |
| | | } |
| | | }); |
| | | } |
| | |
| | | .checkProblem({ pId: pro.guid, action: action }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | pro.extension3 = status; |
| | | this.$emit('submit', false); |
| | | pro.extension3 = status |
| | | this.$emit('check'); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | addChange() { |
| | | this.addChangeDialogVisible = true; |
| | | }, |
| | | updatePro() { |
| | | this.deepCopyPro = useCloned(this.problem).cloned.value; |
| | | this.deepCopySubtask = useCloned(this.subtask).cloned.value; |
| | | this.deepCopyTopTask = useCloned(this.topTask).cloned.value; |
| | | this.$nextTick(() => { |
| | | this.proAddOrUpdDialogVisible = true; |
| | | }); |
| | |
| | | updateChange() { |
| | | this.getCurrentMouth(); |
| | | if (!this.problem.ischanged) { |
| | | this.addChange(); |
| | | this.changeType = 0; |
| | | } else { |
| | | this.changeEditDialogVisible = true; |
| | | this.changeType = 1; |
| | | } |
| | | this.changeDialogVisible = true; |
| | | }, |
| | | currProRecent() { |
| | | this.proRecentDialogVisible = true; |
| | |
| | | <template> |
| | | <el-space> |
| | | <el-descriptions :column="3" size="small" border direction="vertical"> |
| | | <el-descriptions-item label="é®é¢æ°">{{ |
| | | summary.proCount |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ´æ¹æ°">{{ |
| | | summary.changeCount |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ´æ¹ç">{{ |
| | | summary.changePer |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item |
| | | label="é®é¢æ°" |
| | | label-class-name="problem-label" |
| | | class-name="secondary-content" |
| | | >{{ summary.proCount }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item |
| | | label="æ´æ¹æ°" |
| | | label-class-name="problem-label" |
| | | class-name="secondary-content" |
| | | >{{ summary.changeCount }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item |
| | | label="æ´æ¹ç" |
| | | label-class-name="problem-label" |
| | | :class-name="summary.changePer < 0.6 ? 'danger-content' : 'secondary-content'" |
| | | >{{ formatPercent(summary.changePer) }}</el-descriptions-item |
| | | > |
| | | </el-descriptions> |
| | | <el-descriptions :column="8" size="small" border direction="vertical"> |
| | | <el-descriptions-item label="å·¡æ¥ç¹æ¬¡">{{ |
| | | summary.total |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="é®é¢æªå®¡æ ¸">{{ |
| | | summary.proUnCheck |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="é¨åå®¡æ ¸">{{ |
| | | summary.proPartCheck |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="å
¨é¨å®¡æ ¸">{{ |
| | | summary.proAllCheck |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item |
| | | label="å·¡æ¥ç¹æ¬¡" |
| | | label-class-name="pro-check-label" |
| | | class-name="secondary-content" |
| | | >{{ summary.total }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item |
| | | label="é®é¢æªå®¡æ ¸" |
| | | label-class-name="pro-check-label" |
| | | :class-name="summary.proUnCheck > 0 ? 'danger-content' : 'secondary-content'" |
| | | >{{ summary.proUnCheck }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item |
| | | label="é¨åå®¡æ ¸" |
| | | label-class-name="pro-check-label" |
| | | :class-name="summary.proPartCheck > 0 ? 'danger-content' : 'secondary-content'" |
| | | >{{ summary.proPartCheck }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item |
| | | label="å
¨é¨å®¡æ ¸" |
| | | label-class-name="pro-check-label" |
| | | class-name="secondary-content" |
| | | >{{ summary.proAllCheck }}</el-descriptions-item |
| | | > |
| | | </el-descriptions> |
| | | <el-descriptions :column="8" size="small" border direction="vertical"> |
| | | <el-descriptions-item label="æªæ´æ¹">{{ |
| | | summary.UnChange |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ´æ¹æªå®¡æ ¸">{{ |
| | | summary.changeUnCheck |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="é¨åå®¡æ ¸">{{ |
| | | summary.changePartCheck |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="å
¨é¨å®¡æ ¸">{{ |
| | | summary.changeAllCheck |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item |
| | | label="æªæ´æ¹" |
| | | label-class-name="change-check-label" |
| | | :class-name="summary.UnChange > 0 ? 'danger-content' : 'secondary-content'" |
| | | >{{ summary.UnChange }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item |
| | | label="æ´æ¹æªå®¡æ ¸" |
| | | label-class-name="change-check-label" |
| | | :class-name="summary.changeUnCheck > 0 ? 'danger-content' : 'secondary-content'" |
| | | >{{ summary.changeUnCheck }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item |
| | | label="é¨åå®¡æ ¸" |
| | | label-class-name="change-check-label" |
| | | :class-name="summary.changePartCheck > 0 ? 'danger-content' : 'secondary-content'" |
| | | >{{ summary.changePartCheck }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item |
| | | label="å
¨é¨å®¡æ ¸" |
| | | label-class-name="change-check-label" |
| | | class-name="secondary-content" |
| | | >{{ summary.changeAllCheck }}</el-descriptions-item |
| | | > |
| | | </el-descriptions> |
| | | </el-space> |
| | | <!-- <el-space> |
| | |
| | | changeAllCheck: 0, |
| | | proCount: 0, |
| | | changeCount: 0, |
| | | changePer: '0%' |
| | | changePer: 0 |
| | | }; |
| | | this.subtasks.forEach((s) => { |
| | | _summary.total++; |
| | |
| | | }); |
| | | |
| | | if (_summary.proCount != 0) { |
| | | _summary.changePer = |
| | | Math.round((_summary.changeCount / _summary.proCount) * 1000) / 10 + |
| | | '%'; |
| | | _summary.changePer = _summary.changeCount / _summary.proCount; |
| | | } |
| | | // _summary.forEach((s, i) => { |
| | | // if (i > 0) { |
| | | // let per = Math.round((s.value / _summary[0].value) * 1000) / 10 |
| | | // if (isNaN(per)) per = 0 |
| | | // s.value = `${s.value}(${per}%)` |
| | | // } |
| | | // }) |
| | | |
| | | return _summary; |
| | | } |
| | | }, |
| | | methods: { |
| | | formatPercent(value) { |
| | | return Math.round(value * 1000) / 10 + '%'; |
| | | } |
| | | } |
| | | }; |
| | |
| | | padding: 0px 4px !important; |
| | | /* font-size: 13px !important; */ |
| | | } |
| | | |
| | | :deep(.problem-label) { |
| | | background: var(--el-color-primary-light-7) !important; |
| | | } |
| | | :deep(.problem-content) { |
| | | /* background: var(--el-color-danger-light-9); */ |
| | | } |
| | | |
| | | :deep(.pro-check-label) { |
| | | background: var(--el-color-success-light-7) !important; |
| | | } |
| | | :deep(.pro-check-content) { |
| | | } |
| | | |
| | | :deep(.change-check-label) { |
| | | background: var(--el-color-warning-light-7) !important; |
| | | } |
| | | :deep(.change-check-content) { |
| | | } |
| | | |
| | | :deep(.danger-content) { |
| | | color: var(--el-color-danger) !important; |
| | | font-weight: 600 !important; |
| | | font-size: 17px !important; |
| | | } |
| | | |
| | | :deep(.secondary-content) { |
| | | color: var(--el-text-color-regular) !important; |
| | | font-size: 12px !important; |
| | | } |
| | | </style> |
| | |
| | | </template> |
| | | <template #aside> |
| | | <SideList |
| | | legend |
| | | :items="subtasks" |
| | | :loading="sideLoading" |
| | | @item-click="chooseSubtask" |
| | |
| | | </template> |
| | | <template #main> |
| | | <el-scrollbar class="el-scrollbar" v-loading="mainLoading"> |
| | | <div></div> |
| | | <CompSceneConstructionInfo |
| | | title="Aãåºæ¬ä¿¡æ¯" |
| | | :scene="formScene" |
| | |
| | | @submit="handleSelectAnyPhoto" |
| | | :defaultFile="[sceneImg]" |
| | | ></ArbitraryPhoto> |
| | | <el-dialog |
| | | <FYImageSelectDialog |
| | | v-model:dialog-visible="deiveceImgDialog" |
| | | title="设å¤å¾ç" |
| | | :max-select="1" |
| | | :typeList="showDeviceTypeList" |
| | | :typeImgMap="showDeviceImgMap" |
| | | @submit="handleSelectDevicePhoto" |
| | | ></FYImageSelectDialog> |
| | | <!-- <el-dialog |
| | | title="设å¤å¾ç" |
| | | width="66%" |
| | | v-model="deiveceImgDialog" |
| | |
| | | > |
| | | <CompDevicePhono |
| | | @selectPhonoEvent="handleSelectDevicePhoto" |
| | | :imgPathsDataSource="showDeviceImgList" |
| | | :imgPathsDataSource="showDeviceImgMap" |
| | | > |
| | | </CompDevicePhono> |
| | | </el-dialog> |
| | | </el-dialog> --> |
| | | </template> |
| | | <script setup> |
| | | import { ref, computed } from 'vue'; |
| | |
| | | import { enumDevice, toLabel } from '@/enum/device/device'; |
| | | import { exportDocx } from '@/utils/doc'; |
| | | import right_triangle from '@/assets/image/right_triangle.png'; |
| | | import ProCheckProxy from '@/views/fysp/check/ProCheckProxy'; |
| | | |
| | | import CompSceneConstructionInfo from '@/views/fysp/scene/CompSceneConstructionInfo.vue'; |
| | | import ArbitraryPhoto from '@/views/fysp/check/components/ArbitraryPhoto.vue'; |
| | | import CompDevicePhono from '@/views/fysp/check/components/CompDevicePhono.vue'; |
| | | import CompImgInfo from '@/views/fysp/data-product/components/CompImgInfo.vue'; |
| | | import CompProblemTable from './components/CompProblemTable.vue'; |
| | | import dayjs from 'dayjs'; |
| | |
| | | taskApi.getSubtaskSummary(param).then((res) => { |
| | | const list = []; |
| | | res.forEach((s) => { |
| | | const t = getSubtaskType(s); |
| | | const t = ProCheckProxy.getSubtaskType(s); |
| | | list.push({ |
| | | status: s.subtask.status, |
| | | type: t, |
| | | title: s.stName, |
| | | categoly: s.stPlanTime.split('T')[0], |
| | |
| | | // 设å¤å¾çéæ©å¯¹è¯æ¡ |
| | | const deiveceImgDialog = ref(false); |
| | | const showDeviceIndex = ref(0); |
| | | const showDeviceImgList = ref([]); |
| | | const showDeviceTypeList = ref([]); |
| | | const showDeviceImgMap = ref(new Map()); |
| | | // 设å¤å¾çå表 |
| | | const deviceList = ref([]); |
| | | |
| | | function showDevicePhotoDialog(device, index) { |
| | | showDeviceIndex.value = index; |
| | | deiveceImgDialog.value = true; |
| | | showDeviceImgList.value = []; |
| | | showDeviceTypeList.value = [ |
| | | { typeId: device.topTypeId, typeName: device._deviceTypeName } |
| | | ]; |
| | | showDeviceImgMap.value.clear(); |
| | | let imgList = []; |
| | | device._status |
| | | .map((s) => s._picUrls) |
| | | .forEach((pics) => { |
| | | imgList = imgList.concat( |
| | | pics.map((p) => { |
| | | return { |
| | | topTypeId: device.topTypeId, |
| | | _picUrl: p |
| | | }; |
| | | return { url: p }; |
| | | }) |
| | | ); |
| | | }); |
| | | // console.log(imgList); |
| | | |
| | | showDeviceImgList.value = imgList; |
| | | showDeviceImgMap.value.set(device.topTypeId, imgList); |
| | | } |
| | | |
| | | function handleSelectDevicePhoto(data) { |
| | | deiveceImgDialog.value = false; |
| | | if (data.length > 0) { |
| | | deviceList.value[showDeviceIndex.value]._showStatusPic = data[0]._picUrl; |
| | | deviceList.value[showDeviceIndex.value]._showStatusPic = data[0].url; |
| | | } |
| | | } |
| | | |
| | |
| | | _showStatusPic_1: d1._showStatusPic ? d1._showStatusPic : right_triangle, |
| | | _deviceTypeName_1: d1._deviceTypeName, |
| | | // hasPic2: d2 ? true : false, |
| | | _showStatusPic_2: d2 ? (d2._showStatusPic ? d2._showStatusPic : right_triangle) : right_triangle, |
| | | _deviceTypeName_2: d2 ? d2._deviceTypeName : '', |
| | | _showStatusPic_2: d2 |
| | | ? d2._showStatusPic |
| | | ? d2._showStatusPic |
| | | : right_triangle |
| | | : right_triangle, |
| | | _deviceTypeName_2: d2 ? d2._deviceTypeName : '' |
| | | }); |
| | | } |
| | | const param = { |
| | |
| | | <div class="sub-title">å·¥å°ä¿¡æ¯</div> |
| | | <el-row> |
| | | <FormCol> |
| | | <CompSceneConstructionInfo :form-info="formSubScene" /> |
| | | <CompSceneConstructionInfo showStyle="form" :form-info="formSubScene" /> |
| | | </FormCol> |
| | | </el-row> |
| | | <el-divider /> |
| | |
| | | type = 0; |
| | | break; |
| | | case 'æ£å¨æ§è¡': |
| | | type = 1; |
| | | type = 5; |
| | | break; |
| | | case 'å·²ç»æ': |
| | | type = 2; |
| | | type = 6; |
| | | break; |
| | | default: |
| | | type = 0; |