| | |
| | | import { cartesian3Convert } from '@/utils/cesium/mapUtil' |
| | | import * as turf from '@turf/turf' |
| | | import * as Cesium from 'cesium' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | // 初始化表单 |
| | | const initForm = () => ({ |
| | |
| | | const selectedSceneRows = ref([]) // 选中场景 |
| | | const dictObj = inject('dictObj') |
| | | const mapRef = ref(null) |
| | | const route = useRoute() |
| | | let viewer |
| | | let drawPolygonExample |
| | | let pointList = [] |
| | |
| | | const str = [...pointList, pointList[0]].map(item => `${item.longitude} ${item.latitude}`).join(',') |
| | | formData.value.geom = `POLYGON((${str}))` |
| | | await fwDefenseZoneSubmitApi(formData.value) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '防区管理'}-${dialogMode.value === 'add' ? '新增' : '编辑'}`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import { fwDefenseZonePageApi, fwDefenseZoneRemoveApi } from './defenseZoneApi' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | // 初始化查询参数 |
| | | const initSearchParams = () => ({ |
| | |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dialogVisible = ref(false) |
| | | const route = useRoute() |
| | | |
| | | // 获取列表 |
| | | async function getList () { |
| | |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await fwDefenseZoneRemoveApi({ ids }) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '防区管理'}-删除`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | import { computed, inject, nextTick, onMounted, ref, watch } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { fwAreaDivideDetailApi, fwAreaDivideSubmitApi } from './partitionApi' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | import { fieldRules, geomAnalysis, getDictLabel } from '@ztzf/utils' |
| | | import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue' |
| | | import { DrawPolygon } from '@/utils/cesium/DrawPolygon' |
| | |
| | | const dialogMode = ref('add') // 弹框模式 |
| | | const submitting = ref(false) // 提交中 |
| | | const readonly = computed(() => dialogMode.value === 'view') |
| | | const route = useRoute() |
| | | const titleEnum = ref({ edit: '编辑区域', view: '查看区域', add: '新增区域' }) |
| | | const flyDateRange = ref([]) // 飞行时间 |
| | | const deviceTableRef = ref(null) |
| | |
| | | let str = [...pointList, pointList[0]].map(item => `${item.longitude} ${item.latitude}`).join(',') |
| | | formData.value.geom = `POLYGON((${str}))` |
| | | await fwAreaDivideSubmitApi(formData.value) |
| | | const actionText = dialogMode.value === 'add' ? '新增' : '编辑' |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '区域划分'}-${actionText}`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import { fwAreaDividePageApi, fwAreaDivideRemoveApi } from './partitionApi' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | |
| | | const initSearchParams = () => ({ |
| | |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dialogVisible = ref(false) |
| | | const route = useRoute() |
| | | |
| | | // 获取列表 |
| | | async function getList () { |
| | |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await fwAreaDivideRemoveApi({ ids }) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '区域划分'}-删除`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue' |
| | | import * as Cesium from 'cesium' |
| | | import axios from 'axios' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | address: '', // 位置 |
| | |
| | | const titleEnum = ref({ edit: '编辑', view: '查看', add: '新增' }) |
| | | const tempLocation = ref({ longitude: null, latitude: null }) |
| | | const mapRef = ref(null) |
| | | const route = useRoute() |
| | | |
| | | const rules = { |
| | | address: fieldRules(true, 50), |
| | |
| | | submitting.value = true |
| | | try { |
| | | await fwPoliceStationSubmitApi(formData.value) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '派出所管理'}-${dialogMode.value === 'add' ? '新增' : '编辑'}`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { fwPoliceStationPageApi, fwPoliceStationRemoveApi } from './precinctInfoApi' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initSearchParams = () => ({ |
| | | stationName: '', // 名称 |
| | |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dialogVisible = ref(false) |
| | | const route = useRoute() |
| | | |
| | | // 获取列表 |
| | | async function getList () { |
| | |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await fwPoliceStationRemoveApi({ ids }) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '派出所管理'}-删除`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | import { fwAreaDivideDetailApi, fwAreaDivideListApi } from '../partition/partitionApi' |
| | | import { DrawPolygon } from '@/utils/cesium/DrawPolygon' |
| | | import commandPost from '@/assets/images/dataCockpit/legend/command-post.png' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | sceneName: '', // 场景名称 |
| | |
| | | const selectedAreaRows = ref([]) //选中列表 |
| | | const dictObj = inject('dictObj') |
| | | const mapRef = ref(null) |
| | | const route = useRoute() |
| | | let viewer |
| | | let redPointEntity |
| | | let leftClickBound = false |
| | |
| | | formData.value.areaCount = ids.length |
| | | formData.value.defenseArea = calcDefenseArea(selectedAreaRows.value) |
| | | await fwDefenseSceneSubmitApi(formData.value) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '场景配置管理'}-${dialogMode.value === 'add' ? '新增' : '编辑'}`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initSearchParams = () => ({ |
| | | sceneName: '', // 场景名称 |
| | |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dialogVisible = ref(false) |
| | | const route = useRoute() |
| | | |
| | | // 获取列表 |
| | | async function getList() { |
| | |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await fwDefenseSceneRemoveApi({ ids }) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '场景配置管理'}-删除`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | import { fieldRules } from '@ztzf/utils' |
| | | import { fwDeviceScrapSaveApi } from '@/views/basicManage/deviceStock/fwDeviceScrapApi' |
| | | import dayjs from 'dayjs' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | deviceId: '', // 设备ID |
| | |
| | | const visible = ref(false) // 弹框显隐 |
| | | const dialogMode = ref('add') // 弹框模式 |
| | | const submitting = ref(false) |
| | | const route = useRoute() |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const dialogTitle = computed(() => { |
| | | if (dialogMode.value === 'edit') { |
| | |
| | | try { |
| | | formData.value.scrapTime = dayjs().format('YYYY-MM-DD HH:mm:ss') |
| | | await fwDeviceScrapSaveApi(formData.value) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '设备出入库'}-报废`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success('报废成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import { getLazyTree } from '@/api/base/region' |
| | | import { fieldRules } from '@ztzf/utils' |
| | | import { fwDeviceTrackSubmitApi } from '@/views/basicManage/deviceStock/fwDeviceTrackApi' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | charger: '', // 负责人 |
| | |
| | | const visible = ref(false) // 弹框显隐 |
| | | const dialogMode = ref('add') // 弹框模式 |
| | | const submitting = ref(false) |
| | | const route = useRoute() |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const dialogTitle = computed(() => { |
| | | if (dialogMode.value === 'edit') { |
| | |
| | | outTarget: selected?.label ?? formData.value.outTarget, |
| | | } |
| | | await fwDeviceTrackSubmitApi(payload) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '设备出入库'}-出库`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success('出库成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import { getUserListApi } from '@/api/system/user' |
| | | import { fieldRules, getDictLabel } from '@ztzf/utils' |
| | | import { fwDeviceTrackPageApi } from '@/views/basicManage/deviceStock/fwDeviceTrackApi' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | belongDept: '', // 所属部门 |
| | |
| | | const dictObj = inject('dictObj') |
| | | const deptTree = inject('deptTree') |
| | | const emit = defineEmits(['success']) |
| | | const route = useRoute() |
| | | const formRef = ref(null) // 表单实例 |
| | | const formData = ref(initForm()) // 表单数据 |
| | | const visible = ref(false) // 弹框显隐 |
| | |
| | | submitting.value = true |
| | | try { |
| | | await fwDeviceSubmitApi(formData.value) |
| | | const actionText = dialogMode.value === 'add' ? '建档' : '编辑' |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '设备出入库'}-${actionText}`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import { ElMessage } from 'element-plus' |
| | | import { fieldRules, getDictLabel } from '@ztzf/utils' |
| | | import { fwDeviceMaintainRecordPageApi } from '@/views/basicManage/maintainRecord/fwDeviceMaintainRecord' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | import { |
| | | fwDeviceMaintainPlanDetailApi, |
| | | fwDeviceMaintainPlanSubmitApi, |
| | |
| | | const deviceList = ref([]) // 设备列表 |
| | | const getPlanCycleLabel = inject('getPlanCycleLabel') |
| | | const dictObj = inject('dictObj') |
| | | const route = useRoute() |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const titleEnum = ref({ edit: '编辑', view: '查看', add: '维护计划' }) |
| | | |
| | |
| | | )], |
| | | } |
| | | await fwDeviceMaintainPlanSubmitApi(payload) |
| | | const actionText = dialogMode.value === 'add' ? '维护计划-新增' : '维护计划-编辑' |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '维护记录管理'}-${actionText}`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import { fieldRules } from '@ztzf/utils' |
| | | import { fwDeviceMaintainRecordSubmitApi } from '@/views/basicManage/maintainRecord/fwDeviceMaintainRecord' |
| | | import { fwDeviceMaintainPlanDetailApi } from '@/views/basicManage/maintainRecord/maintainRecordApi' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | deviceId: '', |
| | |
| | | const dialogMode = ref('add') // 弹框模式 |
| | | const submitting = ref(false) // 提交中 |
| | | const deviceList = ref([]) // 设备列表 |
| | | const route = useRoute() |
| | | |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const titleEnum = ref({ edit: '维护', view: '查看', add: '维护计划' }) |
| | |
| | | try { |
| | | formData.value.maintainTime = dayjs().format('YYYY-MM-DD HH:mm:ss') |
| | | await fwDeviceMaintainRecordSubmitApi(formData.value) |
| | | const actionText = dialogMode.value === 'add' ? '维护-新增' : '维护-编辑' |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '维护记录管理'}-${actionText}`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import MaintenanceDiaLog from '@/views/basicManage/maintainRecord/MaintenanceDiaLog.vue' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | import { |
| | | fwDeviceMaintainPlanPageApi, |
| | | fwDeviceMaintainPlanRemoveApi, |
| | |
| | | deviceAtt: [], // 设备属性 |
| | | }) |
| | | provide('dictObj', dictObj) |
| | | const route = useRoute() |
| | | const deptTree = ref([]) // 部门树 |
| | | const treeProps = { |
| | | label: 'name', |
| | |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await fwDeviceMaintainPlanRemoveApi({ ids }) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '维护记录管理'}-删除`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | import { fieldRules } from '@ztzf/utils' |
| | | import { PublicCesium } from '@/utils/cesium/publicCesium' |
| | | import * as Cesium from 'cesium' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | // 初始化表单 |
| | | const initForm = () => ({ |
| | |
| | | const areaList = ref([]) // 区域列表 |
| | | const sceneList = ref([]) // 场景列表 |
| | | const deviceStatus = ref('') |
| | | const route = useRoute() |
| | | |
| | | const rules = { |
| | | deviceId: fieldRules(true), |
| | |
| | | formData.value.dispatchEndTime = formData.value.dispatchDateRange[1] |
| | | } |
| | | await fwTaskScheduleSubmitApi(formData.value) |
| | | |
| | | const actionText = dialogMode.value === 'add' ? '新增' : '修改' |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '任务调度'}-${actionText}`, |
| | | type: 1 |
| | | }) |
| | | |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | // 初始化查询参数 |
| | | const initSearchParams = () => ({ |
| | |
| | | deviceStatus: [], // 设备状态 |
| | | }) |
| | | const deviceList = ref([]) // 设备列表 |
| | | const route = useRoute() |
| | | |
| | | // 注入字典到子组件 |
| | | provide('dictObj', dictObj) |
| | |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await fwTaskScheduleRemoveApi({ ids }) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '任务调度'}-删除`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | import { add, getDept, getDeptTree, update } from '@/api/system/dept' |
| | | import { getLazyTree } from '@/api/base/region' |
| | | import { fieldRules, getDictLabel } from '@ztzf/utils' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | deptName: '', |
| | |
| | | const visible = ref(false) |
| | | const dialogMode = ref('add') |
| | | const submitting = ref(false) |
| | | const isAddChild = ref(false) |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const route = useRoute() |
| | | const dialogTitle = computed(() => { |
| | | if (dialogMode.value === 'edit') return '编辑' |
| | | if (dialogMode.value === 'view') return '查看' |
| | |
| | | } else { |
| | | await add(payload) |
| | | } |
| | | const actionText = dialogMode.value === 'add' ? (isAddChild.value ? '新增子项' : '新增') : '编辑' |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '部门管理'}-${actionText}`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | |
| | | function handleClosed() { |
| | | formData.value = initForm() |
| | | isAddChild.value = false |
| | | } |
| | | |
| | | async function open({ mode, row, parent } = {}) { |
| | | dialogMode.value = mode || 'add' |
| | | visible.value = true |
| | | isAddChild.value = mode === 'add' && !!parent?.id |
| | | await getDeptTree().then(res => { |
| | | if (deptTree) { |
| | | deptTree.value = res?.data?.data ?? [] |
| | |
| | | import { getChildLazyTree, getDeptTree, getLazyList, remove } from '@/api/system/dept' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initSearchParams = () => ({ |
| | | deptName: '', |
| | |
| | | org_nature: [], |
| | | }) |
| | | const deptTree = ref([]) |
| | | const route = useRoute() |
| | | |
| | | provide('dictObj', dictObj) |
| | | provide('deptTree', deptTree) |
| | |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await remove(ids) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '部门管理'}-删除`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | import { ElMessage } from 'element-plus' |
| | | import { add, getRoleTreeById, update } from '@/api/system/role' |
| | | import { fieldRules } from '@ztzf/utils' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | roleName: '', |
| | |
| | | const dialogMode = ref('add') |
| | | const submitting = ref(false) |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const route = useRoute() |
| | | const dialogTitle = computed(() => { |
| | | if (dialogMode.value === 'edit') return '编辑' |
| | | if (dialogMode.value === 'view') return '查看' |
| | |
| | | try { |
| | | if (dialogMode.value === 'edit') { |
| | | await update(formData.value) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '角色管理'}-编辑`, |
| | | type: 1, |
| | | }) |
| | | } else { |
| | | await add(formData.value) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '角色管理'}-新增`, |
| | | type: 1, |
| | | }) |
| | | } |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | |
| | | <script setup> |
| | | import { ref } from 'vue' |
| | | import { grant, grantTree, getRole } from '@/api/system/role' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const visible = ref(false) |
| | | const roleId = ref('') |
| | |
| | | const droneControl = ref(null) |
| | | |
| | | const emit = defineEmits(['success']) |
| | | const route = useRoute() |
| | | |
| | | function resetState() { |
| | | menuGrantList.value = [] |
| | |
| | | [], |
| | | [] |
| | | ).then(() => { |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '角色管理'}-权限设置`, |
| | | type: 1, |
| | | }) |
| | | visible.value = false |
| | | emit('success') |
| | | }) |
| | |
| | | import { useStore } from 'vuex' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import RolePermissionDialog from './RolePermissionDialog.vue' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initSearchParams = () => ({ |
| | | roleName: '', |
| | |
| | | const roleDialogRef = ref(null) |
| | | const store = useStore() |
| | | const userInfo = computed(() => store.getters.userInfo || {}) |
| | | const route = useRoute() |
| | | |
| | | async function loadList() { |
| | | loading.value = true |
| | |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await remove(ids) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '角色管理'}-删除`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | loadList() |
| | |
| | | import { getDeptTree } from '@/api/system/dept' |
| | | import { getRoleTree } from '@/api/system/role' |
| | | import func from '@/utils/func' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initForm = () => ({ |
| | | account: '', |
| | |
| | | }) |
| | | const roleTree = ref([]) |
| | | const deptTree = ref([]) |
| | | const route = useRoute() |
| | | |
| | | const validatePass = (rule, value, callback) => { |
| | | if (value === '') { |
| | |
| | | submitData.name = submitData.realName |
| | | if (dialogMode.value === 'add') { |
| | | await add(submitData) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '用户管理'}-新增`, |
| | | type: 1 |
| | | }) |
| | | } else { |
| | | await update(submitData) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '用户管理'}-编辑`, |
| | | type: 1 |
| | | }) |
| | | } |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | |
| | | import { getList as getUserList, remove } from '@/api/system/user' |
| | | import { useStore } from 'vuex' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initSearchParams = () => ({ |
| | | account: '', |
| | |
| | | } |
| | | const store = useStore() |
| | | const permission = computed(() => store.getters.permission || {}) |
| | | const route = useRoute() |
| | | |
| | | async function getList() { |
| | | loading.value = true |
| | |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await remove(ids) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '用户管理'}-删除`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | import { exportFwDroneAlarmRecordApi, fwDroneAlarmRecordPageApi } from './fwDroneAlarmRecord' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { blobDownload, dateRangeFormat, getDictLabel } from '@ztzf/utils' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const initSearchParams = () => ({ |
| | | droneName: '', // 无人机名称 |
| | |
| | | }) |
| | | const dateRange = ref([]) |
| | | const exportLoading = ref(false) |
| | | const route = useRoute() |
| | | const deviceTypeMap = computed(() => { |
| | | const map = new Map() |
| | | dictObj.value.deviceType.forEach(item => { |
| | |
| | | exportLoading.value = true |
| | | exportFwDroneAlarmRecordApi({ ids: selectedIds.value.join(',') }) |
| | | .then(res => { |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '报警记录'}-导出`, |
| | | type: 1, |
| | | }) |
| | | blobDownload(res) |
| | | }) |
| | | .finally(() => { |
| | |
| | | import { onMounted, ref, nextTick } from 'vue' |
| | | import { exportFwDroneFlightRecordApi, fwDroneFlightRecordPageApi } from './fwDroneFlightRecord' |
| | | import { blobDownload, dateRangeFormat } from '@ztzf/utils' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | import TrajectoryDiaLog from '@/views/recordManage/historyTracks/TrajectoryDiaLog.vue' |
| | | |
| | | const initSearchParams = () => ({ |
| | |
| | | const dateRange = ref([]) |
| | | const exportLoading = ref(false) |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const route = useRoute() |
| | | |
| | | // 获取列表 |
| | | async function getList() { |
| | |
| | | ids: ids.join(','), |
| | | }) |
| | | .then(res => { |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '历史轨迹'}-导出`, |
| | | type: 1, |
| | | }) |
| | | blobDownload(res) |
| | | }) |
| | | .finally(() => { |
| | |
| | | import { getDeptTree } from '@/api/system/dept' |
| | | import { getRoleTree } from '@/api/system/role' |
| | | import func from '@/utils/func' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | // 初始化表单 |
| | | const initForm = () => ({ |
| | |
| | | const titleEnum = ref({ edit: '编辑用户', view: '查看用户', add: '新增用户' }) |
| | | const roleTree = ref([]) |
| | | const deptTree = ref([]) |
| | | const route = useRoute() |
| | | |
| | | // 密码验证 |
| | | const validatePass = (rule, value, callback) => { |
| | |
| | | |
| | | if (dialogMode.value === 'add') { |
| | | await add(submitData) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '用户管理01'}-新增`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success('新增成功') |
| | | } else { |
| | | await update(submitData) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '用户管理01'}-编辑`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success('更新成功') |
| | | } |
| | | visible.value = false |
| | |
| | | import NProgress from 'nprogress' |
| | | import 'nprogress/nprogress.css' |
| | | import func from '@/utils/func' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | const store = useStore() |
| | | const userInfo = computed(() => store.getters.userInfo) |
| | |
| | | const dialogVisible = ref(false) |
| | | const auditMode = ref(false) |
| | | const treeDeptId = ref('') |
| | | const route = useRoute() |
| | | |
| | | // 部门树 |
| | | const deptTree = ref([]) |
| | |
| | | await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', { type: 'warning' }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await remove(ids) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '用户管理01'}-删除`, |
| | | type: 1 |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |