修改测试问题
This commit is contained in:
@@ -80,6 +80,7 @@ export enum uploadPic {
|
|||||||
select = '/carbon-smart/api/common/file/select',
|
select = '/carbon-smart/api/common/file/select',
|
||||||
uploadfile = '/carbon-smart/api/common/file/uploadfile',
|
uploadfile = '/carbon-smart/api/common/file/uploadfile',
|
||||||
download = '/carbon-smart/api/common/file/download',
|
download = '/carbon-smart/api/common/file/download',
|
||||||
|
downloadZip = '/carbon-smart/api/common/file/downloadZip',
|
||||||
}
|
}
|
||||||
// 碳规划
|
// 碳规划
|
||||||
export enum carbonPlanning {
|
export enum carbonPlanning {
|
||||||
|
@@ -295,6 +295,7 @@
|
|||||||
uid: item.id.toString(), // 使用文件的id作为唯一标识
|
uid: item.id.toString(), // 使用文件的id作为唯一标识
|
||||||
name: item.fileName, // 文件名
|
name: item.fileName, // 文件名
|
||||||
status: 'done', // 设置默认状态为已完成
|
status: 'done', // 设置默认状态为已完成
|
||||||
|
type: 'done',
|
||||||
url: item.filePath, // 文件的URL,这里假设用示例的URL格式
|
url: item.filePath, // 文件的URL,这里假设用示例的URL格式
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
@@ -415,7 +416,9 @@
|
|||||||
message.error(`${info.file.name} 文件上传失败`);
|
message.error(`${info.file.name} 文件上传失败`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const delIds = ref([]);
|
||||||
const handleFileRemove = (file) => {
|
const handleFileRemove = (file) => {
|
||||||
|
delIds.value.push(file.uid);
|
||||||
const newFileList = [];
|
const newFileList = [];
|
||||||
fileList.value.forEach((item) => {
|
fileList.value.forEach((item) => {
|
||||||
if (item.uid !== file.uid) {
|
if (item.uid !== file.uid) {
|
||||||
@@ -440,14 +443,20 @@
|
|||||||
// uploadQuery.value.bizId = res.data.id;
|
// uploadQuery.value.bizId = res.data.id;
|
||||||
const formData = ref(new FormData());
|
const formData = ref(new FormData());
|
||||||
fileList.value.forEach((file) => {
|
fileList.value.forEach((file) => {
|
||||||
|
if (file.type !== 'done') {
|
||||||
formData.value.append('files', file.originFileObj);
|
formData.value.append('files', file.originFileObj);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
formData.value.append('bizType', 1);
|
formData.value.append('bizType', 1);
|
||||||
formData.value.append('bizId', res.data.id);
|
formData.value.append('bizId', res.data.id);
|
||||||
|
delIds.value.forEach((item) => {
|
||||||
|
formData.value.append('deleteList', item);
|
||||||
|
});
|
||||||
fetch(uploadPic.uploadfiles, formData.value)
|
fetch(uploadPic.uploadfiles, formData.value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
message.success('操作成功!');
|
message.success('操作成功!');
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
delIds.value = [];
|
||||||
getDetailList();
|
getDetailList();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@@ -456,6 +465,7 @@
|
|||||||
} else {
|
} else {
|
||||||
message.success('操作成功!');
|
message.success('操作成功!');
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
delIds.value = [];
|
||||||
getDetailList();
|
getDetailList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -476,6 +486,7 @@
|
|||||||
// 关闭新增抽屉
|
// 关闭新增抽屉
|
||||||
const onClose = () => {
|
const onClose = () => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
delIds.value = [];
|
||||||
formState.value = {};
|
formState.value = {};
|
||||||
fileList.value = [];
|
fileList.value = [];
|
||||||
formRef.value.resetFields();
|
formRef.value.resetFields();
|
||||||
|
@@ -641,6 +641,9 @@
|
|||||||
name: 'carbonEmissionFactorLibraryImport',
|
name: 'carbonEmissionFactorLibraryImport',
|
||||||
extra: {
|
extra: {
|
||||||
api: carbonEmissionFactorLibrary.excel, // 导入接口名
|
api: carbonEmissionFactorLibrary.excel, // 导入接口名
|
||||||
|
params: {
|
||||||
|
orgId,
|
||||||
|
},
|
||||||
title: '设备信息', // 弹窗title
|
title: '设备信息', // 弹窗title
|
||||||
templateName: 'whiteListUser', // 所使用的文件名称
|
templateName: 'whiteListUser', // 所使用的文件名称
|
||||||
indexName: '设备id', // 匹配类型字段
|
indexName: '设备id', // 匹配类型字段
|
||||||
@@ -1035,10 +1038,18 @@
|
|||||||
onOk() {
|
onOk() {
|
||||||
fetch(carbonEmissionFactorLibrary.delDictionary, formState.value).then((res) => {
|
fetch(carbonEmissionFactorLibrary.delDictionary, formState.value).then((res) => {
|
||||||
message.success('操作成功!');
|
message.success('操作成功!');
|
||||||
|
formState.value = {
|
||||||
|
grp: 'MEASUREMENT_UNIT',
|
||||||
|
grpDesc: '计量单位',
|
||||||
|
};
|
||||||
getUnitTree();
|
getUnitTree();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onCancel() {
|
onCancel() {
|
||||||
|
formState.value = {
|
||||||
|
grp: 'MEASUREMENT_UNIT',
|
||||||
|
grpDesc: '计量单位',
|
||||||
|
};
|
||||||
console.log('Cancel');
|
console.log('Cancel');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@@ -274,7 +274,7 @@
|
|||||||
:columns="downLoadColumns"
|
:columns="downLoadColumns"
|
||||||
:data-source="downLoadData"
|
:data-source="downLoadData"
|
||||||
bordered
|
bordered
|
||||||
:rowKey="(record, index) => index"
|
rowKey="id"
|
||||||
:rowSelection="{
|
:rowSelection="{
|
||||||
selectedRowKeys: selectedRowKeysSet,
|
selectedRowKeys: selectedRowKeysSet,
|
||||||
onChange: onSelectionChangeSet,
|
onChange: onSelectionChangeSet,
|
||||||
@@ -534,6 +534,7 @@
|
|||||||
uid: item.id.toString(), // 使用文件的id作为唯一标识
|
uid: item.id.toString(), // 使用文件的id作为唯一标识
|
||||||
name: item.fileName, // 文件名
|
name: item.fileName, // 文件名
|
||||||
status: 'done', // 设置默认状态为已完成
|
status: 'done', // 设置默认状态为已完成
|
||||||
|
type: 'done',
|
||||||
url: item.filePath, // 文件的URL,这里假设用示例的URL格式
|
url: item.filePath, // 文件的URL,这里假设用示例的URL格式
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
@@ -623,14 +624,20 @@
|
|||||||
if (fileList.value.length !== 0) {
|
if (fileList.value.length !== 0) {
|
||||||
const formData = ref(new FormData());
|
const formData = ref(new FormData());
|
||||||
fileList.value.forEach((file) => {
|
fileList.value.forEach((file) => {
|
||||||
|
if (file.type !== 'done') {
|
||||||
formData.value.append('files', file.originFileObj);
|
formData.value.append('files', file.originFileObj);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
formData.value.append('bizType', 3);
|
formData.value.append('bizType', 3);
|
||||||
formData.value.append('bizId', formState.value.id);
|
formData.value.append('bizId', formState.value.id);
|
||||||
|
delIds.value.forEach((item) => {
|
||||||
|
formData.value.append('deleteList', item);
|
||||||
|
});
|
||||||
fetch(uploadPic.uploadfiles, formData.value)
|
fetch(uploadPic.uploadfiles, formData.value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
message.success('操作成功!');
|
message.success('操作成功!');
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
delIds.value = [];
|
||||||
formState.value = {
|
formState.value = {
|
||||||
orgId: orgId.value,
|
orgId: orgId.value,
|
||||||
};
|
};
|
||||||
@@ -641,6 +648,7 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
delIds.value = [];
|
||||||
formState.value = {
|
formState.value = {
|
||||||
orgId: orgId.value,
|
orgId: orgId.value,
|
||||||
};
|
};
|
||||||
@@ -652,6 +660,7 @@
|
|||||||
fetch(energyConsumption.creat, formState.value).then((res) => {
|
fetch(energyConsumption.creat, formState.value).then((res) => {
|
||||||
if (res.data === '新增数据已存在') {
|
if (res.data === '新增数据已存在') {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
delIds.value = [];
|
||||||
NsMessage.warning(res.data);
|
NsMessage.warning(res.data);
|
||||||
} else {
|
} else {
|
||||||
if (fileList.value.length !== 0) {
|
if (fileList.value.length !== 0) {
|
||||||
@@ -665,6 +674,7 @@
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
message.success('操作成功!');
|
message.success('操作成功!');
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
delIds.value = [];
|
||||||
formState.value = {
|
formState.value = {
|
||||||
orgId: orgId.value,
|
orgId: orgId.value,
|
||||||
};
|
};
|
||||||
@@ -675,6 +685,7 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
delIds.value = [];
|
||||||
formState.value = {
|
formState.value = {
|
||||||
orgId: orgId.value,
|
orgId: orgId.value,
|
||||||
};
|
};
|
||||||
@@ -766,6 +777,7 @@
|
|||||||
// 关闭新增抽屉
|
// 关闭新增抽屉
|
||||||
const onClose = () => {
|
const onClose = () => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
|
delIds.value = [];
|
||||||
formState.value = {
|
formState.value = {
|
||||||
orgId: orgId.value,
|
orgId: orgId.value,
|
||||||
};
|
};
|
||||||
@@ -796,7 +808,9 @@
|
|||||||
message.error(`${info.file.name} 文件上传失败`);
|
message.error(`${info.file.name} 文件上传失败`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const delIds = ref([]);
|
||||||
const handleFileRemove = (file) => {
|
const handleFileRemove = (file) => {
|
||||||
|
delIds.value.push(file.uid);
|
||||||
const newFileList = [];
|
const newFileList = [];
|
||||||
fileList.value.forEach((item) => {
|
fileList.value.forEach((item) => {
|
||||||
if (item.uid !== file.uid) {
|
if (item.uid !== file.uid) {
|
||||||
@@ -840,12 +854,50 @@
|
|||||||
const downLoad = (record) => {
|
const downLoad = (record) => {
|
||||||
const deleteId = ref(new FormData());
|
const deleteId = ref(new FormData());
|
||||||
deleteId.value.append('id', record.id);
|
deleteId.value.append('id', record.id);
|
||||||
fetch(uploadPic.download, deleteId.value).then((res) => {
|
fetch(uploadPic.download, deleteId.value)
|
||||||
console.log(res);
|
.then((res) => {
|
||||||
|
// 创建一个 URL 对象,指向图片数据的 blob
|
||||||
|
const url = window.URL.createObjectURL(new Blob([res.data]));
|
||||||
|
// 创建一个 <a> 标签,用于触发下载
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
link.setAttribute('download', record.fileName); // 设置下载的文件名
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
|
||||||
|
// 清理 URL 对象
|
||||||
|
window.URL.revokeObjectURL(url);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('下载图片失败:', error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const onSubmitDownLoad = () => {
|
||||||
|
const deleteIds = ref(new FormData());
|
||||||
|
selectedRowKeysSet.value.forEach((item) => {
|
||||||
|
deleteIds.value.append('ids', item);
|
||||||
|
});
|
||||||
|
fetch(uploadPic.downloadZip, deleteIds.value)
|
||||||
|
.then((res) => {
|
||||||
|
// 创建一个 URL 对象,指向图片数据的 blob
|
||||||
|
const url = window.URL.createObjectURL(new Blob([res.data]));
|
||||||
|
// 创建一个 <a> 标签,用于触发下载
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
debugger
|
||||||
|
link.setAttribute('download', ''); // 设置下载的文件名
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
|
||||||
|
// 清理 URL 对象
|
||||||
|
window.URL.revokeObjectURL(url);
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('下载图片失败:', error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const onSubmitDownLoad = () => {};
|
|
||||||
const onCloseDownLoad = () => {
|
const onCloseDownLoad = () => {
|
||||||
|
selectedRowKeysSet.value = []
|
||||||
downLoadVisible.value = false;
|
downLoadVisible.value = false;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@@ -102,7 +102,7 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item ref="name" label="关键词">
|
<a-form-item ref="name" label="关键词">
|
||||||
<ns-input v-model:value="selectData" />
|
<ns-input v-model:value="selectData" @change="keyChange" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -281,7 +281,7 @@
|
|||||||
type: 'primary',
|
type: 'primary',
|
||||||
handle: () => {
|
handle: () => {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
getNewTable();
|
// getNewTable();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
// 点击新增按钮
|
// 点击新增按钮
|
||||||
const addNewData = () => {
|
const addNewData = () => {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
getNewTable();
|
// getNewTable();
|
||||||
};
|
};
|
||||||
// 获取新增页面的列表
|
// 获取新增页面的列表
|
||||||
const selectedRowKeys = ref([]);
|
const selectedRowKeys = ref([]);
|
||||||
@@ -404,6 +404,11 @@
|
|||||||
newTableData.value = res.data.records;
|
newTableData.value = res.data.records;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const selectData = ref();
|
||||||
|
const keyChange = () => {
|
||||||
|
queryData.value.emissionSources = selectData.value;
|
||||||
|
getNewTable();
|
||||||
|
};
|
||||||
// 点击编辑按钮
|
// 点击编辑按钮
|
||||||
const editData = (record) => {
|
const editData = (record) => {
|
||||||
selectedRowKeys.value = [record.factorId];
|
selectedRowKeys.value = [record.factorId];
|
||||||
|
@@ -291,6 +291,7 @@
|
|||||||
<a-form-item ref="name" label="关键字" name="emissionFactors">
|
<a-form-item ref="name" label="关键字" name="emissionFactors">
|
||||||
<a-input-search
|
<a-input-search
|
||||||
v-model:value="editFormState.emissionFactors"
|
v-model:value="editFormState.emissionFactors"
|
||||||
|
@search="searchKey"
|
||||||
placeholder="请输入关键字" />
|
placeholder="请输入关键字" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -848,7 +849,7 @@
|
|||||||
const openVoucher = ref(false);
|
const openVoucher = ref(false);
|
||||||
const downLoadVoucher = () => {
|
const downLoadVoucher = () => {
|
||||||
fetch(carbonInventoryCheck.voucherDownloadList, { bizType: 2 }).then((res) => {
|
fetch(carbonInventoryCheck.voucherDownloadList, { bizType: 2 }).then((res) => {
|
||||||
voucherData.value = res.data
|
voucherData.value = res.data;
|
||||||
});
|
});
|
||||||
openVoucher.value = true;
|
openVoucher.value = true;
|
||||||
};
|
};
|
||||||
@@ -898,6 +899,7 @@
|
|||||||
uid: item.id.toString(), // 使用文件的id作为唯一标识
|
uid: item.id.toString(), // 使用文件的id作为唯一标识
|
||||||
name: item.fileName, // 文件名
|
name: item.fileName, // 文件名
|
||||||
status: 'done', // 设置默认状态为已完成
|
status: 'done', // 设置默认状态为已完成
|
||||||
|
type: 'done',
|
||||||
url: item.filePath, // 文件的URL,这里假设用示例的URL格式
|
url: item.filePath, // 文件的URL,这里假设用示例的URL格式
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
@@ -909,6 +911,10 @@
|
|||||||
total.value = res.data.total;
|
total.value = res.data.total;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const searchKey = () => {
|
||||||
|
queryData.value.emissionSources = editFormState.value.emissionFactors;
|
||||||
|
getNewTable();
|
||||||
|
};
|
||||||
// 数据来源选择框改变
|
// 数据来源选择框改变
|
||||||
const canEdit = ref(false);
|
const canEdit = ref(false);
|
||||||
const automatic = ref(false);
|
const automatic = ref(false);
|
||||||
@@ -957,7 +963,9 @@
|
|||||||
message.error(`${info.file.name} 文件上传失败`);
|
message.error(`${info.file.name} 文件上传失败`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const delIds = ref([]);
|
||||||
const handleFileRemove = (file) => {
|
const handleFileRemove = (file) => {
|
||||||
|
delIds.value.push(file.uid);
|
||||||
const newFileList = [];
|
const newFileList = [];
|
||||||
fileList.value.forEach((item) => {
|
fileList.value.forEach((item) => {
|
||||||
if (item.uid !== file.uid) {
|
if (item.uid !== file.uid) {
|
||||||
@@ -985,14 +993,20 @@
|
|||||||
if (fileList.value.length !== 0) {
|
if (fileList.value.length !== 0) {
|
||||||
const formData = ref(new FormData());
|
const formData = ref(new FormData());
|
||||||
fileList.value.forEach((file) => {
|
fileList.value.forEach((file) => {
|
||||||
|
if (file.type !== 'done') {
|
||||||
formData.value.append('files', file.originFileObj);
|
formData.value.append('files', file.originFileObj);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
formData.value.append('bizType', 2);
|
formData.value.append('bizType', 2);
|
||||||
formData.value.append('bizId', editFormState.value.id);
|
formData.value.append('bizId', editFormState.value.id);
|
||||||
|
delIds.value.forEach((item) => {
|
||||||
|
formData.value.append('deleteList', item);
|
||||||
|
});
|
||||||
fetch(uploadPic.uploadfiles, formData.value)
|
fetch(uploadPic.uploadfiles, formData.value)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
message.success('操作成功!');
|
message.success('操作成功!');
|
||||||
editData.value = false;
|
editData.value = false;
|
||||||
|
delIds.value = [];
|
||||||
getPFYTableList(getTableId.value);
|
getPFYTableList(getTableId.value);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@@ -1000,6 +1014,7 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
editData.value = false;
|
editData.value = false;
|
||||||
|
delIds.value = [];
|
||||||
getPFYTableList(getTableId.value);
|
getPFYTableList(getTableId.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1010,6 +1025,7 @@
|
|||||||
};
|
};
|
||||||
const onCloseEditData = () => {
|
const onCloseEditData = () => {
|
||||||
editData.value = false;
|
editData.value = false;
|
||||||
|
delIds.value = [];
|
||||||
editFormState.value = {
|
editFormState.value = {
|
||||||
orgId: orgId.value,
|
orgId: orgId.value,
|
||||||
};
|
};
|
||||||
|
@@ -48,7 +48,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="totalContant" v-else>
|
<div class="totalContant" v-else>
|
||||||
<categoryDeatil @change-data="updateData" :parentId="parentId" :year="year" :type="type" :nodeName="nodeName" />
|
<categoryDeatil
|
||||||
|
@change-data="updateData"
|
||||||
|
:parentId="parentId"
|
||||||
|
:year="year"
|
||||||
|
:type="type"
|
||||||
|
:nodeName="nodeName" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 新增节点 -->
|
<!-- 新增节点 -->
|
||||||
<a-drawer :visible="visible" :width="500" @close="onClose" :footer-style="{ textAlign: 'right' }">
|
<a-drawer :visible="visible" :width="500" @close="onClose" :footer-style="{ textAlign: 'right' }">
|
||||||
@@ -159,7 +164,7 @@
|
|||||||
};
|
};
|
||||||
const getMonthPillarData = () => {
|
const getMonthPillarData = () => {
|
||||||
fetch(carbonPlanning.electricityUsageBackThen, getPillarQuery.value).then((res) => {
|
fetch(carbonPlanning.electricityUsageBackThen, getPillarQuery.value).then((res) => {
|
||||||
xAxisData.value = res.data.year;
|
xAxisData.value = res.data.yearMonth;
|
||||||
referenceValue.value = res.data.referenceValue;
|
referenceValue.value = res.data.referenceValue;
|
||||||
budget.value = res.data.budget;
|
budget.value = res.data.budget;
|
||||||
actualUsage.value = res.data.actualUsage;
|
actualUsage.value = res.data.actualUsage;
|
||||||
@@ -286,6 +291,7 @@
|
|||||||
type: props.tabId,
|
type: props.tabId,
|
||||||
year: selectYearValue.value.format('YYYY'),
|
year: selectYearValue.value.format('YYYY'),
|
||||||
yearAndMonth: 'year',
|
yearAndMonth: 'year',
|
||||||
|
yearMonth: selectMonthValue.value.format('YYYY-DD'),
|
||||||
});
|
});
|
||||||
const ballValue = ref();
|
const ballValue = ref();
|
||||||
const getBallData = () => {
|
const getBallData = () => {
|
||||||
@@ -447,7 +453,7 @@
|
|||||||
fetch(carbonPlanning.searchListByYear, yearQueryParams.value).then((res) => {
|
fetch(carbonPlanning.searchListByYear, yearQueryParams.value).then((res) => {
|
||||||
data.value = res.data;
|
data.value = res.data;
|
||||||
res.data.forEach((item) => {
|
res.data.forEach((item) => {
|
||||||
treeCheckedKeys.value.push((item.itemizeId).toString());
|
treeCheckedKeys.value.push(item.itemizeId.toString());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -460,7 +466,9 @@
|
|||||||
});
|
});
|
||||||
const changeMonth = () => {
|
const changeMonth = () => {
|
||||||
monthQueryParams.value.yearMonth = selectMonthValue.value;
|
monthQueryParams.value.yearMonth = selectMonthValue.value;
|
||||||
|
getBallQuery.value.yearMonth = selectMonthValue.value;
|
||||||
getMonthData();
|
getMonthData();
|
||||||
|
getBallData();
|
||||||
};
|
};
|
||||||
const getMonthData = () => {
|
const getMonthData = () => {
|
||||||
fetch(carbonPlanning.searchListByMonth, monthQueryParams.value).then((res) => {
|
fetch(carbonPlanning.searchListByMonth, monthQueryParams.value).then((res) => {
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
import { utils, write } from 'xlsx';
|
import { utils, write } from 'xlsx';
|
||||||
import { dateUtil } from '/nerv-lib/util/date-util';
|
import { dateUtil } from '/nerv-lib/util/date-util';
|
||||||
import { NsMessage } from '/nerv-lib/component/message';
|
import { NsMessage } from '/nerv-lib/component/message';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { createVNode, h, render as vueRender } from 'vue';
|
import { createVNode, h, render as vueRender } from 'vue';
|
||||||
|
import { Cookies } from '/nerv-lib/util/cookie';
|
||||||
import { NsXlsxImport } from '/nerv-lib/component/xlsx';
|
import { NsXlsxImport } from '/nerv-lib/component/xlsx';
|
||||||
import { NsModal } from '/nerv-lib/component/modal';
|
import { NsModal } from '/nerv-lib/component/modal';
|
||||||
|
|
||||||
@@ -126,7 +125,9 @@ export const importFile = (
|
|||||||
});
|
});
|
||||||
formData.append('file', event);
|
formData.append('file', event);
|
||||||
axios
|
axios
|
||||||
.post(api, formData)
|
.post(api, formData, {
|
||||||
|
headers: { token: Cookies.get(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`) },
|
||||||
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
NsMessage.success('导入成功', 1, () => {
|
NsMessage.success('导入成功', 1, () => {
|
||||||
|
Reference in New Issue
Block a user