Merge branch 'hc-dataproduct-v1112' into lsf-dataproduct-1024
| | |
| | | .then((res) => res.data); |
| | | }, |
| | | // è·åè®¾å¤ |
| | | async fetchDevices(sceneId, deviceTypeId) { |
| | | fetchDevices(sceneId, deviceTypeId) { |
| | | const params = `?sceneId=${sceneId}&deviceTypeId=${deviceTypeId}`; |
| | | return await $fysp |
| | | return $fysp |
| | | .get(`device${params}`) |
| | | .then((res) => res) |
| | | .then((res) => res.data); |
| | | }, |
| | | // è·å设å¤ç¶æä»¥å设å¤è¯¦æ
|
| | | async fetchDeviceStatus({ deviceId, sceneId, deviceTypeId }) { |
| | | fetchDeviceStatus({ deviceId, sceneId, deviceTypeId }) { |
| | | const params = `?deviceId=${deviceId}&sceneId=${sceneId}&deviceTypeId=${deviceTypeId}`; |
| | | return await $fysp |
| | | return $fysp |
| | | .get(`device/status${params}`) |
| | | .then((res) => res) |
| | | .then((res) => res.data); |
| | |
| | | /** |
| | | * éè¿æ»ä»»å¡idåæ¶é´åºé´è·ååä»»å¡å表 |
| | | */ |
| | | async getByTopTaskAndDate({startTime, endTime, sceneTypeId, topTaskId}) { |
| | | getByTopTaskAndDate({startTime, endTime, sceneTypeId, topTaskId}) { |
| | | const params = `?startTime=${startTime}&endTime=${endTime}&sceneTypeId=${sceneTypeId}&topTaskId=${topTaskId}`; |
| | | return await $fysp.get(`subtask/getSubTask${params}`).then((res) => res.data); |
| | | return $fysp.get(`subtask/getSubTask${params}`).then((res) => res.data); |
| | | }, |
| | | /** |
| | | * è·åæä¸ªåºæ¯çå·¡æ¥ä»»å¡ |
| | | */ |
| | | async getSubtaskByScene({startTime, endTime, sceneId}) { |
| | | getSubtaskByScene({startTime, endTime, sceneId}) { |
| | | const params = `?startTime=${startTime}&endTime=${endTime}&sceneId=${sceneId}`; |
| | | return await $fysp.get(`subtask/byScene${params}`).then((res) => res.data); |
| | | return $fysp.get(`subtask/byScene${params}`).then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="title" |
| | | :model-value="dialogVisible" |
| | | @opened="$emit('update:dialogVisible', true)" |
| | | @closed="$emit('update:dialogVisible', false)" |
| | | width="66%" |
| | | destroy-on-close |
| | | > |
| | | <div class="main"> |
| | | <div class="main" v-loading="loading"> |
| | | <el-row justify="end" v-if="!readonly"> |
| | | <el-text size="small" type="info" class="m-r-8" |
| | | >æå¤éæ©{{ maxSelect }}å¼ å¾ç</el-text |
| | |
| | | :class="[img.isSelect ? 'selected' : 'noActive', 'image']" |
| | | fit="cover" |
| | | :src="img.url" |
| | | lazy |
| | | @click="onSelect(img, i)" |
| | | @load="onOneImgLoadSuccess" |
| | | @error="onOneImgLoadError" |
| | | /> |
| | | </el-scrollbar> |
| | | <el-row v-else justify="space-between"> |
| | |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref, watch } from 'vue'; |
| | | import { ref, watch, computed } from 'vue'; |
| | | |
| | | const props = defineProps({ |
| | | // æ é¢ |
| | | title: String, |
| | | dialogVisible: Boolean, |
| | | /** |
| | | * å¾çåç±» |
| | |
| | | const activeId = ref(''); |
| | | // const typeImgMap = ref(new Map()); |
| | | const selectedImgUrlList = ref([]); |
| | | |
| | | let loadedImgCount = ref(0); |
| | | // å è½½ç¶æ |
| | | const loading = computed(() => { |
| | | if (activeId.value == '') { |
| | | return false; |
| | | } |
| | | // ä¿è¯æå¼å§æ¯å è½½ç¶æï¼ä¸åä¹ä¸å è½½ä¹å忢å±ç¤ºå è½½ç¶æ |
| | | return !( |
| | | props.typeImgMap.get(activeId.value).length / 3 <= |
| | | loadedImgCount.value |
| | | ); |
| | | }); |
| | | function onOneImgLoadError(e) { |
| | | loadedImgCount.value++; |
| | | } |
| | | function onOneImgLoadSuccess(e) { |
| | | loadedImgCount.value++; |
| | | } |
| | | watch( |
| | | () => activeId.value, |
| | | (nV, oV) => { |
| | | loadedImgCount.value = 0; |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | |
| | | function onSelect(img, i) { |
| | | if (props.readonly) { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | { immediate: true } |
| | | { deep: true, immediate: true } |
| | | ); |
| | | </script> |
| | | <style scoped> |
| | |
| | | |
| | | .main { |
| | | margin: 0 auto; /* 使ç¶å
ç´ å±
ä¸ */ |
| | | height: 100%; |
| | | height: 72vh; |
| | | width: 100%; |
| | | } |
| | | |
| | | .imgs { |
| | | height: 50vh; |
| | | height: 60vh; |
| | | width: 100%; |
| | | min-height: 100px !important; |
| | | /* border-style:solid; |
| | |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | height: 60vh; |
| | | padding: 10px calc(var(--el-dialog-padding-primary) + 10px) !important; |
| | | } |
| | | </style> |
| | |
| | | class="el-scrollbar" |
| | | v-loading="mainLoading" |
| | | > |
| | | <CompProblemCard |
| | | v-if="compProblemCardVisible" |
| | | :key="i" |
| | | v-for="(p, i) in curProList" |
| | | :index="i + 1" |
| | | :problem="p" |
| | | :subtask="curSubtask.data" |
| | | :topTask="topTask" |
| | | @updated="onProSubmited" |
| | | @submit="updateSubtask" |
| | | ></CompProblemCard> |
| | | <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> |
| | | </el-scrollbar> |
| | | <el-empty v-else description="ææ è®°å½" v-loading="mainLoading" /> |
| | | </template> |
| | |
| | | <el-dialog |
| | | v-model="proAddOrUpdDialogVisible" |
| | | :before-close="proAddOrUpdDialogClose" |
| | | width="80%" |
| | | width="50%" |
| | | title="æ°å¢é®é¢" |
| | | > |
| | | <CompProblemAddOrUpd |
| | |
| | | <ArbitraryPhoto |
| | | v-if="anyPhotoDialog" |
| | | v-model:dialog-visible="anyPhotoDialog" |
| | | title="åºæ¯å¾ç" |
| | | :readonly="true" |
| | | :subtask="curSubtask.data" |
| | | ref="arbitraryPhotoRef" |
| | |
| | | click: () => { |
| | | this.openDeviceShowDialog(); |
| | | } |
| | | }, |
| | | } |
| | | // { |
| | | // name: 'æ¹éå®¡æ ¸', |
| | | // color: 'primary', |
| | |
| | | }); |
| | | }, |
| | | // é®é¢å¡çç»ä»¶ä¸»å¨åèµ·å·æ°ç¶ç»ä»¶æ°æ® |
| | | updateSubtask() { |
| | | updateSubtask(refresh = true) { |
| | | this.curSubtask.data.proCheckedNum++; |
| | | this.curSubtask.type = this.getSubtaskType(this.curSubtask.data); |
| | | this.refreshCurrSubtask(); |
| | | if (refresh) { |
| | | this.refreshCurrSubtask(); |
| | | } |
| | | }, |
| | | onProSubmited(isOk) { |
| | | this.proAddOrUpdDialogClose(); |
| | |
| | | break |
| | | } |
| | | return { status: status, action: action } |
| | | }, |
| | | |
| | | /** |
| | | * é®é¢æ¤ååç¶æåæ¢ |
| | | * @param {String} s å½åé®é¢ç¶æ |
| | | * @returns ä¸ä¸ä¸ªé®é¢ç¶æ |
| | | */ |
| | | proBeforeStatus(s) { |
| | | let status, action |
| | | switch (s) { |
| | | case proStatus.fail: |
| | | case proStatus.pass: |
| | | status = proStatus.unCheck |
| | | action = 4 |
| | | break |
| | | case proStatus.change_fail: |
| | | case proStatus.change_pass: |
| | | status = proStatus.change_unCheck |
| | | action = 5 |
| | | break |
| | | } |
| | | return { status: status, action: action } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <FYImageSelectDialog |
| | | title="åºæ¯å¾ç" |
| | | :typeList="typesList" |
| | | :typeImgMap="typesMap" |
| | | :readonly="readonly" |
| | | :maxSelect="3" |
| | | ></FYImageSelectDialog> |
| | | </template> |
| | | <script> |
| | | import problemApi from '@/api/fysp/problemApi.js'; |
| | | import mediafileApi from '@/api/fysp/mediafileApi.js'; |
| | | import { $fysp } from '@/api/index.js'; |
| | | export default { |
| | | props: { |
| | | filters: Map, |
| | | // æ¯å¦ä»¥åªè¯»ç形弿¥çå½åé¡µé¢ |
| | | readonly: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | subtask: { |
| | | type: Object, |
| | | efault: {} |
| | | }, |
| | | inspectionGuid: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | defaultFile: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // å¾çå¯éæ°éï¼å½ä¼ å
¥æ°åæ¶ï¼ä»£è¡¨å¾çæ°é |
| | | maxSelect: { |
| | | type: Number, |
| | | default: 3 |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | // æ æ°æ® |
| | | typesList: [], |
| | | typesMap: new Map(), |
| | | isEmpty: false, |
| | | isClose: false, |
| | | isAll: false, |
| | | activeId: '', |
| | | typeList: [ |
| | | // { businesstypeid: 5, businesstype: '常è§è®°å½' }, |
| | | // { businesstypeid: 3, businesstype: 'çæµè®¾å¤' }, |
| | | // { businesstypeid: 7, businesstype: 'éç' }, |
| | | // { businesstypeid: 51, businesstype: 'æ©å±ç±»ä¸' }, |
| | | // { businesstypeid: 52, businesstype: 'æ©å±ç±»äº' }, |
| | | // { businesstypeid: 53, businesstype: 'æ©å±ç±»ä¸' }, |
| | | // { businesstypeid: 54, businesstype: 'æ©å±ç±»å' }, |
| | | // { businesstypeid: 55, businesstype: 'æ©å±ç±»äº' }, |
| | | // { businesstypeid: 56, businesstype: 'æ©å±ç±»å
' }, |
| | | // { businesstypeid: 57, businesstype: 'æ©å±ç±»ä¸' }, |
| | | // { businesstypeid: 58, businesstype: 'æ©å±ç±»å
«' }, |
| | | // { businesstypeid: 59, businesstype: 'æ©å±ç±»ä¹' }, |
| | | // { businesstypeid: 60, businesstype: 'æ©å±ç±»å' } |
| | | ], |
| | | typeImgMap: new Map(), |
| | | imgUrlList: [], |
| | | selectedImgUrlList: [] |
| | | }; |
| | | }, |
| | | watch: { |
| | | subtask: { |
| | | handler(nV, oV) { |
| | | if (nV != oV && nV) { |
| | | this.getAllImgList(); |
| | | } |
| | | }, |
| | | immediate: true |
| | | }, |
| | | defaultFile: { |
| | | handler(newFileList, oldFileList) { |
| | | if (this.isClose) { |
| | | return; |
| | | } |
| | | }, |
| | | deep: true |
| | | }, |
| | | typeImgMap: { |
| | | handler(newMap, oldMap) { |
| | | if (this.isClose || newMap.get(this.activeId) == undefined) { |
| | | return; |
| | | } |
| | | newMap.get(this.activeId).forEach((i) => { |
| | | if (i.isSelect == true) { |
| | | return; |
| | | } |
| | | this.defaultFile.forEach((imgItem) => { |
| | | if (imgItem.url == i.url) { |
| | | i.isSelect = true; |
| | | this.selectedImgUrlList.push(i); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | // if (this.subtask) { |
| | | // this.getAllImgList(); |
| | | // } |
| | | this.getGroupImgs(); |
| | | }, |
| | | methods: { |
| | | onImageSelectSubmit(value) { |
| | | this.$emit('selectByAnyPhonoEvent', value); |
| | | }, |
| | | // å¾çåç±» |
| | | getGroupImgs() { |
| | | mediafileApi.getRoutineByStGuid(this.subtask.stGuid).then((res) => { |
| | |
| | | this.typesList = typeList; |
| | | this.typesMap = typeMap; |
| | | }); |
| | | }, |
| | | // åå§ååå¼å§éä¸çæ ç¾ |
| | | initSelectedTab() { |
| | | if (this.typeList.length > 0) { |
| | | this.activeId = this.typeList[0].businesstypeid; |
| | | } |
| | | }, |
| | | getAllImgList() { |
| | | // for(var k of this.typeImgMap.keys()) { |
| | | // this.typeImgMap.set(k, []) |
| | | // } |
| | | this.typeImgMap.clear(); |
| | | this.typeList = []; |
| | | |
| | | const imgMap = new Map(); |
| | | const _typeList = []; |
| | | mediafileApi.getRoutineByStGuid(this.subtask.stGuid).then((res) => { |
| | | this.isEmpty = false; |
| | | let data = res.data; |
| | | if (data.length == 0) { |
| | | this.isEmpty = true; |
| | | } |
| | | for (const e of data) { |
| | | let list; |
| | | let businesstypeid = e.businesstypeid; |
| | | let businesstype = e.businesstype; |
| | | let hasThisType = false; |
| | | imgMap.forEach((v, k, m) => { |
| | | if (k == businesstypeid) { |
| | | hasThisType = true; |
| | | var isAlreadyHas = false; |
| | | if (v != undefined && v != null) { |
| | | for (let index = 0; index < v.length; index++) { |
| | | const element = v[index]; |
| | | if (element.guid == e.guid) { |
| | | isAlreadyHas = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (!isAlreadyHas) { |
| | | v.push(e); |
| | | } |
| | | } |
| | | }); |
| | | if (!hasThisType) { |
| | | imgMap.set(businesstypeid, Array.of(e)); |
| | | _typeList.push(e); |
| | | } |
| | | this.imgUrlList.push(e); |
| | | // TODO imgUrlå
¨å±é
ç½® |
| | | e.url = $fysp.imgUrl + e.extension1 + e.guid + '.jpg'; |
| | | e.isSelect = false; |
| | | } |
| | | this.typeImgMap = imgMap; |
| | | this.typeList = _typeList; |
| | | this.initSelectedTab(); |
| | | }); |
| | | }, |
| | | getInitImgList() { |
| | | mediafileApi.getRoutineByStGuid(this.subtask.stGuid).then((res) => { |
| | | let data = res.data; |
| | | for (const e of data) { |
| | | let list; |
| | | let businesstypeid = e.businesstypeid; |
| | | let businesstype = e.businesstype; |
| | | let hasThisType = false; |
| | | this.typeImgMap.forEach((v, k, m) => { |
| | | if (k == businesstypeid) { |
| | | hasThisType = true; |
| | | if (v.length < 3) { |
| | | v.push(e); |
| | | } |
| | | } |
| | | }); |
| | | if (!hasThisType) { |
| | | this.typeImgMap.set(businesstypeid, Array.of(e)); |
| | | this.typeList.push(e); |
| | | } |
| | | this.imgUrlList.push(e); |
| | | // TODO imgUrlå
¨å±é
ç½® |
| | | e.url = $fysp.imgUrl + e.extension1 + e.guid + '.jpg'; |
| | | // e.url = "http://47.100.191.150:9005/images/" + e.extension1 + e.guid + '.jpg' |
| | | e.isSelect = false; |
| | | } |
| | | if (this.typeList.length > 0) { |
| | | this.activeId = this.typeList[0].businesstypeid; |
| | | } |
| | | }); |
| | | }, |
| | | onSelect(img, i) { |
| | | if (this.readonly) { |
| | | return; |
| | | } |
| | | const index = this.selectedImgUrlList.indexOf(img); |
| | | if (index == -1) { |
| | | if (this.maxSelect == 1) { |
| | | img.isSelect = true; |
| | | this.selectedImgUrlList.push(img); |
| | | if (this.selectedImgUrlList.length > 1) { |
| | | this.selectedImgUrlList.splice(0, 1).forEach((e) => { |
| | | e.isSelect = false; |
| | | }); |
| | | } |
| | | } else if (this.maxSelect > 1) { |
| | | if (this.selectedImgUrlList.length < this.maxSelect) { |
| | | img.isSelect = true; |
| | | this.selectedImgUrlList.push(img); |
| | | } |
| | | } |
| | | } else { |
| | | this.selectedImgUrlList.splice(index, 1); |
| | | img.isSelect = false; |
| | | } |
| | | |
| | | // img.isSelect = !img.isSelect; |
| | | }, |
| | | sendSelectedImg(isOk) { |
| | | let result = []; |
| | | if (!isOk) { |
| | | this.$emit('selectByAnyPhonoEvent', result); |
| | | } else { |
| | | for (const item of this.imgUrlList) { |
| | | if (item.isSelect == true) { |
| | | result.push(item); |
| | | } |
| | | } |
| | | this.isClose = true; |
| | | this.$emit('selectByAnyPhonoEvent', result); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .center { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | } |
| | | .text { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .main { |
| | | margin: 0 auto; /* 使ç¶å
ç´ å±
ä¸ */ |
| | | height: 100%; |
| | | width: 100%; |
| | | } |
| | | |
| | | .btns { |
| | | /* height: 10%; */ |
| | | } |
| | | /* |
| | | .img_types { |
| | | margin: 0 auto; |
| | | height: 440px; |
| | | width: 900px; |
| | | flex-grow: 1; |
| | | overflow-y: hidden ; |
| | | padding: 3%; |
| | | flex-wrap: wrap; |
| | | overflow: hidden; |
| | | } */ |
| | | |
| | | .imgs { |
| | | height: 50vh; |
| | | width: 90%; |
| | | min-height: 100px !important; |
| | | /* border-style:solid; |
| | | border-radius: 1px; */ |
| | | /* height: 100%; */ |
| | | flex-grow: 1 !important; |
| | | overflow-y: auto !important; |
| | | /* å
容çå
è¾¹è· */ |
| | | display: flex !important; |
| | | flex-wrap: wrap !important; |
| | | /* overflow: hidden; */ |
| | | } |
| | | |
| | | .image { |
| | | margin: 5px; |
| | | height: 210px; |
| | | width: 200px; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .active { |
| | | padding: 5px; |
| | | width: 20%; |
| | | height: 200px; |
| | | border: 0.5rem outset rgb(52, 155, 4); |
| | | } |
| | | |
| | | .selected { |
| | | margin: 3px; |
| | | color: #4abe84; |
| | | box-shadow: 0 2px 7px 0 rgba(85, 110, 97, 0.35); |
| | | border: 2px solid rgba(74, 190, 132, 1); |
| | | } |
| | | |
| | | .selected:before { |
| | | content: ''; |
| | | position: absolute; |
| | | right: 0; |
| | | bottom: 0; |
| | | border: 17px solid #4abe84; |
| | | border-top-color: transparent; |
| | | border-left-color: transparent; |
| | | } |
| | | |
| | | .selected:after { |
| | | content: ''; |
| | | width: 5px; |
| | | height: 12px; |
| | | position: absolute; |
| | | right: 6px; |
| | | bottom: 6px; |
| | | border: 2px solid #fff; |
| | | border-top-color: transparent; |
| | | border-left-color: transparent; |
| | | transform: rotate(45deg); |
| | | } |
| | | |
| | | .noActive { |
| | | /* padding: 5px; */ |
| | | } |
| | | |
| | | .blurry { |
| | | filter: blur(3px); |
| | | } |
| | | .filters { |
| | | display: flex; |
| | | padding: 5px; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | height: 60vh; |
| | | padding: 10px calc(var(--el-dialog-padding-primary) + 10px) !important; |
| | | } |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | <div class="t-card_item"> |
| | | æ´æ¹å¾ç |
| | | <div> |
| | | <!-- <el-button @click="chosePicFromAnyPic">ä»ä»»æå¾çéå</el-button> --> |
| | | <!-- <el-button type="primary" @click="chosePicFromLedgerPic">ä»å°è´¦éå</el-button> --> |
| | | <el-button @click="choseChangePic">仿件夹éå</el-button> |
| | | <el-button @click="choseChangePic" :disabled="fileList.length >= 3">仿件夹éå</el-button> |
| | | </div> |
| | | </div> |
| | | <el-upload |
| | |
| | | :disabled="readonly" |
| | | accept="image/*" |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | id="uploadBtnId" |
| | | style="display: none" |
| | | ></el-button> |
| | | <el-icon> |
| | | <Plus /> |
| | | </el-icon> |
| | | <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="3" |
| | | :max-select="maxSelectImgCount - fileList.length" |
| | | v-if="anyPhotoDialog" |
| | | v-model:dialog-visible="anyPhotoDialog" |
| | | @selectByAnyPhonoEvent="handleSelectedAnyPhono" |
| | | @submit="handleSelectedAnyPhono" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="arbitraryPhotoRef" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // å¾çéæ©æå¤§æ°é |
| | | maxSelectImgCount: 3, |
| | | previewDialogImageUrl: '', |
| | | previewDialogVisible: false, |
| | | fileList: [], |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | ::v-deep .el-upload--picture-card { |
| | | border: 0 !important; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <FYImageSelectDialog |
| | | title="设å¤å¾ç" |
| | | :typeList="typeList" |
| | | :typeImgMap="typeImgMap" |
| | | :maxSelect="1" |
| | | ></FYImageSelectDialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref, watch, computed } from 'vue'; |
| | | |
| | | import { ref, computed, onMounted } from 'vue'; |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { $fysp } from '@/api/index.js'; |
| | | const props = defineProps({ |
| | | // å±ç¤ºæ¨¡å¼ |
| | | mode: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | pics: Array |
| | | subtask: { |
| | | type: Array, |
| | | default: () => [] |
| | | } |
| | | }); |
| | | // typeList: [ |
| | | // { id: 0, label: 'çæ§è®¾å¤' }, |
| | | // { id: 1, label: 'æ²»ç设å¤' }, |
| | | // { id: 2, label: 'ç产设å¤' } |
| | | // ], |
| | | const typeList = computed(() => { |
| | | if (props.mode == 0) { |
| | | return [{ typeId: 0, typeName: 'çæ§è®¾å¤' }]; |
| | | return [ |
| | | { typeId: 0, typeName: 'çæ§è®¾å¤' }, |
| | | { typeId: 1, typeName: 'æ²»ç设å¤' }, |
| | | { typeId: 2, typeName: 'ç产设å¤' } |
| | | ]; |
| | | } else if (props.mode == 1) { |
| | | return [{ typeId: 1, typeName: 'æ´æ¹' }]; |
| | | } else { |
| | |
| | | } |
| | | }); |
| | | const typeImgMap = ref(new Map()); |
| | | // æ åå屿§å |
| | | function 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; |
| | | } |
| | | // ä¿åç¶æä¿¡æ¯ |
| | | function saveStatus(device, status) { |
| | | var _picUrl = $fysp.imgUrl + status.dlPicUrl; |
| | | device.url = _picUrl; |
| | | } |
| | | function getDeviceImgList() { |
| | | let deviceImgMap = typeImgMap.value; |
| | | for (const deviceTopTypeElement of typeList.value) { |
| | | const topTypeId = deviceTopTypeElement.typeId; |
| | | deviceImgMap.set(topTypeId, []); |
| | | deviceApi.fetchDevices(props.subtask.sceneId, topTypeId).then((result) => { |
| | | // æ åå屿§å |
| | | for (let i = 0; i < result.data.length; i++) { |
| | | var element = convertKeys(result.data[i]); |
| | | // è·å设å¤ç¶æä¿¡æ¯ |
| | | let data = { |
| | | deviceId: element.id, |
| | | sceneId: element.sceneGuid, |
| | | deviceTypeId: topTypeId |
| | | }; |
| | | deviceApi.fetchDeviceStatus(data).then((status) => { |
| | | var statusData = status.data; |
| | | if (statusData) { |
| | | if (statusData.length == 0) { |
| | | return; |
| | | } |
| | | element = convertKeys(result.data[i]); |
| | | for (let j = 0; j < statusData.length; j++) { |
| | | // å¤å¶åºä¸ä¸ªè®¾å¤å¯¹è±¡ |
| | | var newDevice = useCloned(element).cloned.value; |
| | | const statusItem = statusData[j]; |
| | | // 设å¤å¯¹è±¡æ·»å ä¸ä¸ªå±æ§åè¡¨å±æ§ç¨æ¥ä¿å设å¤ç¶æ |
| | | saveStatus(newDevice, statusItem); |
| | | newDevice.dlLocation = statusItem.dlLocation; |
| | | newDevice.topTypeId = topTypeId; |
| | | |
| | | watch( |
| | | () => props.pics, |
| | | (nV, oV) => { |
| | | nV.forEach(e => { |
| | | if (!typeImgMap.value.has(e.topTypeId)) { |
| | | typeImgMap.value.set(e.topTypeId, []) |
| | | deviceImgMap.get(topTypeId).push(newDevice); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | typeImgMap.value.get(r.topTypeId).push({}) |
| | | }); |
| | | typeImgMap.value.set( |
| | | 1, |
| | | nV.map((v) => { |
| | | return { url: v }; |
| | | }) |
| | | ); |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | </script> |
| | | } |
| | | } |
| | | onMounted(() => { |
| | | getDeviceImgList(); |
| | | }); |
| | | </script> |
| | |
| | | > |
| | | <div style=""> |
| | | <el-descriptions style="" :column="3" size="small" border> |
| | | <el-descriptions-item width="64px" label="ç«ç¹åç§°" :span="3">{{ |
| | | <el-descriptions-item width="64px" :label="currSelect.topDeviceTypeId == 0 ? 'ç«ç¹åç§°' : '设å¤åç§°'" :span="3">{{ |
| | | item.name || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="ä¾åºå">{{ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <FYImageSelectDialog |
| | | title="å°è´¦å¾ç" |
| | | :typeList="typeList" |
| | | :typeImgMap="typeImgMap" |
| | | ></FYImageSelectDialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref, computed, onMounted } from 'vue'; |
| | | import problemApiFytz from '@/api/fytz/problemApi.js'; |
| | | import userApi from '@/api/fysp/userApi.js'; |
| | | import { svToTz } from '@/enum/scene'; |
| | | import { $fytz } from '@/api/index'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | const props = defineProps({ |
| | | // å±ç¤ºæ¨¡å¼ |
| | | mode: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | subtask: { |
| | | type: Array, |
| | | default: () => [] |
| | | } |
| | | }); |
| | | const typeList = ref([]); |
| | | const typeImgMap = ref(new Map()); |
| | | function getList() { |
| | | userApi.getTzId(props.subtask.sceneId).then((res) => { |
| | | let tzUserId = res.tzUserId; |
| | | |
| | | problemApiFytz |
| | | .getLedgerPic({ |
| | | tzUserId: tzUserId, |
| | | sceneType: svToTz(props.subtask.sceneTypeId).value, |
| | | time: getMonth() |
| | | }) |
| | | .then((res) => { |
| | | let data = res; |
| | | if (data && data.length > 0) { |
| | | data.forEach((item) => { |
| | | let type; |
| | | let typeIndex = typeList.value |
| | | .map((typeItem) => typeItem.typeName) |
| | | .indexOf(item.ledgerType); |
| | | if (typeIndex != -1) { |
| | | type = typeList.value[typeIndex]; |
| | | } |
| | | if ( |
| | | typeList.value |
| | | .map((typeItem) => typeItem.typeName) |
| | | .indexOf(item.ledgerType) == -1 |
| | | ) { |
| | | type = { |
| | | typeId: typeList.value.length, |
| | | typeName: item.ledgerType |
| | | }; |
| | | typeList.value.push(type); |
| | | typeImgMap.value.set(type.typeId, []); |
| | | } |
| | | item.url = $fytz.imgUrl + item.path1; |
| | | typeImgMap.value.get(type.typeId).push(item); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | function getMonth() { |
| | | // 使ç¨Dateå¯¹è±¡è§£ææ¥æå符串 |
| | | var date = new Date(props.subtask.subtask.planstarttime); |
| | | // è·åæä»½ä¿¡æ¯ï¼æä»½æ¯ä»0å¼å§çï¼æä»¥éè¦å 1 |
| | | let month = date.getMonth() + 1; |
| | | if (String(month).length == 1) { |
| | | month = `0${month}`; |
| | | } |
| | | var year = date.getFullYear(); |
| | | return `${year}-${month}`; |
| | | } |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | |
| | | <script> |
| | | import problemApiFytz from '@/api/fytz/problemApi.js'; |
| | | import userApi from '@/api/fysp/userApi.js'; |
| | | import mediafileApi from '@/api/fysp/mediafileApi.js'; |
| | | import { svToTz } from '@/enum/scene'; |
| | | import { $fytz } from '@/api/index'; |
| | | import { useCloned } from '@vueuse/core'; |
| | |
| | | } |
| | | }); |
| | | // é¢å¤å¤ç |
| | | this.curProList.sort((o1, o2) => o2.getTime() - o1.getTime()); |
| | | this.curProList.sort((o1, o2) => o2.getDate() - o1.getDate()); |
| | | this.loading = false; |
| | | }, |
| | | // æ ¹æ®åä»»å¡è·åéé¢çé®é¢å表 |
| | |
| | | <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" |
| | | > |
| | | <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" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="é®é¢ä½ç½®" prop="locationid"> |
| | | <el-select |
| | | v-model="deepCopyProblem.locationid" |
| | | @change="onProLocationChange" |
| | | <el-form-item label="è¡¥å
说æ" :disabled="readonly" prop="proRemark"> |
| | | <el-input |
| | | v-model="proRemark" |
| | | type="textarea" |
| | | @change="onProRemarkChange" |
| | | class="row" |
| | | placeholder="请è¾å
¥" |
| | | :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="advise"> |
| | | <el-select |
| | | v-model="deepCopyProblem.advise" |
| | | class="row" |
| | | :disabled="readonly" |
| | | @change="onProAdviseChange" |
| | | > |
| | | <el-option |
| | | v-for="item in adviseOptions" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="è¡¥å
说æ" :disabled="readonly" prop="proRemark"> |
| | | <el-form-item |
| | | v-show="deepCopyProblem.advise && deepCopyProblem.advise != ''" |
| | | label="é®é¢å»ºè®®ä¿®æ£" |
| | | prop="_adviseEdit" |
| | | :disabled="false" |
| | | > |
| | | <el-input |
| | | v-model="proRemark" |
| | | v-model="deepCopyProblem._adviseEdit" |
| | | type="textarea" |
| | | @change="onProRemarkChange" |
| | | @change="onProAdviseEditChange" |
| | | class="row" |
| | | placeholder="请è¾å
¥" |
| | | placeholder="请è¾å
¥é®é¢å»ºè®®ä¿®æ£" |
| | | :disabled="readonly" |
| | | /> |
| | | </el-form-item> |
| | | <div class="t-card_item"> |
| | | é®é¢å¾ç |
| | | <div> |
| | | <el-button @click="chosePicFromAnyPic" v-show="!readonly" |
| | | <el-button |
| | | @click="chosePicFromAnyPic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >ä»åºæ¯å¾çéå</el-button |
| | | > |
| | | <el-button @click="chosePicFromDevicePic" v-show="!readonly" |
| | | <el-button |
| | | @click="chosePicFromDevicePic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >ä»è®¾å¤å¾çéå</el-button |
| | | > |
| | | <el-button @click="chosePicFromLedgerPic" v-show="!readonly" |
| | | <el-button |
| | | @click="chosePicFromLedgerPic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >ä»å°è´¦éå</el-button |
| | | > |
| | | <el-button @click="choseChangePic" v-show="!readonly" |
| | | <el-button |
| | | @click="choseChangePic" |
| | | v-show="!readonly" |
| | | :disabled="fileList.length >= 3" |
| | | >仿件夹éå</el-button |
| | | > |
| | | </div> |
| | |
| | | :disabled="readonly" |
| | | accept="image/*" |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | id="uploadBtnId" |
| | | style="display: none" |
| | | ></el-button> |
| | | <el-icon v-show="fileList.length != 3"> |
| | | <Plus /> |
| | | </el-icon> |
| | | <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-form> |
| | | |
| | | <ArbitraryPhoto |
| | | :max-select="3" |
| | | :max-select="maxSelectImgCount - fileList.length" |
| | | v-if="anyPhotoDialog" |
| | | v-model:dialog-visible="anyPhotoDialog" |
| | | @selectByAnyPhonoEvent="handleSelectedAnyPhono" |
| | | @submit="handleSelectedAnyPhono" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="arbitraryPhotoRef" |
| | | > |
| | | </ArbitraryPhoto> |
| | | <el-dialog |
| | | title="å°è´¦å¾ç" |
| | | width="80%" |
| | | v-model="ledgerPicDialog" |
| | | :before-close="beforeLedgerPicDialogclose" |
| | | class="dialog_style" |
| | | <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" |
| | | > |
| | | <LedgerPic |
| | | v-if="ledgerPicDialog" |
| | | @selectByLedgerPicEvent="handleLedgerPicPhono" |
| | | :month="month" |
| | | :subtask="subtask" |
| | | :defaultFile="fileList" |
| | | ref="ledgerPicRef" |
| | | > |
| | | </LedgerPic> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="设å¤å¾ç" |
| | | width="80%" |
| | | v-model="deiveceImgDialog" |
| | | :before-close="beforeDeiveceImgDialogclose" |
| | | class="dialog_style" |
| | | > |
| | | <CompDevicePhono |
| | | v-if="deiveceImgDialog" |
| | | @selectPhonoEvent="handleSelectedDevicePhono" |
| | | :imgPathsDataSource="deviceImgObjList" |
| | | :defaultFile="fileList" |
| | | ref="deiveceImgDialogRef" |
| | | > |
| | | </CompDevicePhono> |
| | | </el-dialog> |
| | | </CompDevicePhoto> |
| | | |
| | | <el-dialog v-model="previewDialogVisible"> |
| | | <img w-full :src="previewDialogImageUrl" alt="é¢è§" class="preview-pic" /> |
| | | </el-dialog> |
| | |
| | | <script> |
| | | import ArbitraryPhoto from './ArbitraryPhoto.vue'; |
| | | import LedgerPic from './CompLedgerPic.vue'; |
| | | import CompDevicePhono from './CompDevicePhono.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 { get, useCloned } from '@vueuse/core'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | export default { |
| | | components: { |
| | | ArbitraryPhoto, |
| | | LedgerPic, |
| | | CompDevicePhono |
| | | CompDevicePhoto, |
| | | CompLedgerPhoto |
| | | }, |
| | | props: { |
| | | readonly: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // å¾çéæ©æå¤§æ°é |
| | | maxSelectImgCount: 3, |
| | | previewDialogVisible: false, |
| | | previewDialogImageUrl: '', |
| | | // 设å¤å¾çå表 |
| | |
| | | this.pictureValidate(); |
| | | }, |
| | | deep: true |
| | | }, |
| | | // å½é®é¢å»ºè®®æ¹åæ¶é®é¢å»ºè®®ä¿®æ£è·çæ¹å |
| | | deepCopyProblem: { |
| | | handler(nv, ov) { |
| | | // å¾çæ ¡éª |
| | | nv._adviseEdit = ov.advise; |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }, []); |
| | | }, |
| | | adviseOptions() { |
| | | var problemGuid = this.currProTypeGuid || this.problem.guid; |
| | | var array = this.suggestions.filter( |
| | | 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; |
| | | } |
| | | }, |
| | |
| | | this.getDeviceImgList(); |
| | | }, |
| | | methods: { |
| | | onProAdviseChange(value) { |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advise; |
| | | }, |
| | | handlePictureCardPreview(uploadFile) { |
| | | this.previewDialogVisible = true; |
| | | this.previewDialogImageUrl = uploadFile.url; |
| | |
| | | this.deepCopyProblem = {}; |
| | | } else { |
| | | this.deepCopyProblem = useCloned(this.problem).cloned.value; |
| | | this.currProTypeGuid = this.problem.guid; |
| | | this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advise; |
| | | } |
| | | |
| | | this.type = 'guid' in this.deepCopyProblem ? 1 : 0; |
| | | |
| | | // è·åé®é¢ç±»å |
| | | let data = { |
| | | sceneTypeId: this.subtask.sceneTypeId, |
| | |
| | | } |
| | | }, |
| | | handleLedgerPicPhono(data) { |
| | | this.beforeLedgerPicDialogclose(); |
| | | let isExist = false; |
| | | for (const item of data) { |
| | | for (const already of this.fileList) { |
| | |
| | | onProRemarkChange(value) { |
| | | this.changeProblemname(); |
| | | }, |
| | | onProAdviseEditChange(value) {}, |
| | | onProTypeChange(value) { |
| | | this.deepCopyProblem.description = ''; |
| | | this.deepCopyProblem.advise = ''; |
| | | // é»è®¤é®é¢æè¿°åé®é¢å»ºè®®ä¸ºç¬¬ä¸ä¸ª |
| | | 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; |
| | | }, |
| | | findProByProDesName(name) { |
| | | let result; |
| | |
| | | } |
| | | }, |
| | | handleSelectedDevicePhono(data) { |
| | | this.beforeDeiveceImgDialogclose(); |
| | | let isExist = false; |
| | | for (const item of data) { |
| | | for (const already of this.fileList) { |
| | | if (item._picUrl == already.url) { |
| | | if (item.url == already.url) { |
| | | isExist = true; |
| | | } |
| | | } |
| | | if (!isExist) { |
| | | this.fileList.push({ |
| | | url: item._picUrl, |
| | | url: item.url, |
| | | name: '1' |
| | | }); |
| | | } |
| | |
| | | <template> |
| | | <el-card class="layout" shadow="hover"> |
| | | <el-steps :active="proStatus.index" finish-status="success" style="" align-center> |
| | | <el-steps |
| | | :active="proStatus.index" |
| | | finish-status="success" |
| | | style="" |
| | | align-center |
| | | > |
| | | <el-step v-for="(s, i) in getSteps" :key="i" :title="s" /> |
| | | </el-steps> |
| | | |
| | |
| | | </el-descriptions> |
| | | |
| | | <el-scrollbar> |
| | | <el-descriptions title=" " :column="2" direction="vertical" size="small" border> |
| | | <el-descriptions |
| | | title=" " |
| | | :column="2" |
| | | direction="vertical" |
| | | size="small" |
| | | border |
| | | > |
| | | <template v-for="(pic, t) in pics" :key="t"> |
| | | <template v-if="pic.path.length > 0"> |
| | | <el-descriptions-item |
| | | :label="pic.title" |
| | | :label-class-name="t == 0 ? 'descriptions-label-1' : 'descriptions-label-2'" |
| | | :label-class-name=" |
| | | t == 0 ? 'descriptions-label-1' : 'descriptions-label-2' |
| | | " |
| | | > |
| | | <el-space> |
| | | <el-image |
| | |
| | | <el-row v-if="true" style="margin-top: 16px"> |
| | | <el-col :span="12"> |
| | | <el-row justify="start" class="btn-group"> |
| | | <el-button type="success" size="small" @click="updatePro" plain>é®é¢æ´æ£</el-button> |
| | | <el-button type="primary" size="small" @click="updateChange" plain>æ´æ¹æ£éª</el-button> |
| | | <el-button type="info" size="small" @click="currProRecent" plain>é®é¢å¤ç°</el-button> |
| | | <el-button type="success" size="small" @click="updatePro" plain |
| | | >é®é¢æ´æ£</el-button |
| | | > |
| | | <el-button type="primary" size="small" @click="updateChange" plain |
| | | >æ´æ¹æ£éª</el-button |
| | | > |
| | | <el-button type="info" size="small" @click="currProRecent" plain |
| | | >é®é¢å¤ç°</el-button |
| | | > |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-row justify="end" class="btn-group"> |
| | | <el-button type="danger" size="small" @click="deletePro" :disabled="!proStatus.deletable" |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | @click="deletePro" |
| | | :disabled="!proStatus.deletable" |
| | | >å é¤</el-button |
| | | > |
| | | <el-button type="warning" size="small" @click="rejectPro" :disabled="!proStatus.checkable" |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | @click="beforePro" |
| | | :disabled="proStatus.checkable" |
| | | >æ¤é</el-button |
| | | > |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | @click="rejectPro" |
| | | :disabled="!proStatus.checkable" |
| | | >驳å</el-button |
| | | > |
| | | <el-button type="success" size="small" @click="passPro" :disabled="!proStatus.checkable" |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | @click="passPro" |
| | | :disabled="!proStatus.checkable" |
| | | >éè¿</el-button |
| | | > |
| | | </el-row> |
| | |
| | | <div class="dialog-wrapper"> |
| | | <el-dialog |
| | | title="é®é¢æ´æ£" |
| | | width="80%" |
| | | width="50%" |
| | | v-model="proAddOrUpdDialogVisible" |
| | | :before-close="proAddOrUpdDialogClose" |
| | | > |
| | |
| | | /> |
| | | </el-dialog> |
| | | <el-dialog |
| | | width="80%" |
| | | width="50%" |
| | | title="æ´æ¹æ£éª" |
| | | v-model="changeEditDialogVisible" |
| | | :before-close="changeEditDialogClose" |
| | |
| | | </el-dialog> |
| | | <!-- é®é¢å¤ç° --> |
| | | <el-dialog |
| | | width="80%" |
| | | width="50%" |
| | | title="é®é¢å¤ç°" |
| | | v-model="proRecentDialogVisible" |
| | | :before-close="proRecentDialogClose" |
| | |
| | | }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | this.$emit('submit') |
| | | this.$emit('submit'); |
| | | } |
| | | }); |
| | | } |
| | |
| | | passPro() { |
| | | this.checkPro(true); |
| | | }, |
| | | beforePro() { |
| | | const pro = this.problem; |
| | | let status = this.proStatus; |
| | | let doneMsg; |
| | | if (status.index <= 2) { |
| | | doneMsg = 'é®é¢æªå®¡æ ¸'; |
| | | } else if (status.index <= 3) { |
| | | doneMsg = 'æ´æ¹æªå®¡æ ¸'; |
| | | } |
| | | useMessageBoxTip({ |
| | | confirmMsg: `确认æ¤åå°${doneMsg}ï¼`, |
| | | confirmTitle: 'å®¡æ ¸æ¤å', |
| | | onConfirm: () => { |
| | | const { status, action } = ProCheckProxy.proBeforeStatus( |
| | | pro.extension3 |
| | | ); |
| | | return problemApi |
| | | .checkProblem({ pId: pro.guid, action: action }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | pro.extension3 = status; |
| | | this.$emit('submit', false); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | checkPro(pass) { |
| | | const pro = this.problem; |
| | | let doneMsg = pass ? 'éè¿' : '驳å'; |
| | |
| | | confirmMsg: `确认æ¯å¦${doneMsg}该é®é¢ï¼`, |
| | | confirmTitle: 'é®é¢å®¡æ ¸', |
| | | onConfirm: () => { |
| | | const { status, action } = ProCheckProxy.proNextStatus(pro.extension3, pass); |
| | | return problemApi.checkProblem({ pId: pro.guid, action: action }).then((res) => { |
| | | if (res.success) { |
| | | pro.extension3 = status; |
| | | this.$emit('submit'); |
| | | } |
| | | }); |
| | | const { status, action } = ProCheckProxy.proNextStatus( |
| | | pro.extension3, |
| | | pass |
| | | ); |
| | | return problemApi |
| | | .checkProblem({ pId: pro.guid, action: action }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | pro.extension3 = status; |
| | | this.$emit('submit', false); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | </el-scrollbar> |
| | | </template> |
| | | </BaseContentLayout> |
| | | <el-dialog |
| | | v-model="anyPhotoDialog" |
| | | width="66%" |
| | | title="ä»»æå¾ç" |
| | | destroy-on-close |
| | | > |
| | | <ArbitraryPhoto |
| | | :max-select="1" |
| | | :readonly="false" |
| | | :subtask="curSubtask.data" |
| | | @selectByAnyPhonoEvent="handleSelectAnyPhoto" |
| | | :defaultFile="[sceneImg]" |
| | | > |
| | | </ArbitraryPhoto> |
| | | </el-dialog> |
| | | <ArbitraryPhoto |
| | | v-if="anyPhotoDialog" |
| | | v-model:dialog-visible="anyPhotoDialog" |
| | | :max-select="1" |
| | | :readonly="false" |
| | | :subtask="curSubtask.data" |
| | | @submit="handleSelectAnyPhoto" |
| | | :defaultFile="[sceneImg]" |
| | | ></ArbitraryPhoto> |
| | | <el-dialog |
| | | title="设å¤å¾ç" |
| | | width="66%" |