| | |
| | | <template #summary> |
| | | <CompSubTaskStatistic |
| | | :loading="sideLoading" |
| | | :sceneType="sceneTypeId" |
| | | :subtasks="subtasks" |
| | | :monitorObjList="curMonitorObjList" |
| | | /> |
| | |
| | | ></SideList> |
| | | </template> |
| | | <template #main> |
| | | <el-scrollbar > |
| | | <el-scrollbar> |
| | | <ToolBar |
| | | ref="toolBarRef" |
| | | class="toolbar-sticky" |
| | | :title="curSubtask.title" |
| | | :descriptions="proStatus" |
| | | :buttons="buttons" |
| | | :loading="mainLoading" |
| | | ></ToolBar> |
| | | <el-scrollbar |
| | | v-if="curProList.length > 0" |
| | | class="scrollbar-inner" |
| | | v-loading="mainLoading" |
| | | > |
| | | <div v-if="curProList.length > 0" v-loading="mainLoading"> |
| | | <CompProblemCard |
| | | :key="i" |
| | | v-for="(p, i) in curProList" |
| | |
| | | @submit="updateSubtask" |
| | | @check="handleProblemCheck" |
| | | ></CompProblemCard> |
| | | </el-scrollbar> |
| | | </div> |
| | | <el-empty v-else description="暂无问题" v-loading="mainLoading" /> |
| | | </el-scrollbar> |
| | | </template> |
| | |
| | | ref="deviceShowRef" |
| | | > |
| | | </CompDeviceShowTest> |
| | | <SceneEditDialog |
| | | v-model="sceneInfoDialog" |
| | | :sceneId="curSubtask.data ? curSubtask.data.sceneId : undefined" |
| | | ></SceneEditDialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import ArbitraryPhoto from './components/ArbitraryPhoto.vue'; |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import problemApi from '@/api/fysp/problemApi'; |
| | | import ProCheckProxy from './ProCheckProxy'; |
| | | import CompProblemAddOrUpd from './components/CompProblemAddOrUpd.vue'; |
| | | import CompProblemCard from './components/CompProblemCard.vue'; |
| | | import CompSubTaskStatistic from './components/CompSubTaskStatistic.vue'; |
| | | import CompDeviceShowTest from './components/CompDeviceShowTest.vue'; |
| | | import SceneEditDialog from '@/views/fysp/scene/SceneEditDialog.vue'; |
| | | export default { |
| | | components: { |
| | | CompProblemCard, |
| | | CompSubTaskStatistic, |
| | | CompProblemAddOrUpd, |
| | | ArbitraryPhoto, |
| | | CompDeviceShowTest |
| | | CompDeviceShowTest, |
| | | SceneEditDialog |
| | | }, |
| | | data() { |
| | | return { |
| | | // 设备图 |
| | | // 设备图对话框 |
| | | deviceShowDialog: false, |
| | | // 任意图 |
| | | // 任意图对话框 |
| | | anyPhotoDialog: false, |
| | | // 新增问题 |
| | | // 新增问题对话框 |
| | | proAddOrUpdDialogVisible: false, |
| | | // 基本信息对话框 |
| | | sceneInfoDialog: false, |
| | | //左侧菜单栏加载状态 |
| | | sideLoading: false, |
| | | //右侧内容栏加载状态 |
| | | mainLoading: false, |
| | | // 总任务 |
| | | topTask: {}, |
| | | // 场景类型id |
| | | sceneTypeId: undefined, |
| | | // 总任务巡查计划清单 |
| | | curMonitorObjList: [], |
| | | //子任务列表 |
| | |
| | | curProList: [], |
| | | //操作按钮 |
| | | buttons: [ |
| | | { |
| | | name: '场景信息', |
| | | color: 'success', |
| | | // color: 'primary', |
| | | click: () => { |
| | | this.sceneInfoDialog = true; |
| | | } |
| | | }, |
| | | { |
| | | name: '新增问题', |
| | | // color: 'success', |
| | |
| | | this.mainLoading = true; |
| | | this.curProList = []; |
| | | this.curSubtask = {}; |
| | | this.sceneTypeId = formSearch.sceneTypeId; |
| | | const param = { |
| | | topTaskId: formSearch.topTask.tguid, |
| | | sceneTypeId: formSearch.sceneTypeId |
| | |
| | | this.sideLoading = false; |
| | | this.mainLoading = true; |
| | | // const controller = new AbortController(); |
| | | taskApi |
| | | problemApi |
| | | .getProBySubtask(s.data.stGuid) |
| | | .then((res) => { |
| | | this.curProList = res; |
| | |
| | | this.sideLoading = false; |
| | | setTimeout(() => { |
| | | this.mainLoading = true; |
| | | taskApi |
| | | problemApi |
| | | .getProBySubtask(this.curSubtask.data.stGuid) |
| | | .then((res) => { |
| | | if (refresh) { |
| | |
| | | .scrollbar-inner { |
| | | height: calc(100vh - 60px * 2 - 20px * 2 - var(--height-toolbar)); |
| | | } |
| | | |
| | | .toolbar-sticky { |
| | | position: sticky; |
| | | z-index: 2; |
| | | top: 0; |
| | | } |
| | | </style> |