main
严飞永 1 week ago
parent 0a4113e2ba
commit 7798f28623

@ -43,12 +43,8 @@ export default {
const response = await getMessageCount(); const response = await getMessageCount();
if (response && response.code === 200) { if (response && response.code === 200) {
this.counts = response.data; // counts this.counts = response.data; // counts
} else { } else { }
console.error('获取数据失败:', response); } catch (error) {}
}
} catch (error) {
console.error('获取数据失败:', error);
}
}, },
// //
async getCountstwo() { async getCountstwo() {
@ -56,16 +52,9 @@ export default {
const response = await getMessageCounttwo(); const response = await getMessageCounttwo();
if (response && response.code === 200) { if (response && response.code === 200) {
this.countstwo = response.data; // counts this.countstwo = response.data; // counts
} else { } else { }
console.error('获取数据失败:', response); } catch (error) { }
}
} catch (error) {
console.error('获取数据失败:', error);
}
}, },
handleCommand(command) {
this.$message('点击了: ' + command)
}
} }
} }
</script> </script>

@ -35,20 +35,17 @@ export default {
}, },
mounted() { mounted() {
this.getData(); this.getData();
console.log("function.vue: mounted with years:", this.years); //
}, },
watch: { watch: {
years: { years: {
immediate: true, immediate: true,
handler(newVal) { handler(newVal) {
console.log("function.vue: years changed to:", newVal); //
this.getData(); this.getData();
} }
} }
}, },
methods: { methods: {
async getData() { async getData() {
console.log("function.vue: getData called with years:", this.years); //
try { try {
const response = await fungong({ years: this.years }); const response = await fungong({ years: this.years });
if (response && response.code === 200 && response.data) { if (response && response.code === 200 && response.data) {
@ -57,10 +54,8 @@ export default {
this.chartData = this.processData(response.data); this.chartData = this.processData(response.data);
this.renderChart(); this.renderChart();
} else { } else {
console.error("function.vue: 获取数据失败:", response); //
} }
} catch (error) { } catch (error) {
console.error("function.vue: 请求失败:", error); //
} }
}, },
processData(data) { processData(data) {

@ -34,20 +34,17 @@ export default {
}, },
mounted() { mounted() {
this.getData(); this.getData();
console.log("invest.vue: mounted with years:", this.years); //
}, },
watch: { watch: {
years: { years: {
immediate: true, immediate: true,
handler(newVal) { handler(newVal) {
console.log("invest.vue: years changed to:", newVal); //
this.getData(); this.getData();
} }
} }
}, },
methods: { methods: {
async getData() { async getData() {
console.log("invest.vue: getData called with years:", this.years); //
const response = await investall({ const response = await investall({
years: this.years, years: this.years,
}); });
@ -56,9 +53,7 @@ export default {
this.functionnumber = totalCount; this.functionnumber = totalCount;
this.chartData = this.processData(response.data); this.chartData = this.processData(response.data);
this.renderChart(); this.renderChart();
} else { } else {}
console.error("invest.vue: 获取数据失败:", response); //
}
}, },
processData(data) { processData(data) {
const names = ['国企', '民企', '外企', '其他']; const names = ['国企', '民企', '外企', '其他'];

@ -11,8 +11,8 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -36,8 +36,8 @@
<el-table-column label="评价规则" align="center" prop="pfgz" /> <el-table-column label="评价规则" align="center" prop="pfgz" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handleUpdate(scope.row)"></el-button> <el-button type="text" @click="handleUpdate(scope.row)"></el-button>
<el-button type="text" style="color: red;" @click="handleDelete(scope.row)"></el-button> <el-button type="text" style="color: red;" @click="handleDelete(scope.row)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -114,7 +114,7 @@ export default {
getProjectEvaluationPage(this.queryParams).then(response => { getProjectEvaluationPage(this.queryParams).then(response => {
if (response && response.data && response.data.records !== undefined && response.data.total !== undefined) { if (response && response.data && response.data.records !== undefined && response.data.total !== undefined) {
this.postList = response.data.records; this.postList = response.data.records;
this.total = response.data.total; this.total = response.data.total;
} else { } else {
this.postList = []; this.postList = [];
this.total = 0; this.total = 0;
@ -190,8 +190,9 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
const postIds = row.id || this.ids; // 使 id const postIds = row.id || this.ids;
this.$modal.confirm('是否确认删除项目评价配置编号为"' + postIds + '"的数据项?').then(() => { const pjys = row.pjys; // pjys
this.$modal.confirm(`是否确认删除"${pjys}"的数据项?`).then(() => {
return deleteProjectEvaluation(postIds); return deleteProjectEvaluation(postIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();

@ -323,7 +323,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const catalogIds = row.id || this.ids; const catalogIds = row.id || this.ids;
this.$modal.confirm('是否确认删除项目知识库编号为"' + catalogIds + '"的数据项?').then(() => { this.$modal.confirm('是否确认删除数据项?').then(() => {
return deleteCatalog([catalogIds]); return deleteCatalog([catalogIds]);
}).then(() => { }).then(() => {
this.getList(); this.getList();

@ -365,7 +365,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const catalogIds = row.id || this.ids; const catalogIds = row.id || this.ids;
this.$modal.confirm('是否确认删除项目知识库编号为"' + catalogIds + '"的数据项?').then(() => { this.$modal.confirm('是否确认删除数据项?').then(() => {
return deleteXfcygl([catalogIds]); return deleteXfcygl([catalogIds]);
}).then(() => { }).then(() => {
this.getList(); this.getList();

Loading…
Cancel
Save