Merge branch 'main' into dev-sy
This commit is contained in:
commit
33ba6cb863
|
|
@ -124,6 +124,16 @@
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" prop="qcTime" label="合同附件">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<a
|
||||||
|
:href="row.url"
|
||||||
|
target="_blank"
|
||||||
|
style="color: #00a288; text-decoration: underline"
|
||||||
|
>查看</a
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="publishUser" label="创建时间" />
|
<el-table-column align="center" prop="publishUser" label="创建时间" />
|
||||||
<el-table-column align="center" prop="orderUser" label="更新时间" />
|
<el-table-column align="center" prop="orderUser" label="更新时间" />
|
||||||
<el-table-column align="center" label="操作" :width="220">
|
<el-table-column align="center" label="操作" :width="220">
|
||||||
|
|
@ -157,7 +167,7 @@
|
||||||
:total="total"
|
:total="total"
|
||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
<!-- 装备弹框 -->
|
<!-- 新增和修改弹框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="dialogVisibleSettlein"
|
v-model="dialogVisibleSettlein"
|
||||||
:title="settleinTitle"
|
:title="settleinTitle"
|
||||||
|
|
|
||||||
|
|
@ -71,12 +71,6 @@ const getSelectId = (list: any, id: any) => {
|
||||||
for (let i in list) {
|
for (let i in list) {
|
||||||
if (list[i].id == id) {
|
if (list[i].id == id) {
|
||||||
//查询到就返回该数组对象的value
|
//查询到就返回该数组对象的value
|
||||||
console.log('21',list[i].propertyNames)
|
|
||||||
if( list[i].propertyNames!=null){
|
|
||||||
list[i].propertyNames.forEach((item:any) =>{
|
|
||||||
options.value.push({'label':item,'value':item})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return [list[i].id]
|
return [list[i].id]
|
||||||
}
|
}
|
||||||
if (list[i].children) {
|
if (list[i].children) {
|
||||||
|
|
@ -180,11 +174,7 @@ const maId: any = ref('')
|
||||||
const editRowInfo = (row: any) => {
|
const editRowInfo = (row: any) => {
|
||||||
settleinTitle.value = '装备编辑'
|
settleinTitle.value = '装备编辑'
|
||||||
getDetailData(row)
|
getDetailData(row)
|
||||||
if(row.devInfoProperties!=null){
|
|
||||||
row.devInfoProperties.forEach((item:any)=>{
|
|
||||||
propertyNamesTwo.value.push({'propertyName':item.propertyName,'propertyValue':item.propertyValue})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
disabledForm.value = false
|
disabledForm.value = false
|
||||||
isEditDisabled.value = true
|
isEditDisabled.value = true
|
||||||
isViewForm.value = false
|
isViewForm.value = false
|
||||||
|
|
@ -291,11 +281,7 @@ const getDetailData = async (row: any) => {
|
||||||
descriptionFormList.value[0].examinationPdfs = examinationPdf
|
descriptionFormList.value[0].examinationPdfs = examinationPdf
|
||||||
options.value=[]
|
options.value=[]
|
||||||
addAndEditForm.deviceTypeList = getSelectId(deviceTypeTree.value, addAndEditForm.typeId)
|
addAndEditForm.deviceTypeList = getSelectId(deviceTypeTree.value, addAndEditForm.typeId)
|
||||||
if(res.devInfoProperties!=null){
|
propertyNames.value = addAndEditForm.devInfoProperties
|
||||||
res.devInfoProperties.forEach((item:any)=>{
|
|
||||||
propertyNamesTwo.value.push({'propertyName':item.propertyName,'propertyValue':item.propertyValue})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// addAndEditForm.deviceTypeList[0].data.propertyNames.forEach((item:any) =>{
|
// addAndEditForm.deviceTypeList[0].data.propertyNames.forEach((item:any) =>{
|
||||||
// options.value.push({'label':item,'value':item})
|
// options.value.push({'label':item,'value':item})
|
||||||
// })
|
// })
|
||||||
|
|
@ -426,17 +412,14 @@ const dialogTypeCascader = ref()
|
||||||
// equipmentDeploymentParams.value.deviceCount = 1
|
// equipmentDeploymentParams.value.deviceCount = 1
|
||||||
// countDisabled.value = true
|
// countDisabled.value = true
|
||||||
// }
|
// }
|
||||||
console.log('deviceTypeList',deviceTypeList[0].data.propertyNames)
|
console.log('deviceTypeList',deviceTypeList[0].data.maTypeProperties)
|
||||||
if(deviceTypeList[0].data.propertyNames==null){
|
if(deviceTypeList[0].data.maTypeProperties==null){
|
||||||
propertyNames.value=[]
|
propertyNames.value=[]
|
||||||
propertyNamesTwo.value=[]
|
|
||||||
}else{
|
}else{
|
||||||
propertyNames.value=[]
|
propertyNames.value=[]
|
||||||
propertyNamesTwo.value=[]
|
propertyNames.value = deviceTypeList[0].data.maTypeProperties;
|
||||||
propertyNamesTwo.value.push({'propertyName':null,'propertyValue':null})
|
deviceTypeList[0].data.maTypeProperties.forEach((item:any) =>{
|
||||||
deviceTypeList[0].data.propertyNames.forEach((item:any) =>{
|
options.value.push({'label':item.propertyName,'value':item.propertyName})
|
||||||
propertyNames.value.push({'propertyName':item,'propertyValue':null})
|
|
||||||
options.value.push({'label':item,'value':item})
|
|
||||||
})
|
})
|
||||||
console.log(propertyNames.value)
|
console.log(propertyNames.value)
|
||||||
}
|
}
|
||||||
|
|
@ -539,6 +522,27 @@ const equipRules = ref({
|
||||||
// ],
|
// ],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const getProertyNameRules = (item:any)=>{
|
||||||
|
if(item.mustHave ==1){
|
||||||
|
return [
|
||||||
|
{required: true, message: '请输入属性描述',trigger: 'blur',}
|
||||||
|
]
|
||||||
|
}else{
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getProertyValueRules = (item:any)=>{
|
||||||
|
if(item.mustHave ==1){
|
||||||
|
return [
|
||||||
|
{required: true, message: '请输入属性值',trigger: 'blur',}
|
||||||
|
]
|
||||||
|
}else{
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const descriptionRules = ref({
|
const descriptionRules = ref({
|
||||||
insurancePdfs: [{ required: true, message: '请上传合格证', trigger: 'change' }],
|
insurancePdfs: [{ required: true, message: '请上传合格证', trigger: 'change' }],
|
||||||
examinationPdfs: [{ required: true, message: '请上传检测证明', trigger: 'change' }],
|
examinationPdfs: [{ required: true, message: '请上传检测证明', trigger: 'change' }],
|
||||||
|
|
@ -641,9 +645,10 @@ const submitFun = (type: any) => {
|
||||||
|
|
||||||
if (isDescription) return
|
if (isDescription) return
|
||||||
|
|
||||||
|
addAndEditForm.devInfoProperties = propertyNames.value;
|
||||||
addAndEditForm.typeId =
|
addAndEditForm.typeId =
|
||||||
addAndEditForm.deviceTypeList[addAndEditForm.deviceTypeList.length - 1]
|
addAndEditForm.deviceTypeList[addAndEditForm.deviceTypeList.length - 1]
|
||||||
addAndEditForm.devInfoProperties = propertyNamesTwo.value;
|
|
||||||
let SEND_FUN_API: any = null
|
let SEND_FUN_API: any = null
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
SEND_FUN_API = equipmentAddApi
|
SEND_FUN_API = equipmentAddApi
|
||||||
|
|
@ -662,7 +667,7 @@ const submitFun = (type: any) => {
|
||||||
message: '保存成功',
|
message: '保存成功',
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
})
|
})
|
||||||
propertyNamesTwo.value = []
|
propertyNames.value = []
|
||||||
dialogFormVisibleSettlein.value = false
|
dialogFormVisibleSettlein.value = false
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
@ -683,13 +688,16 @@ const saveTemp = async () => {
|
||||||
/* 关闭按钮 */
|
/* 关闭按钮 */
|
||||||
const closeDialogBtn = () => {
|
const closeDialogBtn = () => {
|
||||||
// ruleFormRef.value.resetFields()
|
// ruleFormRef.value.resetFields()
|
||||||
|
propertyNames.value = []
|
||||||
|
// 获取装备树
|
||||||
|
getTypeTreeData()
|
||||||
dialogFormVisibleSettlein.value = false
|
dialogFormVisibleSettlein.value = false
|
||||||
}
|
}
|
||||||
/* 关闭对话框 */
|
/* 关闭对话框 */
|
||||||
const handleClose = (done: () => void) => {
|
const handleClose = (done: () => void) => {
|
||||||
// ruleFormRef.value.resetFields()
|
// ruleFormRef.value.resetFields()
|
||||||
done()
|
done()
|
||||||
propertyNamesTwo.value = []
|
propertyNames.value = []
|
||||||
dialogFormVisibleSettlein.value = false
|
dialogFormVisibleSettlein.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -726,6 +734,7 @@ const successResultCallBackFnDevicePic = (val: any) => {
|
||||||
|
|
||||||
const mainFileList: any = ref([]) //主展示
|
const mainFileList: any = ref([]) //主展示
|
||||||
const detailsFileList: any = ref([]) //详情展示
|
const detailsFileList: any = ref([]) //详情展示
|
||||||
|
const maTypeProperties: any = ref([]) //属性
|
||||||
const insurancePdf: any = ref([]) //合格证
|
const insurancePdf: any = ref([]) //合格证
|
||||||
const examinationPdf: any = ref([]) //检测证明
|
const examinationPdf: any = ref([]) //检测证明
|
||||||
//图片查看弹窗
|
//图片查看弹窗
|
||||||
|
|
@ -891,6 +900,7 @@ const addAndEditForm = reactive<any>({
|
||||||
examinationPdf: [],
|
examinationPdf: [],
|
||||||
insurancePdfs: [],
|
insurancePdfs: [],
|
||||||
examinationPdfs: [],
|
examinationPdfs: [],
|
||||||
|
devInfoProperties:[],
|
||||||
})
|
})
|
||||||
const addAndEditFormTemp = reactive<any>({
|
const addAndEditFormTemp = reactive<any>({
|
||||||
deviceName: '',
|
deviceName: '',
|
||||||
|
|
@ -1006,31 +1016,8 @@ const propertyNames = ref<any>([
|
||||||
])
|
])
|
||||||
const propertyNamesTwo = ref<any>([
|
const propertyNamesTwo = ref<any>([
|
||||||
])
|
])
|
||||||
const options = ref<any>([
|
const options = ref<any>([])
|
||||||
// {
|
|
||||||
// label:'重量',
|
|
||||||
// value:1
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label:'宽度',
|
|
||||||
// value:2
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label:'长度',
|
|
||||||
// value:3
|
|
||||||
// }
|
|
||||||
])
|
|
||||||
|
|
||||||
//新增属性
|
|
||||||
const addPartItem = () => {
|
|
||||||
propertyNamesTwo.value.push({'propertyName':null,'propertyValue':null});
|
|
||||||
}
|
|
||||||
|
|
||||||
const removePartItem = (index:any)=> {
|
|
||||||
if (propertyNamesTwo.value.length > 1) {
|
|
||||||
propertyNamesTwo.value.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -1445,27 +1432,27 @@ const options = ref<any>([
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row> -->
|
</el-row> -->
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in propertyNamesTwo"
|
v-for="(item, index) in propertyNames"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
:model="item"
|
||||||
class="dynamic-item"
|
class="dynamic-item"
|
||||||
>
|
>
|
||||||
<el-row :gutter="20" style="display: flex;margin-top:10px;justify-content: left;">
|
<el-row :gutter="20" style="display: flex;margin-top:10px;justify-content: left;">
|
||||||
<el-col :span="14" >
|
<el-col :span="12" >
|
||||||
<el-form-item >
|
<el-form-item label="属性描述:">
|
||||||
<el-col :span="7" style="justify-content: left;">
|
<el-input
|
||||||
<el-select v-model="item.propertyName" placeholder="请选择" style="width: 100%">
|
v-model="item.propertyName"
|
||||||
<el-option
|
placeholder="请输入"
|
||||||
v-for="item in options"
|
maxlength="20"
|
||||||
:key="item.value"
|
style="width: 350px;"
|
||||||
:label="item.label"
|
disabled
|
||||||
:value="item.value"
|
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-input>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7" >
|
<el-col :span="12" >
|
||||||
|
<el-form-item label="属性值:" :rules="getProertyValueRules(item)" :prop="item.propertyValue">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="item.propertyValue"
|
v-model="item.propertyValue"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
|
@ -1473,24 +1460,7 @@ const options = ref<any>([
|
||||||
style="width: 350px;"
|
style="width: 350px;"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col
|
|
||||||
:span="6"
|
|
||||||
style="
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div style="">
|
|
||||||
<el-button @click="addPartItem" type="success"> 新增属性</el-button>
|
|
||||||
<el-button @click="removePartItem(index)" v-if="index != 0" type="danger">
|
|
||||||
删除属性</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue