7 files modified
1 files added
| | |
| | | nextTick(() => { |
| | | refuseOrderDialogRef.value.open({ |
| | | mode, |
| | | row: { workOrderId: formData.value.id }, |
| | | row: formData.value, |
| | | type, |
| | | formLabel, |
| | | }) |
| | |
| | | const str = [...pointList.value, pointList.value[0]].map(item => `${item.longitude} ${item.latitude}`).join(',') |
| | | let geom = `POLYGON((${str}))` |
| | | const res = await gdManageDeviceListApi({ |
| | | current: 1, |
| | | size: 1000, |
| | | ids: formData.value.recommendDeviceIds, |
| | | devicePayload: dialogMode.value === 'add' ? formData.value.deviceLoadDemand : '', |
| | | geom: dialogMode.value === 'add' ? geom : '', |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 获取巡检任务 |
| | | function gdPatrolTaskPage() { |
| | | gdPatrolTaskPageApi({ current: 1, size: 1000, workOrderId: formData.value.id }).then(res => { |
| | | patrolTaskList.value = res.data.data.records || [] |
| | | }) |
| | | } |
| | | |
| | | function setMapDevice() { |
| | | gdManageDeviceListApi().then(res => { |
| | | renderingDevice(res?.data?.data || []) |
| | | }) |
| | | } |
| | | |
| | | import droneIcon from '@/assets/images/orderView/orderManage/drone.png' |
| | | function renderingDevice(list) { |
| | | // 渲染红点 |
| | | list.forEach(item => { |
| | | const position = Cesium.Cartesian3.fromDegrees(item.longitude || 115.00, item.latitude || 27.11) |
| | | viewer.entities.add({ |
| | | position: position, |
| | | billboard: { |
| | | image: droneIcon, |
| | | width: 40, |
| | | height: 40, |
| | | verticalOrigin: Cesium.VerticalOrigin.CENTER, |
| | | }, |
| | | }) |
| | | }) |
| | | } |
| | | |
| | |
| | | dialogMode.value === 'edit' ? editPolygon() : viewPolygon() |
| | | } |
| | | await getDeviceList() |
| | | // setMapDevice() |
| | | await nextTick() |
| | | syncSelection() |
| | | } |
| | |
| | | destroy-on-close |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div v-if="dialogReadonly"> |
| | | <el-row class="detail-row-view"> |
| | | <el-col :span="24"> |
| | | <div class="label">{{formLabelStr}}:</div> |
| | | <div class="val">{{ formData.rejectReason || '' }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-form |
| | | v-else |
| | | class="gd-dialog-form" |
| | | ref="formRef" |
| | | :model="formData" |
| | |
| | | <script setup> |
| | | import { computed, ref } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { fieldRules } from '@ztzf/utils' |
| | | import { fieldRules, getDictLabel } from '@ztzf/utils' |
| | | import { gdWorkOrderHandleStatusApi } from '@/views/orderView/orderManage/orderManage/orderManageApi' |
| | | import { pxToRem } from '@/utils/rem' |
| | | import dayjs from 'dayjs' |
| | | |
| | | // 初始化表单数据 |
| | | const initForm = () => ({ |
| | |
| | | }) |
| | | } |
| | | |
| | | function loadDetail() { |
| | | |
| | | } |
| | | |
| | | let formLabelStr = ref('原因') |
| | | // 打开弹框 |
| | | async function open({ mode = 'add', row, formLabel, type } = {}) { |
| | | dialogMode.value = mode |
| | | formLabelStr.value = formLabel |
| | | formData.value = { ...initForm(), ...row, operationType: type } |
| | | if (mode === 'view'){ |
| | | await loadDetail() |
| | | } |
| | | formData.value = { workOrderId: row.id, operationType: type, rejectReason: row.rejectReason } |
| | | } |
| | | |
| | | defineExpose({ open }) |
| | |
| | | |
| | | <div class="gd-table-toolbar"> |
| | | <!-- <el-button color="#F2F3F5" @click="requester = !requester">我是{{ requester ? '需求方' : '服务方' }}</el-button>--> |
| | | <el-button color="#F2F3F5" @click="previewVisible = true">预览</el-button> |
| | | <!-- <el-button color="#F2F3F5" @click="previewVisible = true">预览</el-button>--> |
| | | |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增</el-button> |
| | | <el-button :icon="Delete" color="#4C34FF" :disabled="!selectedIds.length" @click="handleDelete()">删除</el-button> |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')" v-if="requester">新增</el-button> |
| | | <el-button :icon="Delete" color="#4C34FF" :disabled="!selectedIds.length" @click="handleDelete()" v-if="requester">删除</el-button> |
| | | </div> |
| | | |
| | | <div class="gd-table-container" v-loading="loading"> |
| | |
| | | <template v-slot="{ row }"> |
| | | <el-link @click="openFormChange(row)">查看</el-link> |
| | | <!--<el-link @click="openForm('edit', row)">编辑</el-link>--> |
| | | <el-link @click="handleDelete(row)">删除</el-link> |
| | | <el-link @click="handleDelete(row)" v-if="requester">删除</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(new RegExp(`^${VITE_API_PREFIX}`), ''), |
| | | }, |
| | | [VITE_API_PREFIX_GD]: { |
| | | target: configEnv?.[envName || VITE_APP_ENV]?.VITE_API_BASE_URL_GD, |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(new RegExp(`^${VITE_API_PREFIX_GD}`), ''), |
| | | }, |
| | | } |
| | | return proxy |
| | | } |
| | |
| | | |
| | | # API代理前缀 |
| | | VITE_API_PREFIX=/api |
| | | VITE_API_PREFIX_GD=/api-gd |
| | | |
| | | # 删除console |
| | | VITE_DROP_CONSOLE=false |
| | |
| | | |
| | | /** 退出登录 */ |
| | | export const logout = () => post("/user/logout") |
| | | // 工单用户登录接口 |
| | | export const ticketLoginInterfaceApi = (tenantId, deptId, roleId, username, password, type, key, code) => { |
| | | return request({ |
| | | url: '/blade-auth/oauth/token', |
| | | method: 'post', |
| | | header: { |
| | | 'Tenant-Id': tenantId, |
| | | 'Dept-Id': website.switchMode ? deptId : '', |
| | | 'Role-Id': website.switchMode ? roleId : '', |
| | | 'Captcha-Key': key, |
| | | 'Captcha-Code': code, |
| | | }, |
| | | params: { |
| | | tenantId, |
| | | username, |
| | | password, |
| | | grant_type: 'password', |
| | | scope: 'all', |
| | | type, |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | // 用户登录接口 |
| | | export const loginByUsername = (tenantId, deptId, roleId, username, password, type, key, code) => { |
| | |
| | | import { request } from "@/utils/requestGd/index.js" |
| | | import website from '@/config/website' |
| | | |
| | | // 获取工单列表 |
| | | export const getGdList = data => { |
| | | return request({ |
| | |
| | | data, |
| | | }); |
| | | }; |
| | | // 工单用户登录接口 |
| | | export const ticketLoginInterfaceApi = (tenantId, deptId, roleId, username, password, type, key, code) => { |
| | | return request({ |
| | | url: '/blade-auth/oauth/token', |
| | | method: 'post', |
| | | header: { |
| | | 'Tenant-Id': tenantId, |
| | | 'Dept-Id': website.switchMode ? deptId : '', |
| | | 'Role-Id': website.switchMode ? roleId : '', |
| | | 'Captcha-Key': key, |
| | | 'Captcha-Code': code, |
| | | }, |
| | | params: { |
| | | tenantId, |
| | | username, |
| | | password, |
| | | grant_type: 'password', |
| | | scope: 'all', |
| | | type, |
| | | }, |
| | | }) |
| | | } |