1. 初步完成评估任务整体逻辑;
2. 新增评估记录下载功能(待完善)
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { $fysp } from '../index'; |
| | | |
| | | export default { |
| | | downloadFile(url) { |
| | | return $fysp.get(`files/${url}`); |
| | | } |
| | | }; |
| | |
| | | import { Base64 } from 'js-base64'; |
| | | import { $fysp } from '../index'; |
| | | |
| | | export default { |
| | |
| | | */ |
| | | fetchEvaluationRule(param) { |
| | | return $fysp.post(`evaluationrule/find`, param).then((res) => res.data); |
| | | } |
| | | }, |
| | | |
| | | autoEvaluate(param) { |
| | | return $fysp.post(`evaluation/auto`, param).then((res) => res.data); |
| | | }, |
| | | |
| | | downloadAutoEvaluation(param) { |
| | | return $fysp |
| | | .post(`evaluation/auto/record/download`, param, { responseType: 'blob' }) |
| | | .then((res) => { |
| | | // return res.data; |
| | | const name = Base64.decode(res.headers.get('filename')); |
| | | const url = window.URL.createObjectURL(res.data); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.setAttribute('download', name); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(url); |
| | | }); |
| | | }, |
| | | }; |
| | |
| | | let ip2_file = 'https://fyami.com.cn/'; |
| | | |
| | | if (debug) { |
| | | ip1 = 'http://192.168.0.138:8082/'; |
| | | ip1 = 'http://192.168.1.9:8082/'; |
| | | // ip1_file = 'http://47.100.191.150:9005/'; |
| | | ip2 = 'http://192.168.0.138:8080/'; |
| | | ip2 = 'http://192.168.1.9:8080/'; |
| | | // ip2_file = 'https://fyami.com.cn/'; |
| | | } |
| | | |
| | |
| | | ElAside: typeof import('element-plus/es')['ElAside'] |
| | | ElAvatar: typeof import('element-plus/es')['ElAvatar'] |
| | | ElBacktop: typeof import('element-plus/es')['ElBacktop'] |
| | | ElBadge: typeof import('element-plus/es')['ElBadge'] |
| | | ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] |
| | | ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] |
| | | ElButton: typeof import('element-plus/es')['ElButton'] |
| | |
| | | Footer: typeof import('./components/core/Footer.vue')['default'] |
| | | FormCol: typeof import('./components/layout/FormCol.vue')['default'] |
| | | FYBgTaskCard: typeof import('./components/bg-task/FYBgTaskCard.vue')['default'] |
| | | FYBgTaskDialog: typeof import('./components/bg-task/FYBgTaskDialog.vue')['default'] |
| | | FYBgTaskItem: typeof import('./components/bg-task/FYBgTaskItem.vue')['default'] |
| | | FYForm: typeof import('./components/form/FYForm.vue')['default'] |
| | | FYOptionLocation: typeof import('./components/search-option/FYOptionLocation.vue')['default'] |
| | | FYOptionOnlineStatus: typeof import('./components/search-option/FYOptionOnlineStatus.vue')['default'] |
| | |
| | | <template> |
| | | <el-card class="m-b-8" shadow="always" :body-style="{ padding: '8px' }"> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | <div class="status-btn"> |
| | | <el-icon v-if="waiting" color="var(--el-color-info)" :size="50"><VideoPlay /></el-icon> |
| | | <el-icon v-else-if="running" color="var(--el-color-primary)" :size="50" class="is-loading" |
| | | ><Loading |
| | | /></el-icon> |
| | | <el-icon v-else-if="success" color="var(--el-color-success)" :size="50" |
| | | ><CircleCheck |
| | | /></el-icon> |
| | | <el-icon v-else-if="fail" color="var(--el-color-error)" :size="50" |
| | | ><CircleClose |
| | | /></el-icon> |
| | | <el-icon v-else color="var(--el-color-warning)" :size="50"><Warning /></el-icon> |
| | | <el-text type="info" size="small" style="position: absolute; bottom: 0">{{ |
| | | nameToLabel(model.status) |
| | | }}</el-text> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="20" class="p-l-8"> |
| | | <el-card shadow="never" :body-style="{ padding: 0 }"> |
| | | <template #header> |
| | | <el-row justify="space-between"> |
| | | <el-text class="m-l-4px w-300px" tag="b" size="large" truncated>{{ model.name }}</el-text> |
| | | <el-tag>{{ nameToLabel(model.type) }}</el-tag> |
| | | </el-row> |
| | | <el-row class="p-v-8" align="bottom"> |
| | | <el-col :span="12"> |
| | | <span class="timer">{{ time }}</span> |
| | | <el-text type="info" size="small" tag="div">è¿è¡æ¶é¿</el-text> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-text type="default" size="default" tag="div" |
| | | >å¼å§ï¼{{ $fm.formatYMDH(model.startTime) }}</el-text |
| | | > |
| | | <el-text type="default" size="default" tag="div" |
| | | >ç»æï¼{{ $fm.formatYMDH(model.endTime) }}</el-text |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | <el-row justify="end" align="bottom"> |
| | | <!-- <span class="f-s color-i">IDï¼{{ model.id }}</span> --> |
| | | <el-row> |
| | | <FYReconfrimButton v-if="waiting" @confirm="startTask" v-model="startConfirm"> |
| | | <div> |
| | | <div><el-text tag="b" size="large">åå°ä»»å¡</el-text></div> |
| | | <el-text size="small" type="info">æ¾ç¤ºå½åæ£å¨è¿è¡çåå°èæ¶ä»»å¡ç¶æ</el-text> |
| | | </div> |
| | | <el-button |
| | | plain |
| | | icon="VideoPlay" |
| | | icon="Refresh" |
| | | type="primary" |
| | | size="small" |
| | | :loading="false" |
| | | @click="startConfirm = true" |
| | | >å¼å§ä»»å¡</el-button |
| | | size="default" |
| | | :loading="loading" |
| | | @click="fetchTask" |
| | | >å·æ°ä»»å¡</el-button |
| | | > |
| | | </FYReconfrimButton> |
| | | <FYReconfrimButton v-if="running" @confirm="stopTask" v-model="stopConfirm"> |
| | | <el-button |
| | | icon="VideoPause" |
| | | plain |
| | | type="danger" |
| | | size="small" |
| | | :loading="false" |
| | | @click="stopConfirm = true" |
| | | >强å¶ç»æ</el-button |
| | | </el-row> |
| | | <!-- <el-row> |
| | | <el-button type="default" size="default" @click="newTestTask">æ°å¢æµè¯ä»»å¡</el-button> |
| | | <el-button type="default" size="default" @click="startNewTestTask" |
| | | >æ°å»ºå¹¶è¿è¡ä¸ä¸ªæµè¯ä»»å¡</el-button |
| | | > |
| | | </FYReconfrimButton> |
| | | <FYReconfrimButton v-if="!running" @confirm="removeTask" v-model="removeConfirm"> |
| | | <el-button |
| | | icon="Delete" |
| | | plain |
| | | type="danger" |
| | | size="small" |
| | | :loading="false" |
| | | @click="removeConfirm = true" |
| | | >ç§»é¤ä»»å¡</el-button |
| | | <el-button type="default" size="default" @click="shutDownTask" |
| | | >强å¶å
³éæææµè¯ä»»å¡</el-button |
| | | > |
| | | </FYReconfrimButton> |
| | | <el-button |
| | | v-if="success" |
| | | plain |
| | | type="success" |
| | | size="small" |
| | | :loading="false" |
| | | @click="gotoResult" |
| | | >æ¥çç»æ<el-icon class="m-l-4"><Right /></el-icon |
| | | ></el-button> |
| | | </el-row> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row> --> |
| | | </template> |
| | | <el-scrollbar height="70vh" class="scrollbar"> |
| | | <template v-for="(v, i) in taskList" :key="i"> |
| | | <FYBgTaskItem |
| | | :model="v" |
| | | :index="i" |
| | | @start="startTask" |
| | | @shutDown="shutDownTask" |
| | | @remove="removeTask" |
| | | @gotoResult="gotoResult" |
| | | ></FYBgTaskItem> |
| | | </template> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | </template> |
| | | <script> |
| | | import { nTlBgTask, BG_TASK_STATUS } from '@/enum/bgTask'; |
| | | import { useTimer } from '@/composables/timer'; |
| | | // import { useTimer } from '@/composables/timer2'; |
| | | /** |
| | | * èªå¨è¯ä¼°ä»»å¡ç®¡ç |
| | | */ |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import bgtaskApi from '@/api/fysp/bgtaskApi'; |
| | | import { enumBgTask, BG_TASK_TYPE, BG_TASK_STATUS } from '@/enum/bgTask'; |
| | | |
| | | export default { |
| | | setup() { |
| | | const { time, startTimer, pauseTimer, stopTimer, count } = useTimer(); |
| | | return { time, startTimer, pauseTimer, stopTimer, count }; |
| | | const { loading, fetchData } = useFetchData(); |
| | | return { loading, fetchData }; |
| | | }, |
| | | props: { |
| | | model: Object, |
| | | index: Number |
| | | modelValue: Number |
| | | }, |
| | | emits: ['start', 'shutDown', 'remove', 'gotoResult'], |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | startConfirm: false, |
| | | stopConfirm: false, |
| | | removeConfirm: false |
| | | taskList: [], |
| | | taskIndex: 0 |
| | | }; |
| | | }, |
| | | watch: { |
| | | 'model.status': { |
| | | taskList: { |
| | | handler(nV) { |
| | | switch (nV) { |
| | | case BG_TASK_STATUS.WAITING.name: |
| | | this.stopTimer(); |
| | | break; |
| | | case BG_TASK_STATUS.RUNNING.name: |
| | | this.startTimer(); |
| | | break; |
| | | case BG_TASK_STATUS.SUCCESS.name: |
| | | case BG_TASK_STATUS.FAIL.name: |
| | | case BG_TASK_STATUS.SHUTDOWN.name: |
| | | this.pauseTimer(); |
| | | break; |
| | | default: |
| | | this.stopTimer(); |
| | | break; |
| | | let count = 0; |
| | | for (const e of nV) { |
| | | if (e.status == BG_TASK_STATUS.RUNNING.name) { |
| | | count++; |
| | | } |
| | | this.count = this.model.runTime |
| | | }, |
| | | immediate: true |
| | | } |
| | | this.$emit('update:modelValue', count); |
| | | }, |
| | | computed: { |
| | | waiting() { |
| | | return this.model.status == BG_TASK_STATUS.WAITING.name; |
| | | }, |
| | | running() { |
| | | return this.model.status == BG_TASK_STATUS.RUNNING.name; |
| | | }, |
| | | success() { |
| | | return this.model.status == BG_TASK_STATUS.SUCCESS.name; |
| | | }, |
| | | fail() { |
| | | return this.model.status == BG_TASK_STATUS.FAIL.name; |
| | | }, |
| | | shutdown() { |
| | | return this.model.status == BG_TASK_STATUS.SHUTDOWN.name; |
| | | deep: true |
| | | } |
| | | }, |
| | | methods: { |
| | | nameToLabel(name) { |
| | | const t = nTlBgTask(name); |
| | | return t.label; |
| | | }, |
| | | startTask() { |
| | | this.$emit('start', this.index, (res) => { |
| | | if (res) { |
| | | this.startTimer(); |
| | | } |
| | | addTask() {}, |
| | | newTestTask() { |
| | | this.fetchData((page, pageSize) => { |
| | | return bgtaskApi.newTestTask(`Test-Task-${++this.taskIndex}`).then((res) => { |
| | | this.taskList.push(res.data); |
| | | }); |
| | | }); |
| | | }, |
| | | stopTask() { |
| | | this.$emit('shutDown', this.index, (res) => { |
| | | if (res) { |
| | | this.stopTimer(); |
| | | } |
| | | startNewTestTask() { |
| | | this.fetchData((page, pageSize) => { |
| | | return bgtaskApi.startNewTestTask(`Test-Task-${++this.taskIndex}`).then((res) => { |
| | | this.taskList.push(res.data); |
| | | }); |
| | | }); |
| | | }, |
| | | removeTask() { |
| | | this.$emit('remove', this.index, (res) => { |
| | | if (res) { |
| | | // this.stopTimer(); |
| | | } |
| | | |
| | | _getParam(taskStatus) { |
| | | return { |
| | | type: taskStatus.type, |
| | | id: taskStatus.id |
| | | }; |
| | | }, |
| | | fetchTask() { |
| | | this.fetchData((page, pageSize) => { |
| | | return bgtaskApi |
| | | .fetchTaskStatus({ |
| | | // type: BG_TASK_TYPE.AUTO_SCORE.name |
| | | }) |
| | | .then((res) => { |
| | | this.taskList = res.data; |
| | | }); |
| | | }); |
| | | }, |
| | | gotoResult() { |
| | | this.$emit('gotoResult', this.index); |
| | | startTask(index, callback) { |
| | | this.fetchData((page, pageSize) => { |
| | | const param = this._getParam(this.taskList[index]); |
| | | return bgtaskApi.startTask(param).then((res) => { |
| | | this.taskList[index] = res.data; |
| | | callback(true); |
| | | }); |
| | | }); |
| | | }, |
| | | shutDownTask(index, callback) { |
| | | this.fetchData((page, pageSize) => { |
| | | const param = this._getParam(this.taskList[index]); |
| | | return bgtaskApi.shutDownTask(param).then((res) => { |
| | | if (index && res.data && res.data.length == 1) { |
| | | this.taskList[index] = res.data[0]; |
| | | } else { |
| | | res.data.forEach((e) => { |
| | | let v = this.taskList.find((value) => { |
| | | return value.id == e.id; |
| | | }); |
| | | const i = this.taskList.indexOf(v); |
| | | this.taskList[i] = e; |
| | | }); |
| | | } |
| | | callback(true); |
| | | }); |
| | | }); |
| | | }, |
| | | removeTask(index, callback) { |
| | | this.fetchData((page, pageSize) => { |
| | | const param = this._getParam(this.taskList[index]); |
| | | return bgtaskApi.removeTask(param).then((res) => { |
| | | if (res.data) { |
| | | this.taskList.splice(index, 1); |
| | | callback(true); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | gotoResult(index) {} |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .status-btn { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: var(--el-border); |
| | | border-radius: var(--el-border-radius-base); |
| | | } |
| | | .timer { |
| | | font-size: 30px; |
| | | .scrollbar { |
| | | padding: 8px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-popover placement="bottom" :width="600" trigger="click"> |
| | | <template #reference> |
| | | <el-badge :value="runningNum" :hidden="runningNum == 0" class="m-r-16"> |
| | | <el-button circle> |
| | | <el-icon v-if="runningNum > 0" color="red" class="is-loading"><Clock /></el-icon> |
| | | <el-icon v-else><Clock /></el-icon> |
| | | </el-button> |
| | | </el-badge> |
| | | </template> |
| | | <!-- <el-button circle icon="Close" type="danger" @click=</el-button> --> |
| | | <FYBgTaskCard v-model="runningNum"></FYBgTaskCard> |
| | | </el-popover> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | runningNum: 0 |
| | | }; |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-card class="m-b-8" shadow="always" :body-style="{ padding: '8px' }"> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | <div class="status-btn"> |
| | | <el-icon v-if="waiting" color="var(--el-color-info)" :size="50"><VideoPlay /></el-icon> |
| | | <el-icon v-else-if="running" color="var(--el-color-primary)" :size="50" class="is-loading" |
| | | ><Loading |
| | | /></el-icon> |
| | | <el-icon v-else-if="success" color="var(--el-color-success)" :size="50" |
| | | ><CircleCheck |
| | | /></el-icon> |
| | | <el-icon v-else-if="fail" color="var(--el-color-error)" :size="50" |
| | | ><CircleClose |
| | | /></el-icon> |
| | | <el-icon v-else color="var(--el-color-warning)" :size="50"><Warning /></el-icon> |
| | | <el-text type="info" size="small" style="position: absolute; bottom: 0">{{ |
| | | nameToLabel(model.status) |
| | | }}</el-text> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="20" class="p-l-8"> |
| | | <el-row justify="space-between"> |
| | | <el-text class="m-l-4px w-300px" tag="b" size="large" truncated>{{ model.name }}</el-text> |
| | | <el-tag>{{ nameToLabel(model.type) }}</el-tag> |
| | | </el-row> |
| | | <el-row class="p-v-8" align="bottom"> |
| | | <el-col :span="12"> |
| | | <span class="timer">{{ time }}</span> |
| | | <el-text type="info" size="small" tag="div">è¿è¡æ¶é¿</el-text> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-text type="default" size="default" tag="div" |
| | | >å¼å§ï¼{{ $fm.formatYMDH(model.startTime) }}</el-text |
| | | > |
| | | <el-text type="default" size="default" tag="div" |
| | | >ç»æï¼{{ $fm.formatYMDH(model.endTime) }}</el-text |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | <el-row justify="end" align="bottom"> |
| | | <!-- <span class="f-s color-i">IDï¼{{ model.id }}</span> --> |
| | | <el-row> |
| | | <FYReconfrimButton v-if="waiting" @confirm="startTask" v-model="startConfirm"> |
| | | <el-button |
| | | plain |
| | | icon="VideoPlay" |
| | | type="primary" |
| | | size="small" |
| | | :loading="false" |
| | | @click="startConfirm = true" |
| | | >å¼å§ä»»å¡</el-button |
| | | > |
| | | </FYReconfrimButton> |
| | | <FYReconfrimButton v-if="running" @confirm="stopTask" v-model="stopConfirm"> |
| | | <el-button |
| | | icon="VideoPause" |
| | | plain |
| | | type="danger" |
| | | size="small" |
| | | :loading="false" |
| | | @click="stopConfirm = true" |
| | | >强å¶ç»æ</el-button |
| | | > |
| | | </FYReconfrimButton> |
| | | <FYReconfrimButton v-if="!running" @confirm="removeTask" v-model="removeConfirm"> |
| | | <el-button |
| | | icon="Delete" |
| | | plain |
| | | type="danger" |
| | | size="small" |
| | | :loading="false" |
| | | @click="removeConfirm = true" |
| | | >ç§»é¤ä»»å¡</el-button |
| | | > |
| | | </FYReconfrimButton> |
| | | <template v-if="success"> |
| | | <el-button |
| | | v-if="btnType" |
| | | plain |
| | | type="success" |
| | | size="small" |
| | | :loading="false" |
| | | @click="download" |
| | | >ä¸è½½æä»¶<el-icon class="m-l-4"><Right /></el-icon |
| | | ></el-button> |
| | | <el-button |
| | | v-else |
| | | plain |
| | | type="success" |
| | | size="small" |
| | | :loading="false" |
| | | @click="gotoResult" |
| | | >æ¥çç»æ<el-icon class="m-l-4"><Right /></el-icon |
| | | ></el-button> |
| | | </template> |
| | | </el-row> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </template> |
| | | <script> |
| | | import { nTlBgTask, BG_TASK_STATUS, BG_TASK_TYPE } from '@/enum/bgTask'; |
| | | import { useTimer } from '@/composables/timer'; |
| | | import downloadApi from '@/api/fysp/downloadApi'; |
| | | // import { useTimer } from '@/composables/timer2'; |
| | | |
| | | export default { |
| | | setup() { |
| | | const { time, startTimer, pauseTimer, stopTimer, count } = useTimer(); |
| | | return { time, startTimer, pauseTimer, stopTimer, count }; |
| | | }, |
| | | props: { |
| | | model: Object, |
| | | index: Number |
| | | }, |
| | | emits: ['start', 'shutDown', 'remove', 'gotoResult'], |
| | | data() { |
| | | return { |
| | | startConfirm: false, |
| | | stopConfirm: false, |
| | | removeConfirm: false |
| | | }; |
| | | }, |
| | | watch: { |
| | | 'model.status': { |
| | | handler(nV) { |
| | | switch (nV) { |
| | | case BG_TASK_STATUS.WAITING.name: |
| | | this.stopTimer(); |
| | | break; |
| | | case BG_TASK_STATUS.RUNNING.name: |
| | | this.startTimer(); |
| | | break; |
| | | case BG_TASK_STATUS.SUCCESS.name: |
| | | case BG_TASK_STATUS.FAIL.name: |
| | | case BG_TASK_STATUS.SHUTDOWN.name: |
| | | this.pauseTimer(); |
| | | break; |
| | | default: |
| | | this.stopTimer(); |
| | | break; |
| | | } |
| | | this.count = this.model.runTime; |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | computed: { |
| | | btnType() { |
| | | return this.model.type == BG_TASK_TYPE.DOCUMENT.name; |
| | | }, |
| | | waiting() { |
| | | return this.model.status == BG_TASK_STATUS.WAITING.name; |
| | | }, |
| | | running() { |
| | | return this.model.status == BG_TASK_STATUS.RUNNING.name; |
| | | }, |
| | | success() { |
| | | return this.model.status == BG_TASK_STATUS.SUCCESS.name; |
| | | }, |
| | | fail() { |
| | | return this.model.status == BG_TASK_STATUS.FAIL.name; |
| | | }, |
| | | shutdown() { |
| | | return this.model.status == BG_TASK_STATUS.SHUTDOWN.name; |
| | | } |
| | | }, |
| | | methods: { |
| | | nameToLabel(name) { |
| | | const t = nTlBgTask(name); |
| | | return t.label; |
| | | }, |
| | | startTask() { |
| | | this.$emit('start', this.index, (res) => { |
| | | if (res) { |
| | | this.startTimer(); |
| | | } |
| | | }); |
| | | }, |
| | | stopTask() { |
| | | this.$emit('shutDown', this.index, (res) => { |
| | | if (res) { |
| | | this.stopTimer(); |
| | | } |
| | | }); |
| | | }, |
| | | removeTask() { |
| | | this.$emit('remove', this.index, (res) => { |
| | | if (res) { |
| | | // this.stopTimer(); |
| | | } |
| | | }); |
| | | }, |
| | | gotoResult() { |
| | | this.$emit('gotoResult', this.index); |
| | | }, |
| | | download() { |
| | | downloadApi.downloadFile(this.model.extra); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .status-btn { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: var(--el-border); |
| | | border-radius: var(--el-border-radius-base); |
| | | } |
| | | .timer { |
| | | font-size: 30px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-row align="middle" class="header"> |
| | | <el-col :span="1"> |
| | | <el-button |
| | | @click="collapsedSider" |
| | | icon="Fold" |
| | | circle |
| | | :class="rotateIcon" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="18"> |
| | | <el-breadcrumb separator="/" style="white-space: nowrap;"> |
| | | <el-col :span="12"> |
| | | <el-space> |
| | | <el-button @click="collapsedSider" icon="Fold" circle :class="rotateIcon" /> |
| | | <el-breadcrumb separator="/" style="white-space: nowrap"> |
| | | <el-breadcrumb-item v-for="(t, i) in navTitles" :key="i">{{t}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </el-space> |
| | | </el-col> |
| | | <el-col :span="5" class="logout"> |
| | | <el-col :span="12" class="logout"> |
| | | <FYBgTaskDialog></FYBgTaskDialog> |
| | | <el-button icon="SwitchButton">éåºç»å½</el-button> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | props: { |
| | | collapse: { |
| | | type: Boolean, |
| | | default: false, |
| | | default: false |
| | | }, |
| | | navTitles: { |
| | | type: Array, |
| | | default: () => ['home','promotion list', 'promotion detail'], |
| | | default: () => ['home', 'promotion list', 'promotion detail'] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | isCollapsed: this.collapse, |
| | | isCollapsed: this.collapse |
| | | }; |
| | | }, |
| | | watch: {}, |
| | |
| | | */ |
| | | rotateIcon() { |
| | | return ['menu-icon', this.isCollapsed ? 'rotate-icon' : '']; |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | |
| | | collapsedSider() { |
| | | this.isCollapsed = !this.isCollapsed; |
| | | this.$emit('collapsedSider', this.isCollapsed); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | loading: false |
| | | } |
| | | }; |
| | | }, |
| | | emits: ['search'], |
| | | watch: { |
| | | currentPage(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch() |
| | | this.onSearch(); |
| | | } |
| | | }, |
| | | pageSize(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch() |
| | | this.onSearch(); |
| | | } |
| | | } |
| | | }, |
| | |
| | | * åè°å½æ°æ¥æ¶ä¸ä¸ªå¯¹è±¡ï¼å
æ¬è¡¨æ ¼æ°æ®æ°ç»dataåæ°æ®æ»æ°total |
| | | */ |
| | | onSearch() { |
| | | this.loading = true |
| | | this.loading = true; |
| | | this.$emit( |
| | | 'search', |
| | | { |
| | |
| | | pageSize: this.pageSize |
| | | }, |
| | | (res) => { |
| | | this.tableData = res.data |
| | | this.total = res.total ? res.total : 0 |
| | | this.loading = false |
| | | this.tableData = res.data; |
| | | this.total = res.total ? res.total : 0; |
| | | this.loading = false; |
| | | } |
| | | ) |
| | | ); |
| | | }, |
| | | calcTableHeight() { |
| | | const h1 = this.$refs.searchRef.$el.offsetHeight |
| | | const h2 = this.$refs.paginationRef ? this.$refs.paginationRef.$el.offsetHeight : 0 |
| | | const h3 = this.$refs.expandRef.$el.offsetHeight |
| | | const h = h1 + h2 + h3 |
| | | const h1 = this.$refs.searchRef.$el.offsetHeight; |
| | | const h2 = this.$refs.paginationRef ? this.$refs.paginationRef.$el.offsetHeight : 0; |
| | | const h3 = this.$refs.expandRef.$el.offsetHeight; |
| | | const h = h1 + h2 + h3; |
| | | // return `calc(100vh - ${h1}px - ${h2}px - var(--el-main-padding) * 2 - var(--el-header-height))`; |
| | | return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)` |
| | | return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`; |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | if (this.rowClassName) { |
| | | if (typeof this.rowClassName == 'string') { |
| | | return this.rowClassName |
| | | return this.rowClassName; |
| | | } else if (typeof this.rowClassName == 'function') { |
| | | return this.rowClassName({ row }) |
| | | return this.rowClassName({ row }); |
| | | } |
| | | } else { |
| | | return row.extension1 != '0' ? 'online-row' : 'offline-row' |
| | | return row.extension1 != '0' ? 'online-row' : 'offline-row'; |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.tableHeight = this.calcTableHeight() |
| | | this.onSearch() |
| | | this.tableHeight = this.calcTableHeight(); |
| | | this.onSearch(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | name: 'AUTO_SCORE', |
| | | label: 'èªå¨è¯ä¼°ä»»å¡', |
| | | value: '1' |
| | | }, |
| | | DOCUMENT: { |
| | | name: 'DOCUMENT', |
| | | label: 'ææ¡£çæä»»å¡', |
| | | value: '2' |
| | | } |
| | | }); |
| | | |
| | |
| | | return BG_TASK_TYPE[name]; |
| | | } else if (name in BG_TASK_STATUS) { |
| | | return BG_TASK_STATUS[name]; |
| | | } else { |
| | | return '-' |
| | | } |
| | | } |
| | | |
| | |
| | | //è¯ä¼°æ°æ®æº |
| | | name: 'fyspDatasource', |
| | | path: '/fysp/evaluation/datasource', |
| | | component: () => import('@/views/fysp/evaluation/DataSource.vue') |
| | | component: () => import('@/views/fysp/evaluation/DataSource.vue'), |
| | | meta: { keepAlive: true } |
| | | }, |
| | | { |
| | | //è¯ä¼°ç®¡ç |
| | | name: 'fyspResultManage', |
| | | path: '/fysp/evaluation/resultManage', |
| | | component: () => import('@/views/fysp/evaluation/ResultManage.vue') |
| | | component: () => import('@/views/fysp/evaluation/ResultManage.vue'), |
| | | meta: { keepAlive: true } |
| | | }, |
| | | { |
| | | //åºæ¯ä¿¡æ¯ |
| | |
| | | // |
| | | @mixin font-size($size) { |
| | | font-size: var($size); |
| | | /************************************** font size **************************************/ |
| | | $fontsize: ( |
| | | s: var(--el-font-size-small), |
| | | b: var(--el-font-size-base), |
| | | m: var(--el-font-size-medium), |
| | | l: var(--el-font-size-large) |
| | | ); |
| | | |
| | | @each $dName, $dValue in $fontsize { |
| | | .f-#{$dName} { |
| | | font-size: #{$dValue}; |
| | | } |
| | | } |
| | | |
| | | .f-s { |
| | | @include font-size(--el-font-size-small); |
| | | } |
| | | /************************************** color **************************************/ |
| | | $colors: ( |
| | | p: var(--el-color-primary), |
| | | s: var(--el-color-success), |
| | | w: var(--el-color-warning), |
| | | d: var(--el-color-danger), |
| | | e: var(--el-color-error), |
| | | i: var(--el-color-info) |
| | | ); |
| | | |
| | | .f-b { |
| | | @include font-size(--el-font-size-base); |
| | | @each $dName, $dValue in $colors { |
| | | .color-#{$dName} { |
| | | color: #{$dValue}; |
| | | } |
| | | |
| | | .f-m { |
| | | @include font-size(--el-font-size-medium); |
| | | .b-color-#{$dName} { |
| | | background-color: #{$dValue}; |
| | | } |
| | | |
| | | .f-l { |
| | | @include font-size(--el-font-size-large); |
| | | } |
| | | |
| | | @mixin color($value) { |
| | | color: var($value); |
| | | } |
| | | |
| | | .color-p { |
| | | @include color(--el-color-primary); |
| | | } |
| | | |
| | | .color-s { |
| | | @include color(--el-color-success); |
| | | } |
| | | |
| | | .color-w { |
| | | @include color(--el-color-warning); |
| | | } |
| | | |
| | | .color-d { |
| | | @include color(--el-color-danger); |
| | | } |
| | | |
| | | .color-e { |
| | | @include color(--el-color-error); |
| | | } |
| | | |
| | | .color-i { |
| | | @include color(--el-color-info); |
| | | } |
| | | |
| | | .b-color-aqua { |
| | | background-color: aqua; |
| | | } |
| | | |
| | | /************************************** å
å¤è¾¹è· **************************************/ |
| | |
| | | } |
| | | } |
| | | |
| | | .w-300px { |
| | | width: 300px; |
| | | /************************************** å®½é« **************************************/ |
| | | $csize: ( |
| | | small: var(--el-component-size-small), |
| | | default: var(--el-component-size-default), |
| | | large: var(--el-component-size-large) |
| | | ); |
| | | $ws: (20px, 40px, 60px, 100px, 150px, 300px); |
| | | @each $name, $value in $csize { |
| | | .w-#{$name} { |
| | | width: #{$value}; |
| | | } |
| | | .h-#{$name} { |
| | | height: #{$value}; |
| | | } |
| | | } |
| | | @each $i in $ws { |
| | | .w-#{$i} { |
| | | width: #{$i}; |
| | | } |
| | | .h-#{$i} { |
| | | height: #{$i}; |
| | | } |
| | | } |
| | | |
| | | // |
| | |
| | | pull: 0, |
| | | }, |
| | | md: { |
| | | span: 16, |
| | | offset: 3, |
| | | span: 20, |
| | | offset: 2, |
| | | push: 0, |
| | | pull: 0, |
| | | }, |
| | | lg: { |
| | | span: 14, |
| | | offset: 4, |
| | | span: 18, |
| | | offset: 3, |
| | | push: 0, |
| | | pull: 0, |
| | | }, |
| | | xl: { |
| | | span: 12, |
| | | span: 14, |
| | | offset: 5, |
| | | push: 0, |
| | | pull: 0, |
| | |
| | | <template> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="16"> |
| | | <CompPreCheck></CompPreCheck> |
| | | <CompPreCheck @start-task="refreshTask"></CompPreCheck> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <CompEvaTask></CompEvaTask> |
| | | <CompEvaTask ref="refEvaTask"></CompEvaTask> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | |
| | | components: { CompPreCheck, CompEvaTask }, |
| | | data() { |
| | | return {}; |
| | | }, |
| | | methods:{ |
| | | refreshTask(){ |
| | | this.$refs.refEvaTask.fetchTask() |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <template #options-expand> |
| | | <el-form :inline="true"> |
| | | <CompQuickSet @quick-set="setOptions"></CompQuickSet> |
| | | </el-form> |
| | | </template> |
| | | |
| | | <template #table-column> |
| | |
| | | <el-table-column prop="biManagementCompany" label="ç©ä¸" min-width="110"/> --> |
| | | <el-table-column fixed="right" align="right" label="æä½" width="160"> |
| | | <template #header> |
| | | <el-button icon="DocumentAdd" size="default" type="success" @click="drawer = true" |
| | | >èªå¨è¯ä¼°</el-button |
| | | <el-button icon="Download" size="default" type="success" @click="download" |
| | | >ä¸è½½ç»æ</el-button |
| | | > |
| | | </template> |
| | | <template #default="{ row }"> |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | setOptions(param) { |
| | | this.formSearch.locations = param.locations; |
| | | this.formSearch.scenetype = param.scenetype; |
| | | this.$refs.tableRef.onSearch() |
| | | }, |
| | | onSearch(page, func) { |
| | | _getParam() { |
| | | const { locations, scenetype, time } = this.formSearch; |
| | | const area = { |
| | | return { |
| | | provincecode: locations.pCode, |
| | | provincename: locations.pName, |
| | | citycode: locations.cCode, |
| | | cityname: locations.cName, |
| | | districtcode: locations.dCode, |
| | | districtname: locations.dName, |
| | | starttime: dayjs(time).format('YYYY-MM-DD'), |
| | | starttime: dayjs(time).format('YYYY-MM-DD HH:mm:ss'), |
| | | scensetypeid: scenetype.value |
| | | }; |
| | | }, |
| | | setOptions(param) { |
| | | this.formSearch.locations = param.locations; |
| | | this.formSearch.scenetype = param.scenetype; |
| | | this.formSearch.sourceType = param.sourceType; |
| | | this.$refs.tableRef.onSearch(); |
| | | }, |
| | | onSearch(page, func) { |
| | | const area = this._getParam() |
| | | evaluateApi.fetchAutoEvaluation(area).then((res) => { |
| | | if (typeof func === 'function') { |
| | | func({ data: res.data }); |
| | |
| | | this.getFilters(res.data); |
| | | } |
| | | }); |
| | | }, |
| | | download() { |
| | | const area = this._getParam() |
| | | evaluateApi.downloadAutoEvaluation(area).then(res=>{ |
| | | this.$parent |
| | | }) |
| | | }, |
| | | getFilters(data) { |
| | | const townList = []; |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | >å·æ°ä»»å¡</el-button |
| | | > |
| | | </el-row> |
| | | <el-row> |
| | | <!-- <el-row> |
| | | <el-button type="default" size="default" @click="newTestTask">æ°å¢æµè¯ä»»å¡</el-button> |
| | | <el-button type="default" size="default" @click="startNewTestTask" |
| | | >æ°å»ºå¹¶è¿è¡ä¸ä¸ªæµè¯ä»»å¡</el-button |
| | |
| | | <el-button type="default" size="default" @click="shutDownTask" |
| | | >强å¶å
³éæææµè¯ä»»å¡</el-button |
| | | > |
| | | </el-row> |
| | | </el-row> --> |
| | | </template> |
| | | <el-scrollbar height="70vh" class="scrollbar"> |
| | | <template v-for="(v, i) in taskList" :key="i"> |
| | | <FYBgTaskCard |
| | | <FYBgTaskItem |
| | | :model="v" |
| | | :index="i" |
| | | @start="startTask" |
| | | @shutDown="shutDownTask" |
| | | @remove="removeTask" |
| | | @gotoResult="gotoResult" |
| | | ></FYBgTaskCard> |
| | | ></FYBgTaskItem> |
| | | </template> |
| | | </el-scrollbar> |
| | | </el-card> |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | addTask(){ |
| | | |
| | | }, |
| | | newTestTask() { |
| | | this.fetchData((page, pageSize) => { |
| | | return bgtaskApi.newTestTask(`Test-Task-${++this.taskIndex}`).then((res) => { |
| | |
| | | this.fetchData((page, pageSize) => { |
| | | return bgtaskApi |
| | | .fetchTaskStatus({ |
| | | type: BG_TASK_TYPE.TEST.name |
| | | type: BG_TASK_TYPE.AUTO_SCORE.name |
| | | }) |
| | | .then((res) => { |
| | | this.taskList = res.data; |
| | |
| | | scenetype: { label: 'æ
æç«', value: '3' }, |
| | | sourceType: 2, |
| | | }, |
| | | { |
| | | name: '徿±æ±½ä¿®', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310104', |
| | | dName: '徿±åº' |
| | | }, |
| | | scenetype: { label: '汽修', value: '7' }, |
| | | sourceType: 1, |
| | | } |
| | | // { |
| | | // name: '徿±æ±½ä¿®', |
| | | // locations: { |
| | | // pCode: '31', |
| | | // pName: '䏿µ·å¸', |
| | | // cCode: '3100', |
| | | // cName: '䏿µ·å¸', |
| | | // dCode: '310104', |
| | | // dName: '徿±åº' |
| | | // }, |
| | | // scenetype: { label: '汽修', value: '7' }, |
| | | // sourceType: 1, |
| | | // } |
| | | ] |
| | | } |
| | | } |
| | |
| | | <el-steps :active="stepIndex" finish-status="success" style="" align-center> |
| | | <el-step title="è¯ä¼°èå´" /> |
| | | <el-step title="æ°æ®æºæ£æ¥" /> |
| | | <el-step title="è±å
æ¡ç®" /> |
| | | <el-step title="æ¡ç®è±å
" /> |
| | | <el-step title="èªå¨è¯ä¼°" /> |
| | | </el-steps> |
| | | <CompCheckArea v-show="stepIndex == 0" v-model="stepIndex" @change="onAreaChange"></CompCheckArea> |
| | | <CompCheckSource |
| | | v-show="stepIndex == 1" |
| | | v-model="stepIndex" |
| | | ref="refSource" |
| | | ></CompCheckSource> |
| | | <CompCheckSource v-show="stepIndex == 1" v-model="stepIndex" ref="refSource"></CompCheckSource> |
| | | <CompCheckExemption v-show="stepIndex == 2" v-model="stepIndex"></CompCheckExemption> |
| | | <CompCheckConfirm v-show="stepIndex == 3" v-model="stepIndex"></CompCheckConfirm> |
| | | <CompCheckConfirm |
| | | v-show="stepIndex == 3" |
| | | v-model="stepIndex" |
| | | :area-info="area" |
| | | @start="onNewTask" |
| | | ></CompCheckConfirm> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | name: 'CompPreCheck', |
| | | components: { CompCheckArea, CompCheckSource, CompCheckExemption, CompCheckConfirm }, |
| | | props: {}, |
| | | emits: ['preCheck'], |
| | | emits: ['startTask'], |
| | | data() { |
| | | return { |
| | | // æä½æ¥éª¤ä¸æ |
| | |
| | | /** |
| | | * çå¬è¯ä¼°èå´åæ´ |
| | | */ |
| | | onAreaChange(v) { |
| | | // this.area = v; |
| | | this.$refs.refSource.startCheck(v); |
| | | onAreaChange(val) { |
| | | const v = val.value; |
| | | this.area = { |
| | | provincecode: v._locations.pCode, |
| | | provincename: v._locations.pName, |
| | | citycode: v._locations.cCode, |
| | | cityname: v._locations.cName, |
| | | districtcode: v._locations.dCode, |
| | | districtname: v._locations.dName, |
| | | towncode: v._locations.tCode, |
| | | townname: v._locations.tName, |
| | | starttime: this.$fm.formatYMDH(v.time), |
| | | scensetypeid: v._scenetype.value, |
| | | online: true, |
| | | sourceType: v.sourceType |
| | | }; |
| | | this.$refs.refSource.startCheck(this.area); |
| | | }, |
| | | /** |
| | | * èªå¨è¯ä¼°åç½®åè§æ§æ£æ¥ |
| | | * æ£æ¥æéèå´å
å项è¯ä¼°æ°æ®æºæ¯å¦å®æ´ |
| | | */ |
| | | preCheck() { |
| | | // this.$emit('preCheck', param) |
| | | onNewTask() { |
| | | this.$emit('startTask'); |
| | | } |
| | | } |
| | | }; |
| | |
| | | <template> |
| | | <el-card shadow="never"> |
| | | Never4 |
| | | <template #header> |
| | | <div><el-text tag="b" size="large">èªå¨è¯ä¼°ç¡®è®¤</el-text></div> |
| | | <el-text size="small" type="info">æç»ç¡®è®¤èªå¨è¯ä¼°åé
置项ï¼å¹¶å¼å§èªå¨è¯ä¼°</el-text> |
| | | </template> |
| | | <div>è¯ä¼°èå´</div> |
| | | <div>è¯ä¼°æ°æ®æºå®æ´åº¦</div> |
| | | <div>æ¯å¦æè±å
æ¡ç®</div> |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | | <el-button type="primary" size="default" @click="lastStep">ä¸ä¸æ¥</el-button> |
| | | <!-- <el-button type="primary" size="default" @click="nextStep">ä¸ä¸æ¥</el-button> --> |
| | | <el-button type="primary" size="default" @click="startEvaluate">å¼å§è¯ä¼°</el-button> |
| | | </el-row> |
| | | </template> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import evaluateApi from '@/api/fysp/evaluateApi'; |
| | | |
| | | /** |
| | | * è¯ä¼°ä»»å¡æç»å¼å¯ç¡®è®¤ |
| | | */ |
| | | export default { |
| | | props: { |
| | | // æ¥éª¤ä¸æ |
| | | modelValue: Number |
| | | modelValue: Number, |
| | | // åºåä¿¡æ¯ |
| | | areaInfo: Object |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | emits: ['update:modelValue', 'start'], |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | return {}; |
| | | }, |
| | | methods: { |
| | | // 跳转ä¸ä¸æ¥ |
| | | nextStep() { |
| | | this.$emit('update:modelValue', this.modelValue + 1); |
| | | // å¼å¯èªå¨è¯ä¼°ä»»å¡ |
| | | startEvaluate() { |
| | | evaluateApi.autoEvaluate(this.areaInfo).then((res) => { |
| | | this.$emit('start', res.data); |
| | | }); |
| | | }, |
| | | // 跳转ä¸ä¸æ¥ |
| | | // 跳转ä¸ä¸æ¥ |
| | | lastStep() { |
| | | this.$emit('update:modelValue', this.modelValue - 1); |
| | | } |
| | |
| | | <template> |
| | | <el-card shadow="never"> |
| | | <template #header> |
| | | <div><el-text tag="b" size="large">æ¡ç®è±å
</el-text></div> |
| | | <el-text size="small" type="info">èªå®ä¹è®¾ç½®æ¤æ¬¡è¯ä¼°ä¸åä¸è®¡ç®çæ¡ç®</el-text> |
| | | </template> |
| | | è±å
æ¡ç®åè½ææªå®æï¼è¯·ç´æ¥ç¹å»ä¸ä¸æ¥ |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | |
| | | <template #header> |
| | | <div><el-text tag="b" size="large">æ°æ®æºæ£æ¥</el-text></div> |
| | | <el-text size="small" type="info">æ£æ¥è¯ä¼°æéæ°æ®æºæ¯å¦å®æ´</el-text> |
| | | <el-text size="small" type="info">æ£æ¥è¯ä¼°æéæ°æ®æºæ¯å¦å®æ´</el-text> |
| | | </template> |
| | | <FormCol> |
| | | <el-form-item align="middle" v-for="(v, i) in checkResults" :key="i"> |
| | | <template v-for="(v, i) in checkResults" :key="i"> |
| | | <el-row class="h-small" align="middle"> |
| | | <el-col :span="14"> |
| | | <el-row align="middle"> |
| | | <el-text size="default" :class="v.required ? 'required' : 'not-required'">*</el-text> |
| | |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-button |
| | | v-if="!v.pass" |
| | | type="primary" |
| | | v-show="!v.loading" |
| | | :type="v.pass ? '' : 'danger'" |
| | | size="small" |
| | | @click="goto(v.path)" |
| | | :disabled="v.path == ''" |
| | | > |
| | | å»å®å |
| | | {{ v.pass ? 'å»ä¿®æ¹' : 'å»å®å' }} |
| | | <el-icon class="m-l-4"><Right /></el-icon> |
| | | </el-button> |
| | | </el-col> |
| | | </el-form-item> |
| | | </el-row> |
| | | <el-row align="middle" class="m-b-16"> |
| | | <el-text size="small" class="not-required">*</el-text> |
| | | <el-text size="small" class="m-l-4 color-i">{{ v.des }}</el-text> |
| | | </el-row> |
| | | </template> |
| | | </FormCol> |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | |
| | | loading: true, |
| | | pass: false, |
| | | path: _path, |
| | | des: '', |
| | | async fetch() { |
| | | this.loading = true; |
| | | setTimeout(async () => { |
| | | this.pass = await _fetch(); |
| | | const res = await _fetch(); |
| | | this.pass = res ? res.pass : undefined; |
| | | this.des = res ? res.des : undefined; |
| | | this.loading = false; |
| | | }, 1000); |
| | | } |
| | |
| | | ...this.areaInfo |
| | | }; |
| | | return evaluateApi.fetchEvaluationRule(param).then((res) => { |
| | | return res.data.length > 0; |
| | | const pass = res.data.length > 0; |
| | | let des = ''; |
| | | if (pass) { |
| | | res.data.forEach((e) => { |
| | | if (des != '') { |
| | | des += 'ã'; |
| | | } |
| | | des += `ã${e.rulename}ã`; |
| | | }); |
| | | } else { |
| | | des = 'æªæ¾å°ç¸å
³è¯ä¼°è§å表'; |
| | | } |
| | | return { pass, des }; |
| | | }); |
| | | }, |
| | | true |
| | |
| | | // åºåèå´å
ççç®¡ä»»å¡æ¯å¦åå¨ |
| | | baseCheckItem('ç°åºçç®¡å·¡æ¥æ»ä»»å¡', '', () => { |
| | | return taskApi.fetchTopTasks(this.areaInfo).then((res) => { |
| | | return res.data.length > 0; |
| | | const pass = res.data.length > 0; |
| | | let des = ''; |
| | | if (pass) { |
| | | res.data.forEach((e) => { |
| | | if (des != '') { |
| | | des += 'ã'; |
| | | } |
| | | des += e.name; |
| | | }); |
| | | } else { |
| | | des = 'æªæ¾å°ç¸å
³å·¡æ¥æ»ä»»å¡'; |
| | | } |
| | | return { pass, des }; |
| | | }); |
| | | }), |
| | | // åºåèå´å
ççæµæ°æ®æ¯å¦åå¨ãæ°æ®æ¶é´è·¨åº¦æ¯å¦å®æ´ãæ°æ®ç忥忿¯å¦å®æ |
| | | baseCheckItem('ç°åºçæµæ°æ®', '', () => {}), |
| | | // åºåèå´å
çæ¯ä¸ªç管ç¹ä½ä¸çæµä»ªå¨çå¹é
è®°å½æ¯å¦åå¨ï¼ç¼ºå¤±æ
åµç |
| | | baseCheckItem('ç管ç¹ä½ä¸çæµç¹å¹é
', '', () => { |
| | | userMapApi.fetchDeviceMap(this.areaInfo).then((res) => { |
| | | return res.data.length > 0; |
| | | return userMapApi.fetchDeviceMap(this.areaInfo).then((res) => { |
| | | const pass = res.data.length > 0; |
| | | let des = ''; |
| | | if (pass) { |
| | | des = `æ¾å°å¹é
è®°å½å
±${res.data.length}æ¡`; |
| | | } else { |
| | | des = 'æªæ¾å°ç¸å
³å¹é
è®°å½'; |
| | | } |
| | | return { pass, des }; |
| | | }); |
| | | }), |
| | | // åºåèå´å
çç管é®é¢é
置表æ¯å¦åå¨ |
| | |
| | | cityCode: this.areaInfo.citycode, |
| | | districtCode: this.areaInfo.districtcode, |
| | | sceneTypeId: this.areaInfo.scensetypeid |
| | | }; |
| | | return problemApi.fetchProblemType(param).then((res) => { |
| | | const pass = res.length > 0; |
| | | let des = ''; |
| | | if (pass) { |
| | | des = `æ¾å°é®é¢ç±»åå
±${res.length}æ¡`; |
| | | } else { |
| | | des = 'æªæ¾å°ç¸å
³é®é¢ç±»å'; |
| | | } |
| | | problemApi.fetchProblemType(param).then((res) => { |
| | | return res.length > 0; |
| | | return { pass, des }; |
| | | }); |
| | | }), |
| | | // åºåèå´å
ç信访æè¯è®°å½æ¯å¦åå¨ï¼å¯éæ¶è¡¥å
|
| | | baseCheckItem('信访æè¯', '', () => { |
| | | complaintApi.fetchComplaints(); |
| | | // complaintApi.fetchComplaints(); |
| | | }), |
| | | // åºåèå´å
çè¡æ¿å¤ç½è®°å½æ¯å¦åå¨ï¼å¯éæ¶è¡¥å
|
| | | baseCheckItem('è¡æ¿å¤ç½', '', () => { |
| | | complaintApi.fetchPunishment(); |
| | | // complaintApi.fetchPunishment(); |
| | | }) |
| | | ] |
| | | }; |
| | |
| | | }, |
| | | // å¼å§æ£æ¥ä»»å¡ |
| | | startCheck(value) { |
| | | const v = value.value |
| | | this.areaInfo = { |
| | | provincecode: v._locations.pCode, |
| | | provincename: v._locations.pName, |
| | | citycode: v._locations.cCode, |
| | | cityname: v._locations.cName, |
| | | districtcode: v._locations.dCode, |
| | | districtname: v._locations.dName, |
| | | towncode: v._locations.tCode, |
| | | townname: v._locations.tName, |
| | | starttime: v.time, |
| | | scensetypeid: v._scenetype.value, |
| | | online: true, |
| | | sourceType: v.sourceType, |
| | | }; |
| | | // const v = value.value; |
| | | // this.areaInfo = { |
| | | // provincecode: v._locations.pCode, |
| | | // provincename: v._locations.pName, |
| | | // citycode: v._locations.cCode, |
| | | // cityname: v._locations.cName, |
| | | // districtcode: v._locations.dCode, |
| | | // districtname: v._locations.dName, |
| | | // towncode: v._locations.tCode, |
| | | // townname: v._locations.tName, |
| | | // starttime: this.$fm.formatYMDH(v.time), |
| | | // scensetypeid: v._scenetype.value, |
| | | // online: true, |
| | | // sourceType: v.sourceType |
| | | // }; |
| | | this.areaInfo = value |
| | | |
| | | this.checkResults.forEach((e) => { |
| | | e.fetch(); |
| | | }); |