(budgetSelect.year = e)"
>
-
-
@@ -152,12 +144,13 @@
-
+
{
+ select.project_id = row.id;
+ select.projectName = row.name;
+ }
+ "
+ >
@@ -84,6 +175,7 @@ import { index, destroy, save } from "@/api/propertyPlan";
import addPropertyPlan from "@/views/finance/components/addPropertyPlan.vue";
import remark from "./components/remark.vue";
import file from "./components/file.vue";
+import { listdeptNoAuth } from "@/api/system/department";
export default {
components: {
file,
@@ -92,16 +184,21 @@ export default {
},
data() {
return {
- role: -1,//0业务,1财务
+ role: -1, //0业务,1财务
select: {
page: 1,
page_size: 10,
+ department_id: "",
+ projectName: "",
+ project_id: "",
},
+
+ departments: [],
originalList: [],
list: [],
table: [
{
- prop: 'index',
+ prop: "index",
width: 60,
sortable: false,
},
@@ -109,20 +206,21 @@ export default {
label: "项目名称",
minWidth: 220,
align: "left",
- prop: 'plan.name'
+ prop: "project.name",
},
{
prop: "content",
label: "评审内容",
- minWidth: 220,
- align: 'left'
+ width: 220,
},
{
prop: "plan_date",
label: "计划评审时间",
width: 170,
formatter: (cell, data, value) => {
- return value ? this.$moment(new Date(value)).format("YYYY年MM月") : '未完成';
+ return value
+ ? this.$moment(new Date(value)).format("YYYY年MM月")
+ : "未完成";
},
},
{
@@ -130,7 +228,9 @@ export default {
label: "实际评审时间",
width: 170,
formatter: (cell, data, value) => {
- return value ? this.$moment(new Date(value)).format("YYYY年MM月DD") : '未完成';
+ return value
+ ? this.$moment(new Date(value)).format("YYYY年MM月DD")
+ : "未完成";
},
},
],
@@ -138,52 +238,58 @@ export default {
};
},
methods: {
- destroy (row) {
- console.log(row)
+ getDepartment() {
+ listdeptNoAuth().then((res) => {
+ this.departments = res;
+ });
+ },
+
+ destroy(row) {
+ console.log(row);
destroy({
- id: row.pid
- }).then(res => {
+ id: row.pid,
+ }).then((res) => {
this.$message({
- type: 'success',
- message: '删除成功'
- })
- this.getList()
- })
+ type: "success",
+ message: "删除成功",
+ });
+ this.getList();
+ });
},
async getList() {
const res = await index(this.select);
this.originalList = res.data;
this.total = res.total;
let list = [];
- res.data.forEach((i,index) => {
+ res.data.forEach((i, index) => {
if (i.item && i.item.length > 0) {
- i.item.forEach(item => {
+ i.item.forEach((item) => {
list.push({
type: 0,
- index: index+1,
- plan: i.plan,
+ index: index + 1,
+ project: i.project,
pid: i.id,
- ...item
- })
- })
+ ...item,
+ });
+ });
} else {
list.push({
pid: i.id,
- index: index+1,
+ index: index + 1,
type: 1,
- ...i
- })
+ ...i,
+ });
}
- })
+ });
this.list = mergeTableRow({
data: list,
- mergeColNames: ['index','plan.name','more'],
- firstMergeColNames: ['index',"pid",'pid'], // 受影响的列,只合并以firstMerge为首的同类型数据
+ mergeColNames: ["index", "project.name", "more"],
+ firstMergeColNames: ["index", "pid", "pid"], // 受影响的列,只合并以firstMerge为首的同类型数据
firstMerge: "index",
- })
+ });
- console.log(this.list)
+ console.log(this.list);
},
//合并行
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
@@ -195,11 +301,15 @@ export default {
},
computed: {},
created() {
+ this.getDepartment();
this.getList();
},
beforeRouteEnter(to, from, next) {
next((vm) => {
- vm.role = (to.path.split("_")[1] && !isNaN(Number(to.path.split("_")[1]))) ? Number(to.path.split("_")[1]) : -1;
+ vm.role =
+ to.path.split("_")[1] && !isNaN(Number(to.path.split("_")[1]))
+ ? Number(to.path.split("_")[1])
+ : -1;
});
},
};
diff --git a/src/views/statisticalReport/govProcure.vue b/src/views/statisticalReport/govProcure.vue
index 584b360..8a382ef 100644
--- a/src/views/statisticalReport/govProcure.vue
+++ b/src/views/statisticalReport/govProcure.vue
@@ -9,21 +9,21 @@