查看,编辑属性
This commit is contained in:
parent
3e6738de6e
commit
5cdcd2f9bf
|
|
@ -174,6 +174,11 @@ const maId: any = ref('')
|
|||
const editRowInfo = (row: any) => {
|
||||
settleinTitle.value = '装备编辑'
|
||||
getDetailData(row)
|
||||
if(row.devInfoProperties!=null){
|
||||
row.devInfoProperties.forEach((item:any)=>{
|
||||
propertyNamesTwo.value.push({'propertyName':item.propertyName,'propertyValue':item.propertyValue})
|
||||
})
|
||||
}
|
||||
disabledForm.value = false
|
||||
isEditDisabled.value = true
|
||||
isViewForm.value = false
|
||||
|
|
@ -183,6 +188,11 @@ const editRowInfo = (row: any) => {
|
|||
const previewRowInfo = (row: any) => {
|
||||
settleinTitle.value = '装备详情'
|
||||
getDetailData(row)
|
||||
if(row.devInfoProperties!=null){
|
||||
row.devInfoProperties.forEach((item:any)=>{
|
||||
propertyNamesTwo.value.push({'propertyName':item.propertyName,'propertyValue':item.propertyValue})
|
||||
})
|
||||
}
|
||||
disabledForm.value = true
|
||||
isEditDisabled.value = false
|
||||
isViewForm.value = true
|
||||
|
|
@ -408,9 +418,9 @@ const dialogTypeChange = () => {
|
|||
}else{
|
||||
propertyNames.value=[]
|
||||
propertyNamesTwo.value=[]
|
||||
propertyNamesTwo.value.push({'maType':null,'value':null})
|
||||
propertyNamesTwo.value.push({'propertyName':null,'propertyValue':null})
|
||||
deviceTypeList[0].data.propertyNames.forEach((item:any) =>{
|
||||
propertyNames.value.push({'maType':item,'value':null})
|
||||
propertyNames.value.push({'propertyName':item,'propertyValue':null})
|
||||
options.value.push({'label':item,'value':item})
|
||||
})
|
||||
console.log(propertyNames.value)
|
||||
|
|
@ -620,7 +630,7 @@ const submitFun = (type: any) => {
|
|||
|
||||
addAndEditForm.typeId =
|
||||
addAndEditForm.deviceTypeList[addAndEditForm.deviceTypeList.length - 1]
|
||||
|
||||
addAndEditForm.devInfoProperties = propertyNamesTwo.value;
|
||||
let SEND_FUN_API: any = null
|
||||
if (type == 1) {
|
||||
SEND_FUN_API = equipmentAddApi
|
||||
|
|
@ -639,6 +649,7 @@ const submitFun = (type: any) => {
|
|||
message: '保存成功',
|
||||
duration: 1000,
|
||||
})
|
||||
propertyNamesTwo.value = []
|
||||
dialogFormVisibleSettlein.value = false
|
||||
getList()
|
||||
}
|
||||
|
|
@ -978,18 +989,6 @@ const onDialogClose = () => {
|
|||
addAndEditFormRef.value.resetFields()
|
||||
}
|
||||
const propertyNames = ref<any>([
|
||||
// {
|
||||
// maType: 1,
|
||||
// value: 2,
|
||||
// },
|
||||
// {
|
||||
// maType: 2,
|
||||
// value: 3,
|
||||
// },
|
||||
// {
|
||||
// maType: 3,
|
||||
// value: 4,
|
||||
// },
|
||||
])
|
||||
const propertyNamesTwo = ref<any>([
|
||||
])
|
||||
|
|
@ -1010,7 +1009,7 @@ const options = ref<any>([
|
|||
|
||||
//新增属性
|
||||
const addPartItem = () => {
|
||||
propertyNamesTwo.value.push({'maType':null,'value':null});
|
||||
propertyNamesTwo.value.push({'propertyName':null,'propertyValue':null});
|
||||
}
|
||||
|
||||
const removePartItem = (index:any)=> {
|
||||
|
|
@ -1442,7 +1441,7 @@ const options = ref<any>([
|
|||
<el-col :span="14" >
|
||||
<el-form-item >
|
||||
<el-col :span="7" style="justify-content: left;">
|
||||
<el-select v-model="item.maType" placeholder="请选择" style="width: 100%">
|
||||
<el-select v-model="item.propertyName" placeholder="请选择" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
|
|
@ -1454,7 +1453,7 @@ const options = ref<any>([
|
|||
</el-col>
|
||||
<el-col :span="7" >
|
||||
<el-input
|
||||
v-model="item.value"
|
||||
v-model="item.propertyValue"
|
||||
placeholder="请输入"
|
||||
maxlength="20"
|
||||
style="width: 350px;"
|
||||
|
|
|
|||
Loading…
Reference in New Issue