| | |
| | | style="width: 300px" |
| | | > |
| | | <el-option |
| | | v-for="user in userOptions" |
| | | v-for="user in userTeamOptions" |
| | | :key="user.userId" |
| | | :label="user.nickName" |
| | | :value="{ userId: user.userId, userName: user.nickName }" |
| | |
| | | |
| | | <script setup> |
| | | import { onMounted, ref, nextTick, computed } from "vue"; |
| | | import { deepClone } from "@/utils/index.js" |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { |
| | |
| | | const workOrderFilesRef = ref(null); |
| | | const reportFormRef = ref(null); |
| | | const userOptions = ref([]); |
| | | const userTeamOptions = ref([]); |
| | | const reportForm = reactive({ |
| | | planQuantity: 0, |
| | | quantity: null, |
| | |
| | | userListNoPageByTenantId() |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | userOptions.value = res.data || []; |
| | | console.log(userOptions.value) |
| | | userOptions.value.unshift({ |
| | | nickName:"任意用户", |
| | | userId:"-1", |
| | | }) |
| | | const list = Array.isArray(res.data) ? res.data : [] |
| | | userOptions.value = [ |
| | | { nickName: "任意用户", userId: "-1" }, |
| | | ...deepClone(list) |
| | | ] |
| | | userTeamOptions.value = deepClone(list) |
| | | } |
| | | }) |
| | | .catch(err => { |