| | |
| | | <template> |
| | | <el-dialog v-model="visible" :title="dialogTitle" @closed="handleClosed" destroy-on-close> |
| | | <div v-if="dialogReadonly"> |
| | | <h3>设备详情</h3> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <div>设备信息: {{ formData.deviceName }}</div> |
| | |
| | | <div>用途: {{ formData.purpose }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div>所属部门: {{ formData.belongDept }}</div> |
| | | <div>所属部门: {{ formData.belongDeptName }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div>负责人: {{ formData.charger }}</div> |
| | |
| | | <div>联系电话: {{ formData.contactPhone }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | <h3>出库去向详情</h3> |
| | | <el-table v-loading="loading" :data="list"> |
| | | <el-table-column type="index" width="60" label="序号" /> |
| | | <el-table-column prop="charger" label="用户" /> |
| | |
| | | <script setup> |
| | | import { computed, ref } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { fwDeviceDetailApi, fwDevicePageApi, fwDeviceSubmitApi } from '@/views/basicManage/deviceStock/fwDevice' |
| | | import { fwDeviceDetailApi, fwDeviceSubmitApi } from '@/views/basicManage/deviceStock/fwDevice' |
| | | import { getUserListApi } from '@/api/system/user' |
| | | import { fieldRules, getDictLabel } from '@ztzf/utils' |
| | | import { fwDeviceTrackPageApi } from '@/views/basicManage/deviceStock/fwDeviceTrackApi' |
| | |
| | | |
| | | const rules = { |
| | | deviceName: fieldRules(true, 50), |
| | | deviceType: fieldRules(true, 0), |
| | | deviceAtt: fieldRules(true, 0), |
| | | deviceType: fieldRules(true), |
| | | deviceAtt: fieldRules(true), |
| | | deviceModel: fieldRules(true, 50), |
| | | deviceSpecification: fieldRules(true, 50), |
| | | manufacturer: fieldRules(true, 50), |
| | | source: fieldRules(true, 50), |
| | | purpose: fieldRules(true, 50), |
| | | belongDept: fieldRules(true, 50), |
| | | belongDept: fieldRules(true), |
| | | contactPhone: fieldRules(true, 50), |
| | | charger: fieldRules(true, 0), |
| | | charger: fieldRules(true), |
| | | } |
| | | |
| | | const userList = ref([]) |
| | |
| | | // 打开弹框 |
| | | async function open({ mode, row } = {}) { |
| | | dialogMode.value = mode || 'add' |
| | | formData.value = row |
| | | visible.value = true |
| | | if (dialogMode.value === 'add') { |
| | | formData.value = initForm() |
| | | } else { |
| | | formData.value = row |
| | | await loadDetail() |
| | | getList() |
| | | } |