Compare commits
5 Commits
69816883da
...
d8132e70e3
Author | SHA1 | Date | |
---|---|---|---|
d8132e70e3 | |||
e3d914ec95 | |||
1037e5e742 | |||
797cebd8dc | |||
dbf89aca74 |
@ -4,12 +4,12 @@ NODE_ENV=production
|
|||||||
VITE_DEV=false
|
VITE_DEV=false
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='https://mt.ptzykjgs.com'
|
VITE_BASE_URL=''
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||||
VITE_UPLOAD_TYPE=server
|
VITE_UPLOAD_TYPE=server
|
||||||
# 上传路径
|
# 上传路径
|
||||||
VITE_UPLOAD_URL='https://mt.ptzykjgs.com/admin-api/infra/file/upload'
|
VITE_UPLOAD_URL='http://mt.ptzykjgs.com/admin-api/infra/file/upload'
|
||||||
|
|
||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_URL=/admin-api
|
VITE_API_URL=/admin-api
|
||||||
|
@ -103,6 +103,7 @@ export const getDictLabel = (dictType: string, value: any): string => {
|
|||||||
export enum DICT_TYPE {
|
export enum DICT_TYPE {
|
||||||
USER_TYPE = 'user_type',
|
USER_TYPE = 'user_type',
|
||||||
COMMON_STATUS = 'common_status',
|
COMMON_STATUS = 'common_status',
|
||||||
|
UPLINK_MESSAGE_STATUS = 'uplink_message_status',
|
||||||
TERMINAL = 'terminal', // 终端
|
TERMINAL = 'terminal', // 终端
|
||||||
DATE_INTERVAL = 'date_interval', // 数据间隔
|
DATE_INTERVAL = 'date_interval', // 数据间隔
|
||||||
|
|
||||||
@ -227,5 +228,8 @@ export enum DICT_TYPE {
|
|||||||
// ========== TICKET - 票务系统模块 ==========
|
// ========== TICKET - 票务系统模块 ==========
|
||||||
ASSET_STATUS_TYPE = 'asset_status_type', // 设备状态
|
ASSET_STATUS_TYPE = 'asset_status_type', // 设备状态
|
||||||
TRANSACTION_TYPE_NO = 'transaction_type_no', // 交易类型(订单类型)
|
TRANSACTION_TYPE_NO = 'transaction_type_no', // 交易类型(订单类型)
|
||||||
CERTIFICATE_TYPE = 'certificate_type' // 证件类型
|
CERTIFICATE_TYPE = 'certificate_type', // 证件类型
|
||||||
|
|
||||||
|
// ========== LIFT_ROD - 远程抬杠模块 ==========
|
||||||
|
LIFTINGROD_STATUS = 'liftingrod_status'
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
<!-- <el-card style="width: 100%; margin: 8px 0; text-align: center;" shadow="never"> -->
|
<!-- <el-card style="width: 100%; margin: 8px 0; text-align: center;" shadow="never"> -->
|
||||||
<div class="flex flex-wrap gap-4" style="float: right;">
|
<div class="flex flex-wrap gap-4" style="float: right;">
|
||||||
<el-card
|
<el-card
|
||||||
style="width: 230px;margin: 8px 0;text-align: center;color:#409eff; cursor: pointer;" shadow="hover"
|
style="width: 170px;margin: 8px 0;text-align: center;color:#409eff; cursor: pointer;" shadow="hover"
|
||||||
@click="goToXXLJob">任务调度中心</el-card>
|
@click="goToXXLJob">任务调度中心</el-card>
|
||||||
</div>
|
</div>
|
||||||
<!-- </el-card> -->
|
<!-- </el-card> -->
|
||||||
@ -383,7 +383,7 @@ style="width: 230px;margin: 8px 0;text-align: center;color:#409eff; cursor: poin
|
|||||||
}
|
}
|
||||||
|
|
||||||
const goToXXLJob = async () => {
|
const goToXXLJob = async () => {
|
||||||
window.open('https://mt.ptzykjgs.com/xxl-job-admin/');
|
window.open('http://121.36.203.133/xxl-job-admin/');
|
||||||
}
|
}
|
||||||
getAllApi()
|
getAllApi()
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||||
<el-form
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading">
|
||||||
ref="formRef"
|
|
||||||
:model="formData"
|
|
||||||
:rules="formRules"
|
|
||||||
label-width="100px"
|
|
||||||
v-loading="formLoading"
|
|
||||||
>
|
|
||||||
<el-form-item label="停车场编号" prop="parkNumber">
|
<el-form-item label="停车场编号" prop="parkNumber">
|
||||||
<el-input v-model="formData.parkNumber" placeholder="请输入停车场编号" />
|
<el-input v-model="formData.parkNumber" placeholder="请输入停车场编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -26,80 +20,80 @@
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { LiftingRodApi, LiftingRodVO } from '@/api/parking/instructiondelivery/liftingrod'
|
import { LiftingRodApi, LiftingRodVO } from '@/api/parking/instructiondelivery/liftingrod'
|
||||||
|
|
||||||
/** 远程抬杠日志 表单 */
|
/** 远程抬杠日志 表单 */
|
||||||
defineOptions({ name: 'LiftingRodForm' })
|
defineOptions({ name: 'LiftingRodForm' })
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: undefined,
|
|
||||||
parkNumber: undefined,
|
|
||||||
passagewayId: undefined,
|
|
||||||
status: undefined,
|
|
||||||
})
|
|
||||||
const formRules = reactive({
|
|
||||||
parkNumber: [{ required: true, message: '停车场编号不能为空', trigger: 'blur' }],
|
|
||||||
passagewayId: [{ required: true, message: '通道Id不能为空', trigger: 'blur' }],
|
|
||||||
})
|
|
||||||
const formRef = ref() // 表单 Ref
|
|
||||||
|
|
||||||
/** 打开弹窗 */
|
|
||||||
const open = async (type: string, id?: number) => {
|
|
||||||
dialogVisible.value = true
|
|
||||||
dialogTitle.value = t('action.' + type)
|
|
||||||
formType.value = type
|
|
||||||
resetForm()
|
|
||||||
// 修改时,设置数据
|
|
||||||
if (id) {
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
formData.value = await LiftingRodApi.getLiftingRod(id)
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
||||||
|
|
||||||
/** 提交表单 */
|
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
|
||||||
const submitForm = async () => {
|
|
||||||
// 校验表单
|
|
||||||
await formRef.value.validate()
|
|
||||||
// 提交请求
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
const data = formData.value as unknown as LiftingRodVO
|
|
||||||
if (formType.value === 'create') {
|
|
||||||
await LiftingRodApi.createLiftingRod(data)
|
|
||||||
message.success(t('common.createSuccess'))
|
|
||||||
} else {
|
|
||||||
await LiftingRodApi.updateLiftingRod(data)
|
|
||||||
message.success(t('common.updateSuccess'))
|
|
||||||
}
|
|
||||||
dialogVisible.value = false
|
|
||||||
// 发送操作成功的事件
|
|
||||||
emit('success')
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置表单 */
|
|
||||||
const resetForm = () => {
|
|
||||||
formData.value = {
|
|
||||||
id: undefined,
|
id: undefined,
|
||||||
parkNumber: undefined,
|
parkNumber: undefined,
|
||||||
passagewayId: undefined,
|
passagewayId: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
|
})
|
||||||
|
const formRules = reactive({
|
||||||
|
parkNumber: [{ required: true, message: '停车场编号不能为空', trigger: 'blur' }],
|
||||||
|
passagewayId: [{ required: true, message: '通道Id不能为空', trigger: 'blur' }],
|
||||||
|
})
|
||||||
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
|
/** 打开弹窗 */
|
||||||
|
const open = async (type: string, id?: number) => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
dialogTitle.value = type == 'upload' ? "下发指令" : t('action.' + type)
|
||||||
|
formType.value = type
|
||||||
|
resetForm()
|
||||||
|
// 修改时,设置数据
|
||||||
|
if (id) {
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
formData.value = await LiftingRodApi.getLiftingRod(id)
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
/** 提交表单 */
|
||||||
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
|
const submitForm = async () => {
|
||||||
|
// 校验表单
|
||||||
|
await formRef.value.validate()
|
||||||
|
// 提交请求
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
const data = formData.value as unknown as LiftingRodVO
|
||||||
|
if (formType.value === 'create') {
|
||||||
|
await LiftingRodApi.createLiftingRod(data)
|
||||||
|
message.success('下发成功')
|
||||||
|
} else {
|
||||||
|
await LiftingRodApi.updateLiftingRod(data)
|
||||||
|
message.success(t('common.updateSuccess'))
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
|
// 发送操作成功的事件
|
||||||
|
emit('success')
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置表单 */
|
||||||
|
const resetForm = () => {
|
||||||
|
formData.value = {
|
||||||
|
id: undefined,
|
||||||
|
parkNumber: undefined,
|
||||||
|
passagewayId: undefined,
|
||||||
|
status: undefined,
|
||||||
|
}
|
||||||
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
@ -6,7 +6,7 @@
|
|||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
ref="queryFormRef"
|
ref="queryFormRef"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="68px"
|
label-width="auto"
|
||||||
>
|
>
|
||||||
<el-form-item label="停车场编号" prop="parkNumber">
|
<el-form-item label="停车场编号" prop="parkNumber">
|
||||||
<el-input
|
<el-input
|
||||||
@ -53,10 +53,10 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
@click="openForm('create')"
|
@click="openForm('upload')"
|
||||||
v-hasPermi="['parking:lifting-rod:create']"
|
v-hasPermi="['parking:lifting-rod:create']"
|
||||||
>
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 下发指令
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
@ -84,7 +84,12 @@
|
|||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
width="180px"
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="状态" align="center" prop="status" />
|
|
||||||
|
<el-table-column label="状态" align="center" prop="status" >
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.LIFTINGROD_STATUS" :value="scope.row.status" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -124,6 +129,7 @@ import { dateFormatter } from '@/utils/formatTime'
|
|||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { LiftingRodApi, LiftingRodVO } from '@/api/parking/instructiondelivery/liftingrod'
|
import { LiftingRodApi, LiftingRodVO } from '@/api/parking/instructiondelivery/liftingrod'
|
||||||
import LiftingRodForm from './LiftingRodForm.vue'
|
import LiftingRodForm from './LiftingRodForm.vue'
|
||||||
|
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
|
|
||||||
/** 远程抬杠日志 列表 */
|
/** 远程抬杠日志 列表 */
|
||||||
defineOptions({ name: 'LiftingRod' })
|
defineOptions({ name: 'LiftingRod' })
|
||||||
|
Loading…
Reference in New Issue
Block a user