修改测试问题
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</a-table> -->
|
||||
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" :scroll="{ x: 1500}" />
|
||||
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" :scroll="{ x: 1500,y:350 }" />
|
||||
<!-- <a-pagination
|
||||
:current="queryParams.pageNum"
|
||||
:total="total"
|
||||
@@ -220,7 +220,8 @@
|
||||
// 定义form表单的必填
|
||||
const rules: Record<string, Rule[]> = {
|
||||
energyType: [{ required: true, message: '请输入能源种类', trigger: 'change' }],
|
||||
isComputeCarbon: [{ required: true, message: '请选择是否计算碳排', trigger: 'change' }]
|
||||
isComputeCarbon: [{ required: true, message: '请选择是否计算碳排', trigger: 'change' }],
|
||||
unit: [{ required: true, message: '请选择计量单位', trigger: 'change' }]
|
||||
};
|
||||
// 排放类型的变量
|
||||
const emissionTypeDic = ref()
|
||||
@@ -363,6 +364,9 @@
|
||||
getDictList()
|
||||
visible.value = true
|
||||
fetch(energyConsumption.findById , {id : record.id }).then((res) => {
|
||||
if(res.data.emissionType){
|
||||
res.data.emissionType = Number(res.data.emissionType)
|
||||
}
|
||||
if (res.data.unit) {
|
||||
let selectDevice = ref([Number(res.data.unit)]);
|
||||
findParentIds(measurementUnit.value, res.data.unit, selectDevice.value);
|
||||
@@ -438,6 +442,7 @@
|
||||
.validate()
|
||||
.then(() => {
|
||||
console.log('values', formState, toRaw(formState));
|
||||
formState.value.year = selectYear.value.format('YYYY')
|
||||
if(formState.value.unit){
|
||||
formState.value.unit = formState.value.unit.join(',').split(',')[1]
|
||||
}
|
||||
|
Reference in New Issue
Block a user