[feat]新增耗材下拉框默认选项
This commit is contained in:
parent
f409897097
commit
bdf8c4c2ab
@ -59,7 +59,7 @@
|
|||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="负责人" prop="chargeUser">
|
<el-form-item label="负责人" prop="chargeUser">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.chargeUser"
|
v-model="queryParams.chargeUser"
|
||||||
placeholder="请选择负责人"
|
placeholder="请选择负责人"
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
>
|
>
|
||||||
@ -212,7 +212,7 @@
|
|||||||
label-width="120px"
|
label-width="120px"
|
||||||
>
|
>
|
||||||
<el-form-item label="设备" prop="equipmentId">
|
<el-form-item label="设备" prop="equipmentId">
|
||||||
<el-select v-model="form.equipmentId" placeholder="请选择设备">
|
<el-select v-model="form.equipmentId" placeholder="请选择设备" disabled>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in equipmentOptions"
|
v-for="item in equipmentOptions"
|
||||||
:key="item.equipmentId"
|
:key="item.equipmentId"
|
||||||
@ -309,6 +309,8 @@ import {
|
|||||||
} from "@/api/equipments/consumables";
|
} from "@/api/equipments/consumables";
|
||||||
import { optionSelect as getEquipmentOptionSelect } from "@/api/equipments/equipments";
|
import { optionSelect as getEquipmentOptionSelect } from "@/api/equipments/equipments";
|
||||||
import { userOptionsSelect as getUserOptionSelect } from "@/api/system/user";
|
import { userOptionsSelect as getUserOptionSelect } from "@/api/system/user";
|
||||||
|
import useUserStore from '@/store/modules/user';
|
||||||
|
import { ref } from "vue";
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
const consumablesList = ref([]);
|
const consumablesList = ref([]);
|
||||||
@ -321,7 +323,6 @@ const single = ref(true);
|
|||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
const defaultEquipment = ref("");
|
|
||||||
const equipmentOptions = ref([]);
|
const equipmentOptions = ref([]);
|
||||||
const userOptions = ref([]);
|
const userOptions = ref([]);
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@ -329,6 +330,10 @@ const { sys_time_unit, consumable_status } = proxy.useDict(
|
|||||||
"sys_time_unit",
|
"sys_time_unit",
|
||||||
"consumable_status"
|
"consumable_status"
|
||||||
);
|
);
|
||||||
|
const defaultEquipment = ref("");
|
||||||
|
const defaultValidityUint = ref("M");
|
||||||
|
const defaultStatus = ref("0");
|
||||||
|
const defaultChargeUser = useUserStore().id;
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
@ -440,6 +445,7 @@ function handleQuery() {
|
|||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
proxy.resetForm("queryRef");
|
proxy.resetForm("queryRef");
|
||||||
|
queryParams.value.equipmentId = defaultEquipment;
|
||||||
handleQuery();
|
handleQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,6 +461,10 @@ function handleAdd() {
|
|||||||
reset();
|
reset();
|
||||||
open.value = true;
|
open.value = true;
|
||||||
title.value = "添加设备耗材";
|
title.value = "添加设备耗材";
|
||||||
|
form.value.equipmentId = queryParams.value.equipmentId;
|
||||||
|
form.value.status = defaultStatus;
|
||||||
|
form.value.validityUint = defaultValidityUint;
|
||||||
|
form.value.chargeUser = defaultChargeUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
|
|||||||
@ -75,8 +75,8 @@ const router = useRouter();
|
|||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
const loginForm = ref({
|
const loginForm = ref({
|
||||||
username: "admin",
|
username: "",
|
||||||
password: "admin123",
|
password: "",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: "",
|
code: "",
|
||||||
uuid: ""
|
uuid: ""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user