吉安感知网项目-前端
罗广辉
2026-02-03 bbf6d58d453cda88220d8513e98df808a698c7c7
applications/drone-command/src/views/basicManage/deviceStock/DeviceTrackDiaLog.vue
@@ -47,7 +47,7 @@
         </el-row>
      </el-form>
      <template #footer>
         <el-button color="#2B2B4C" @click="handleCancel">{{ dialogReadonly ? '关闭' : '取消' }}</el-button>
         <el-button v-if="dialogMode != 'view'" color="#2B2B4C" @click="handleCancel">{{ dialogReadonly ? '关闭' : '取消' }}</el-button>
         <el-button
            v-if="!dialogReadonly"
            type="primary"
@@ -67,8 +67,10 @@
import { ElMessage } from 'element-plus'
import { getUserListApi } from '@/api/system/user'
import { getLazyTree } from '@/api/base/region'
import { fieldRules } from '@ztzf/utils'
import { contactPhoneRules, fieldRules } from '@ztzf/utils'
import { fwDeviceTrackSubmitApi } from '@/views/basicManage/deviceStock/fwDeviceTrackApi'
import { saveOperationLog } from '@ztzf/apis'
import { useRoute } from 'vue-router'
const initForm = () => ({
   charger: '', // 负责人
@@ -83,6 +85,7 @@
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') {
@@ -98,7 +101,7 @@
const rules = {
   charger: fieldRules(true), // 负责人
   contactPhone: fieldRules(true, 50), // 联系电话
   contactPhone: contactPhoneRules(true, 50), // 联系电话
   outTarget: fieldRules(true, 50),
   outTime: fieldRules(true),
   purpose: fieldRules(true, 50), // 用途
@@ -139,6 +142,11 @@
         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')