台账管理页面修改
This commit is contained in:
parent
41d92dd90f
commit
1d070e8054
|
|
@ -360,3 +360,11 @@ export const getDevDetailsApi = (data) => {
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取特征值
|
||||||
|
export const getConfigApi = (data) => {
|
||||||
|
return request({
|
||||||
|
url: `/material-mall/equipment/field/getConfig`,
|
||||||
|
method: 'GET',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,14 @@
|
||||||
<el-input v-model="form.propertyUnit" placeholder="产权单位" readonly/>
|
<el-input v-model="form.propertyUnit" placeholder="产权单位" readonly/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
<el-col :span="6" v-for="(item, index) in form.fieldVoList" :key="index">
|
||||||
|
<el-form-item :label="item.propertyName" >
|
||||||
|
<el-input v-model="item.propertyValue" readonly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<div style="display: flex; padding-bottom: 10px">
|
<div style="display: flex; padding-bottom: 10px">
|
||||||
|
|
@ -303,7 +311,7 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="装备二维码" prop="">
|
<el-form-item label="装备二维码111" prop="">
|
||||||
<div class="qrcode-box" style="width: 150px;height: 150px">
|
<div class="qrcode-box" style="width: 150px;height: 150px">
|
||||||
<QrcodeGenerator
|
<QrcodeGenerator
|
||||||
ref="qr3"
|
ref="qr3"
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -346,6 +346,64 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 动态生成 fieldVoList 列 -->
|
||||||
|
<el-table-column
|
||||||
|
v-for="(item, index) in fieldVoList"
|
||||||
|
:key="index"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
:label="item.propertyName"
|
||||||
|
:prop="item.propertyCode"
|
||||||
|
min-width="200px"
|
||||||
|
>
|
||||||
|
<!-- <template v-slot="{ row }">
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
(index + 1) % 2 === 0 &&
|
||||||
|
row.isNew &&
|
||||||
|
row.fieldVoList.length > 0 &&
|
||||||
|
row.fieldVoList[(index + 1) / 2 - 1]
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-if="row.fieldVoList[(index + 1) / 2 - 1].inputType == 1"
|
||||||
|
autocomplete="off"
|
||||||
|
maxlength="30"
|
||||||
|
v-model="row.fieldVoList[(index + 1) / 2 - 1].propertyValue"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
<el-select
|
||||||
|
v-if="row.fieldVoList[(index + 1) / 2 - 1].inputType == 2"
|
||||||
|
v-model="row.fieldVoList[(index + 1) / 2 - 1].propertyValue"
|
||||||
|
placeholder="请选择"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in row.fieldVoList[(index + 1) / 2 - 1].valueList"
|
||||||
|
:key="index"
|
||||||
|
:label="item.value"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
v-else-if="
|
||||||
|
row.isNew &&
|
||||||
|
row.fieldVoList.length > 0 &&
|
||||||
|
row.fieldVoList[Math.ceil(index / 2)] &&
|
||||||
|
row.fieldVoList[Math.ceil(index / 2)].mustHave != 0
|
||||||
|
"
|
||||||
|
style="color: red"
|
||||||
|
>{{ getFeatureValue(row, item.prop) }}</span
|
||||||
|
>
|
||||||
|
<span v-else>{{ getFeatureValue(row, item.prop) }}</span>
|
||||||
|
</template>-->
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="(item, index) in columns"
|
v-for="(item, index) in columns"
|
||||||
v-if="item.visible"
|
v-if="item.visible"
|
||||||
|
|
@ -627,6 +685,9 @@
|
||||||
<script>
|
<script>
|
||||||
import EquipmentEntryEditDialog from '@/views/EquipmentEntryApply/equipmentInput/edit.vue'
|
import EquipmentEntryEditDialog from '@/views/EquipmentEntryApply/equipmentInput/edit.vue'
|
||||||
import AddEquip from './AddEquip'
|
import AddEquip from './AddEquip'
|
||||||
|
import {
|
||||||
|
getConfigApi
|
||||||
|
} from '@/api/EquipmentEntryApply'
|
||||||
|
|
||||||
// 使用defineComponent规范组件定义
|
// 使用defineComponent规范组件定义
|
||||||
import {
|
import {
|
||||||
|
|
@ -760,6 +821,8 @@ export default {
|
||||||
{ key: 42, label: `特征项9`, prop: 'featureItem9', visible: true },
|
{ key: 42, label: `特征项9`, prop: 'featureItem9', visible: true },
|
||||||
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true }
|
{ key: 43, label: `特征值9`, prop: 'featureValue9', visible: true }
|
||||||
],
|
],
|
||||||
|
fieldVoList:[],
|
||||||
|
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
dialogList: [],
|
dialogList: [],
|
||||||
|
|
@ -776,6 +839,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
isVisible(val) {
|
isVisible(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
|
this.getConfig()
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -783,6 +847,7 @@ export default {
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getManufacturerSelectList()
|
this.getManufacturerSelectList()
|
||||||
|
this.getConfig()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleNumberInput(key) {
|
handleNumberInput(key) {
|
||||||
|
|
@ -985,6 +1050,14 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
getConfig() {
|
||||||
|
getConfigApi().then(res => {
|
||||||
|
this.fieldVoList = res.data.config || []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
async getList() {
|
async getList() {
|
||||||
try {
|
try {
|
||||||
|
|
@ -1003,6 +1076,8 @@ export default {
|
||||||
const res = await getDeviceByOrderIdApi(params)
|
const res = await getDeviceByOrderIdApi(params)
|
||||||
this.tableData = res.data.rows
|
this.tableData = res.data.rows
|
||||||
this.total = res.data.total
|
this.total = res.data.total
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取列表失败:', error)
|
console.error('获取列表失败:', error)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue