|
|
|
@ -7,18 +7,50 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div slot="content"></div>
|
|
|
|
<div slot="content"></div>
|
|
|
|
<slot>
|
|
|
|
<slot>
|
|
|
|
<span style="padding: 0 6px; word-break: keep-all">关键字</span>
|
|
|
|
<span style="padding: 0 6px; word-break: keep-all">部门</span>
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
|
|
|
|
placeholder="科室选择"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
v-model="select.department_id"
|
|
|
|
|
|
|
|
style="width: 160px"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<Option v-for="item in departments" :value="item.id" :key="item.id"
|
|
|
|
|
|
|
|
>{{ item.name }}
|
|
|
|
|
|
|
|
</Option>
|
|
|
|
|
|
|
|
</Select>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span style="padding: 0 6px; word-break: keep-all">项目</span>
|
|
|
|
<span>
|
|
|
|
<span>
|
|
|
|
<Input
|
|
|
|
<Input
|
|
|
|
v-model="select.keyword"
|
|
|
|
:value="select.projectName"
|
|
|
|
placeholder="请输入关键字"
|
|
|
|
readonly
|
|
|
|
style="width: 180px"
|
|
|
|
clearable
|
|
|
|
|
|
|
|
placeholder="项目选择"
|
|
|
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
|
|
|
@on-clear="select.project_id = ''"
|
|
|
|
|
|
|
|
@on-focus="$refs['addPropertyPlan'].showModal()"
|
|
|
|
></Input>
|
|
|
|
></Input>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<Button type="primary" style="margin-left: 10px" ghost @click=""
|
|
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
style="margin-left: 10px"
|
|
|
|
|
|
|
|
ghost
|
|
|
|
|
|
|
|
@click="
|
|
|
|
|
|
|
|
select = {
|
|
|
|
|
|
|
|
page: 1,
|
|
|
|
|
|
|
|
page_size: 10,
|
|
|
|
|
|
|
|
department_id: '',
|
|
|
|
|
|
|
|
projectName: '',
|
|
|
|
|
|
|
|
project_id: '',
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
"
|
|
|
|
>重置</Button
|
|
|
|
>重置</Button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Button type="primary" style="margin-left: 10px" @click="getList">查询</Button>
|
|
|
|
<Button type="primary" style="margin-left: 10px" @click="getList"
|
|
|
|
|
|
|
|
>查询</Button
|
|
|
|
|
|
|
|
>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
v-if="role === 0"
|
|
|
|
v-if="role === 0"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@ -32,27 +64,75 @@
|
|
|
|
</slot>
|
|
|
|
</slot>
|
|
|
|
</lx-header>
|
|
|
|
</lx-header>
|
|
|
|
|
|
|
|
|
|
|
|
<xy-table :show-index="false" :list="list" :table-item="table" :object-span-method="objectSpanMethod">
|
|
|
|
<xy-table
|
|
|
|
|
|
|
|
:show-index="false"
|
|
|
|
|
|
|
|
:list="list"
|
|
|
|
|
|
|
|
:table-item="table"
|
|
|
|
|
|
|
|
:object-span-method="objectSpanMethod"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template #btns>
|
|
|
|
<template #btns>
|
|
|
|
<el-table-column label="操作" prop="more" header-align="center" align="left" v-if="role === 1 || role === 0" >
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
|
|
prop="more"
|
|
|
|
|
|
|
|
header-align="center"
|
|
|
|
|
|
|
|
align="left"
|
|
|
|
|
|
|
|
v-if="role === 1 || role === 0"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template #default="{ row }">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<Button size="small" type="primary" @click="$refs['file'].setId(row.pid),$refs['file'].show()">附件
|
|
|
|
<Button
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="$refs['file'].setId(row.pid), $refs['file'].show()"
|
|
|
|
|
|
|
|
>附件
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<Button size="small" type="primary" @click="$refs['remark'].setId(row.pid),$refs['remark'].show()">备注
|
|
|
|
<Button
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="$refs['remark'].setId(row.pid), $refs['remark'].show()"
|
|
|
|
|
|
|
|
>备注
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<Button ghost size="small" type="primary" @click="$refs['addPropertyPlan'].setType('editor'),$refs['addPropertyPlan'].pid = row.pid,$refs['addPropertyPlan'].setId(row.id),$refs['addPropertyPlan'].show()">编辑
|
|
|
|
<Button
|
|
|
|
|
|
|
|
ghost
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="
|
|
|
|
|
|
|
|
$refs['addPropertyPlan'].setType('editor'),
|
|
|
|
|
|
|
|
($refs['addPropertyPlan'].pid = row.pid),
|
|
|
|
|
|
|
|
$refs['addPropertyPlan'].setId(row.id),
|
|
|
|
|
|
|
|
$refs['addPropertyPlan'].show()
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
>编辑
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<Poptip v-if="role === 0" transfer confirm placement="bottom" title="确认要删除吗"
|
|
|
|
<Poptip
|
|
|
|
@on-ok="destroy(row)">
|
|
|
|
v-if="role === 0"
|
|
|
|
<Button style="margin-left: 4px;" ghost size="small" type="error">删除
|
|
|
|
transfer
|
|
|
|
|
|
|
|
confirm
|
|
|
|
|
|
|
|
placement="bottom"
|
|
|
|
|
|
|
|
title="确认要删除吗"
|
|
|
|
|
|
|
|
@on-ok="destroy(row)"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<Button style="margin-left: 4px" ghost size="small" type="error"
|
|
|
|
|
|
|
|
>删除
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</Poptip>
|
|
|
|
</Poptip>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column v-else label="操作" prop="more" header-align="center" align="center" width="100">
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
v-else
|
|
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
|
|
prop="more"
|
|
|
|
|
|
|
|
header-align="center"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template #default="{ row }">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<Button size="small" type="primary" @click="$refs['file'].setId(row.pid),$refs['file'].show()">附件查看</Button>
|
|
|
|
<Button
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="$refs['file'].setId(row.pid), $refs['file'].show()"
|
|
|
|
|
|
|
|
>附件查看</Button
|
|
|
|
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -71,7 +151,18 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<addPropertyPlan ref="addPropertyPlan" :role="role" @refresh="getList"></addPropertyPlan>
|
|
|
|
<addPropertyPlan
|
|
|
|
|
|
|
|
ref="addPropertyPlan"
|
|
|
|
|
|
|
|
:departments="departments"
|
|
|
|
|
|
|
|
:role="role"
|
|
|
|
|
|
|
|
@refresh="getList"
|
|
|
|
|
|
|
|
@rowPick="
|
|
|
|
|
|
|
|
(row) => {
|
|
|
|
|
|
|
|
select.project_id = row.id;
|
|
|
|
|
|
|
|
select.projectName = row.name;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
></addPropertyPlan>
|
|
|
|
<remark ref="remark"></remark>
|
|
|
|
<remark ref="remark"></remark>
|
|
|
|
<file :role="role" ref="file"></file>
|
|
|
|
<file :role="role" ref="file"></file>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -84,6 +175,7 @@ import { index, destroy, save } from "@/api/propertyPlan";
|
|
|
|
import addPropertyPlan from "@/views/finance/components/addPropertyPlan.vue";
|
|
|
|
import addPropertyPlan from "@/views/finance/components/addPropertyPlan.vue";
|
|
|
|
import remark from "./components/remark.vue";
|
|
|
|
import remark from "./components/remark.vue";
|
|
|
|
import file from "./components/file.vue";
|
|
|
|
import file from "./components/file.vue";
|
|
|
|
|
|
|
|
import { listdeptNoAuth } from "@/api/system/department";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
file,
|
|
|
|
file,
|
|
|
|
@ -92,16 +184,21 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
role: -1,//0业务,1财务
|
|
|
|
role: -1, //0业务,1财务
|
|
|
|
select: {
|
|
|
|
select: {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
page_size: 10,
|
|
|
|
page_size: 10,
|
|
|
|
|
|
|
|
department_id: "",
|
|
|
|
|
|
|
|
projectName: "",
|
|
|
|
|
|
|
|
project_id: "",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
departments: [],
|
|
|
|
originalList: [],
|
|
|
|
originalList: [],
|
|
|
|
list: [],
|
|
|
|
list: [],
|
|
|
|
table: [
|
|
|
|
table: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: 'index',
|
|
|
|
prop: "index",
|
|
|
|
width: 60,
|
|
|
|
width: 60,
|
|
|
|
sortable: false,
|
|
|
|
sortable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -109,20 +206,21 @@ export default {
|
|
|
|
label: "项目名称",
|
|
|
|
label: "项目名称",
|
|
|
|
minWidth: 220,
|
|
|
|
minWidth: 220,
|
|
|
|
align: "left",
|
|
|
|
align: "left",
|
|
|
|
prop: 'plan.name'
|
|
|
|
prop: "project.name",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "content",
|
|
|
|
prop: "content",
|
|
|
|
label: "评审内容",
|
|
|
|
label: "评审内容",
|
|
|
|
minWidth: 220,
|
|
|
|
width: 220,
|
|
|
|
align: 'left'
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "plan_date",
|
|
|
|
prop: "plan_date",
|
|
|
|
label: "计划评审时间",
|
|
|
|
label: "计划评审时间",
|
|
|
|
width: 170,
|
|
|
|
width: 170,
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
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: "实际评审时间",
|
|
|
|
label: "实际评审时间",
|
|
|
|
width: 170,
|
|
|
|
width: 170,
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
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: {
|
|
|
|
methods: {
|
|
|
|
destroy (row) {
|
|
|
|
getDepartment() {
|
|
|
|
console.log(row)
|
|
|
|
listdeptNoAuth().then((res) => {
|
|
|
|
|
|
|
|
this.departments = res;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
destroy(row) {
|
|
|
|
|
|
|
|
console.log(row);
|
|
|
|
destroy({
|
|
|
|
destroy({
|
|
|
|
id: row.pid
|
|
|
|
id: row.pid,
|
|
|
|
}).then(res => {
|
|
|
|
}).then((res) => {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
type: 'success',
|
|
|
|
type: "success",
|
|
|
|
message: '删除成功'
|
|
|
|
message: "删除成功",
|
|
|
|
})
|
|
|
|
});
|
|
|
|
this.getList()
|
|
|
|
this.getList();
|
|
|
|
})
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async getList() {
|
|
|
|
async getList() {
|
|
|
|
const res = await index(this.select);
|
|
|
|
const res = await index(this.select);
|
|
|
|
this.originalList = res.data;
|
|
|
|
this.originalList = res.data;
|
|
|
|
this.total = res.total;
|
|
|
|
this.total = res.total;
|
|
|
|
let list = [];
|
|
|
|
let list = [];
|
|
|
|
res.data.forEach((i,index) => {
|
|
|
|
res.data.forEach((i, index) => {
|
|
|
|
if (i.item && i.item.length > 0) {
|
|
|
|
if (i.item && i.item.length > 0) {
|
|
|
|
i.item.forEach(item => {
|
|
|
|
i.item.forEach((item) => {
|
|
|
|
list.push({
|
|
|
|
list.push({
|
|
|
|
type: 0,
|
|
|
|
type: 0,
|
|
|
|
index: index+1,
|
|
|
|
index: index + 1,
|
|
|
|
plan: i.plan,
|
|
|
|
project: i.project,
|
|
|
|
pid: i.id,
|
|
|
|
pid: i.id,
|
|
|
|
...item
|
|
|
|
...item,
|
|
|
|
})
|
|
|
|
});
|
|
|
|
})
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
list.push({
|
|
|
|
list.push({
|
|
|
|
pid: i.id,
|
|
|
|
pid: i.id,
|
|
|
|
index: index+1,
|
|
|
|
index: index + 1,
|
|
|
|
type: 1,
|
|
|
|
type: 1,
|
|
|
|
...i
|
|
|
|
...i,
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.list = mergeTableRow({
|
|
|
|
this.list = mergeTableRow({
|
|
|
|
data: list,
|
|
|
|
data: list,
|
|
|
|
mergeColNames: ['index','plan.name','more'],
|
|
|
|
mergeColNames: ["index", "project.name", "more"],
|
|
|
|
firstMergeColNames: ['index',"pid",'pid'], // 受影响的列,只合并以firstMerge为首的同类型数据
|
|
|
|
firstMergeColNames: ["index", "pid", "pid"], // 受影响的列,只合并以firstMerge为首的同类型数据
|
|
|
|
firstMerge: "index",
|
|
|
|
firstMerge: "index",
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
console.log(this.list)
|
|
|
|
console.log(this.list);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//合并行
|
|
|
|
//合并行
|
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
|
@ -195,11 +301,15 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {},
|
|
|
|
computed: {},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
|
|
|
|
this.getDepartment();
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
|
next((vm) => {
|
|
|
|
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;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|