问题修改

This commit is contained in:
zhujiyan
2024-05-23 16:36:32 +08:00
parent 5985a3c153
commit 42109a1478
3 changed files with 40 additions and 28 deletions

View File

@@ -145,7 +145,7 @@
<el-option
v-for="(item, index) in userNameList"
:key="index"
:label="item.name"
:label="item.projectName"
:value="item.id"
></el-option>
</el-select>
@@ -544,12 +544,7 @@ const getSelectableList = () => {
let obj = {}
getList(obj).then(res => {
projectList.value = res.data
res.data.map(item => {
userNameList.value.push({
name:item?.projectName,
id:item?.id
})
})
userNameList.value= res.data;
//初始化
let obj = res.data[0]
form.value = {
@@ -600,7 +595,7 @@ const resetForm = () => {
userStatus: userStateList[1].id, //用户状态
monitoringTerminalCode: monitoringTerminalList.value[0]?.monitoringTerminalCode, //关联设备
monitoringTerminalName: monitoringTerminalList.value[0]?.monitoringTerminalName,
userName: '', //工程名称
userName: projectList.value[0]?.id, //工程名称
userId: '', //工程id
//监测点信息实体
@@ -662,7 +657,7 @@ const changeLoadType = async () => {
//选择关联干扰源回显数据
const changeUserName = () => {
let obj = projectList.value.find(item => {
return form.value.reporter == item.reporter
return form.value.userName == item.id
})
form.value = {
...form.value,
@@ -676,7 +671,6 @@ const changeUserName = () => {
userId: obj?.id,
expectedProductionDate: obj?.expectedProductionDate
}
console.log(obj, '选择关联干扰源回显数据')
}
//定义校验规则
@@ -996,10 +990,10 @@ defineExpose({ open })
</script>
<style lang="scss" scoped>
.el-form {
// width: 96%;
width: 96%;
height: 400px;
margin: 0 auto;
// overflow-y: auto;
overflow-y: auto;
padding-top: 20px;
}
.dialog-footer {