|
|
|
@ -65,10 +65,11 @@
|
|
|
|
</lx-header>
|
|
|
|
</lx-header>
|
|
|
|
|
|
|
|
|
|
|
|
<xy-table
|
|
|
|
<xy-table
|
|
|
|
|
|
|
|
:cell-style="{ 'height': '1px' }"
|
|
|
|
:show-index="false"
|
|
|
|
:show-index="false"
|
|
|
|
:list="list"
|
|
|
|
row-key="id"
|
|
|
|
|
|
|
|
:list="originalList"
|
|
|
|
:table-item="table"
|
|
|
|
:table-item="table"
|
|
|
|
:object-span-method="objectSpanMethod"
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #btns>
|
|
|
|
<template #btns>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
@ -76,19 +77,21 @@
|
|
|
|
prop="more"
|
|
|
|
prop="more"
|
|
|
|
header-align="center"
|
|
|
|
header-align="center"
|
|
|
|
align="left"
|
|
|
|
align="left"
|
|
|
|
|
|
|
|
fixed="right"
|
|
|
|
|
|
|
|
width="220"
|
|
|
|
v-if="role === 1 || role === 0"
|
|
|
|
v-if="role === 1 || role === 0"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #default="{ row }">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@click="$refs['file'].setId(row.pid), $refs['file'].show()"
|
|
|
|
@click="$refs['file'].setId(row.id), $refs['file'].show()"
|
|
|
|
>附件
|
|
|
|
>附件
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@click="$refs['remark'].setId(row.pid), $refs['remark'].show()"
|
|
|
|
@click="$refs['remark'].setId(row.id), $refs['remark'].show()"
|
|
|
|
>备注
|
|
|
|
>备注
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
@ -97,7 +100,7 @@
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@click="
|
|
|
|
@click="
|
|
|
|
$refs['addPropertyPlan'].setType('editor'),
|
|
|
|
$refs['addPropertyPlan'].setType('editor'),
|
|
|
|
($refs['addPropertyPlan'].pid = row.pid),
|
|
|
|
($refs['addPropertyPlan'].pid = row.id),
|
|
|
|
$refs['addPropertyPlan'].setId(row.id),
|
|
|
|
$refs['addPropertyPlan'].setId(row.id),
|
|
|
|
$refs['addPropertyPlan'].show()
|
|
|
|
$refs['addPropertyPlan'].show()
|
|
|
|
"
|
|
|
|
"
|
|
|
|
@ -130,13 +133,13 @@
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@click="$refs['file'].setId(row.pid), $refs['file'].show()"
|
|
|
|
@click="$refs['file'].setId(row.id), $refs['file'].show()"
|
|
|
|
>附件查看</Button
|
|
|
|
>附件查看</Button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@click="$refs['remark'].setId(row.pid), $refs['remark'].show()"
|
|
|
|
@click="$refs['remark'].setId(row.id), $refs['remark'].show()"
|
|
|
|
>备注
|
|
|
|
>备注
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -161,6 +164,7 @@
|
|
|
|
ref="addPropertyPlan"
|
|
|
|
ref="addPropertyPlan"
|
|
|
|
:departments="departments"
|
|
|
|
:departments="departments"
|
|
|
|
:role="role"
|
|
|
|
:role="role"
|
|
|
|
|
|
|
|
:lists="originalList"
|
|
|
|
@refresh="getList"
|
|
|
|
@refresh="getList"
|
|
|
|
@rowPick="
|
|
|
|
@rowPick="
|
|
|
|
(row) => {
|
|
|
|
(row) => {
|
|
|
|
@ -197,6 +201,7 @@ export default {
|
|
|
|
department_id: "",
|
|
|
|
department_id: "",
|
|
|
|
projectName: "",
|
|
|
|
projectName: "",
|
|
|
|
project_id: "",
|
|
|
|
project_id: "",
|
|
|
|
|
|
|
|
show_tree: 1
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
departments: [],
|
|
|
|
departments: [],
|
|
|
|
@ -204,50 +209,96 @@ export default {
|
|
|
|
list: [],
|
|
|
|
list: [],
|
|
|
|
table: [
|
|
|
|
table: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "index",
|
|
|
|
label: ' ',
|
|
|
|
width: 60,
|
|
|
|
type: 'index',
|
|
|
|
sortable: false,
|
|
|
|
width: 56
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
label: "项目名称",
|
|
|
|
label: "项目名称",
|
|
|
|
minWidth: 220,
|
|
|
|
minWidth: 220,
|
|
|
|
align: "left",
|
|
|
|
align: "left",
|
|
|
|
prop: "project.name",
|
|
|
|
prop: "project_name",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "content",
|
|
|
|
prop: "content",
|
|
|
|
label: "评审内容",
|
|
|
|
label: "评审内容",
|
|
|
|
width: 220,
|
|
|
|
width: 220,
|
|
|
|
|
|
|
|
customFn:row => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div class="my-td">
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.item.map(i => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div class="my-cell">{i.content}</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "plan_date",
|
|
|
|
prop: "plan_date",
|
|
|
|
label: "计划送审时间",
|
|
|
|
label: "计划送审时间",
|
|
|
|
width: 170,
|
|
|
|
width: 170,
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
customFn:row => {
|
|
|
|
return value
|
|
|
|
return (
|
|
|
|
? this.$moment(new Date(value)).format("YYYY年MM月")
|
|
|
|
<div class="my-td">
|
|
|
|
: "未完成";
|
|
|
|
{
|
|
|
|
},
|
|
|
|
row.item.map(i => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div class="my-cell">{
|
|
|
|
|
|
|
|
i.plan_date
|
|
|
|
|
|
|
|
? this.$moment(new Date(i.plan_date)).format("YYYY年MM月")
|
|
|
|
|
|
|
|
: "未完成"}</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "actually_date",
|
|
|
|
prop: "actually_date",
|
|
|
|
label: "实际送审时间",
|
|
|
|
label: "实际送审时间",
|
|
|
|
width: 170,
|
|
|
|
width: 170,
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
customFn:row => {
|
|
|
|
return value
|
|
|
|
return (
|
|
|
|
? this.$moment(new Date(value)).format("YYYY年MM月DD")
|
|
|
|
<div class="my-td">
|
|
|
|
: "未完成";
|
|
|
|
{
|
|
|
|
},
|
|
|
|
row.item.map(i => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div class="my-cell">{
|
|
|
|
|
|
|
|
i.actually_date
|
|
|
|
|
|
|
|
? this.$moment(new Date(i.actually_date)).format("YYYY年MM月")
|
|
|
|
|
|
|
|
: "未完成"}</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: 'date',
|
|
|
|
prop: 'date',
|
|
|
|
label: '出具报告时间',
|
|
|
|
label: '出具报告时间',
|
|
|
|
width: 170,
|
|
|
|
width: 170,
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
customFn:row => {
|
|
|
|
return value
|
|
|
|
return (
|
|
|
|
? this.$moment(new Date(value)).format("YYYY年MM月DD")
|
|
|
|
<div class="my-td">
|
|
|
|
: "未完成";
|
|
|
|
{
|
|
|
|
},
|
|
|
|
row.item.map(i => {
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div class="my-cell">{
|
|
|
|
|
|
|
|
i.date
|
|
|
|
|
|
|
|
? this.$moment(new Date(i.date)).format("YYYY年MM月")
|
|
|
|
|
|
|
|
: "未完成"}</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
|
@ -261,9 +312,8 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
destroy(row) {
|
|
|
|
destroy(row) {
|
|
|
|
console.log(row);
|
|
|
|
|
|
|
|
destroy({
|
|
|
|
destroy({
|
|
|
|
id: row.pid,
|
|
|
|
id: row.id,
|
|
|
|
}).then((res) => {
|
|
|
|
}).then((res) => {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
type: "success",
|
|
|
|
type: "success",
|
|
|
|
@ -274,38 +324,9 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async getList() {
|
|
|
|
async getList() {
|
|
|
|
const res = await index(this.select);
|
|
|
|
const res = await index(this.select);
|
|
|
|
this.originalList = res.data;
|
|
|
|
this.list = res;
|
|
|
|
this.total = res.total;
|
|
|
|
this.originalList = res;
|
|
|
|
let list = [];
|
|
|
|
console.log(res)
|
|
|
|
res.data.forEach((i, index) => {
|
|
|
|
|
|
|
|
if (i.item && i.item.length > 0) {
|
|
|
|
|
|
|
|
i.item.forEach((item) => {
|
|
|
|
|
|
|
|
list.push({
|
|
|
|
|
|
|
|
type: 0,
|
|
|
|
|
|
|
|
index: index + 1,
|
|
|
|
|
|
|
|
project: i.project,
|
|
|
|
|
|
|
|
pid: i.id,
|
|
|
|
|
|
|
|
...item,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
list.push({
|
|
|
|
|
|
|
|
pid: i.id,
|
|
|
|
|
|
|
|
index: index + 1,
|
|
|
|
|
|
|
|
type: 1,
|
|
|
|
|
|
|
|
...i,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.list = mergeTableRow({
|
|
|
|
|
|
|
|
data: list,
|
|
|
|
|
|
|
|
mergeColNames: ["index", "project.name", "more"],
|
|
|
|
|
|
|
|
firstMergeColNames: ["index", "pid", "pid"], // 受影响的列,只合并以firstMerge为首的同类型数据
|
|
|
|
|
|
|
|
firstMerge: "index",
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(this.list);
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//合并行
|
|
|
|
//合并行
|
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
|
@ -335,4 +356,30 @@ export default {
|
|
|
|
Button + Button {
|
|
|
|
Button + Button {
|
|
|
|
margin-left: 4px;
|
|
|
|
margin-left: 4px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.my-td {
|
|
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.my-cell {
|
|
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
|
|
border-bottom: 1px solid #EBEEF5;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.my-cell:nth-child(1) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
padding-top: 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.my-cell:nth-last-child(1) {
|
|
|
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
|
|
padding-bottom: 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
::v-deep td > .cell {
|
|
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|