|
@@ -5,22 +5,12 @@
|
|
|
<el-scrollbar>
|
|
<el-scrollbar>
|
|
|
<el-form class="tjm_card_select_left" :model="params" label-width="80px" label-position="left">
|
|
<el-form class="tjm_card_select_left" :model="params" label-width="80px" label-position="left">
|
|
|
<el-row :gutter="15">
|
|
<el-row :gutter="15">
|
|
|
- <el-col :lg="8" :md="12" :xs="24">
|
|
|
|
|
- <el-form-item label="所属部门">
|
|
|
|
|
- <el-tree-select v-model="deptQuery.modelValue" :data="deptQuery.data" :props="deptQuery.props" check-strictly filterable clearable placeholder="请选择所属部门" @node-click="nodeClick"></el-tree-select>
|
|
|
|
|
|
|
+ <el-col :lg="8" :xs="24">
|
|
|
|
|
+ <el-form-item label="部门名称">
|
|
|
|
|
+ <el-input v-model="params.name" clearable placeholder="请输入部门名称"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <!-- <el-col :lg="8" :md="12" :xs="24">
|
|
|
|
|
- <el-form-item label="填报人">
|
|
|
|
|
- <el-input v-model="params.createName" clearable placeholder="请输入填报人"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
- <el-col :lg="8" :md="12" :xs="24">
|
|
|
|
|
- <el-form-item label="项目名称">
|
|
|
|
|
- <el-input v-model="params.name" clearable placeholder="请输入项目名称"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :lg="12" :md="16" :xs="24" class="query-date-col">
|
|
|
|
|
|
|
+ <el-col :lg="16" :xs="24" class="query-date-col">
|
|
|
<el-form-item label="填报日期">
|
|
<el-form-item label="填报日期">
|
|
|
<el-date-picker v-model="createMonth" type="month" :clearable="false" value-format="YYYY-MM" placeholder="请选择填报月份" @change="monthChange"></el-date-picker>
|
|
<el-date-picker v-model="createMonth" type="month" :clearable="false" value-format="YYYY-MM" placeholder="请选择填报月份" @change="monthChange"></el-date-picker>
|
|
|
<el-date-picker v-model="createTime" type="daterange" :disabled-date="disabledDate" :clearable="false" value-format="YYYY-MM-DD" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
<el-date-picker v-model="createTime" type="daterange" :disabled-date="disabledDate" :clearable="false" value-format="YYYY-MM-DD" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
@@ -37,29 +27,18 @@
|
|
|
</div>
|
|
</div>
|
|
|
<el-divider></el-divider>
|
|
<el-divider></el-divider>
|
|
|
|
|
|
|
|
- <div class="tjm_card_tools">
|
|
|
|
|
- <div class="tjm_card_tools_right">
|
|
|
|
|
- <el-button icon="download" @click="table_export">导出</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
<div class="tjm_card_table">
|
|
<div class="tjm_card_table">
|
|
|
- <el-table v-loading="loading" row-key="id" header-cell-class-name="tjm_card_table_header" height="400" :data="tableData" border @row-click="table_detail">
|
|
|
|
|
|
|
+ <el-table v-loading="loading" row-key="id" header-cell-class-name="tjm_card_table_header" height="400" :data="tableData" border>
|
|
|
<el-table-column type="index" label="序号" width="55"></el-table-column>
|
|
<el-table-column type="index" label="序号" width="55"></el-table-column>
|
|
|
<template v-for="(item, index) in columns" :key="index">
|
|
<template v-for="(item, index) in columns" :key="index">
|
|
|
<el-table-column :label="item.label" :prop="item.props" :min-width="item.width || 180" show-overflow-tooltip>
|
|
<el-table-column :label="item.label" :prop="item.props" :min-width="item.width || 180" show-overflow-tooltip>
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-tag v-if="item.props == 'ytbDate' && !columnFormat(scope.row, item.props)" type="info">未设置</el-tag>
|
|
<el-tag v-if="item.props == 'ytbDate' && !columnFormat(scope.row, item.props)" type="info">未设置</el-tag>
|
|
|
- <el-tag v-else-if="item.props == 'isReport' || item.props == 'isDelay'" :type="tagType(columnFormat(scope.row, item.props))">{{ columnFormat(scope.row, item.props) }}</el-tag>
|
|
|
|
|
|
|
+ <el-button v-else-if="item.props == 'count'" type="primary" link @click.stop="table_detail(scope.row)">{{ columnFormat(scope.row, item.props) }}</el-button>
|
|
|
<template v-else>{{ columnFormat(scope.row, item.props) }}</template>
|
|
<template v-else>{{ columnFormat(scope.row, item.props) }}</template>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</template>
|
|
</template>
|
|
|
- <!-- <el-table-column label="操作" fixed="right" width="100">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <el-button type="primary" link icon="tickets" @click.stop="table_detail(scope.row)">查看</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column> -->
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="tjm_card_pagination">
|
|
<div class="tjm_card_pagination">
|
|
@@ -67,52 +46,33 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
|
|
- <policy-explain v-if="dialog" ref="policyExplain" @closed="dialog = false"></policy-explain>
|
|
|
|
|
|
|
+ <policy-detail v-if="dialog" ref="policyDetail" @closed="dialog = false"></policy-detail>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
import API from "@/api/policy/progress";
|
|
import API from "@/api/policy/progress";
|
|
|
-import { getMainList } from "@/api/system/depart";
|
|
|
|
|
-import { share_columns as columns } from "@/views/progress/main";
|
|
|
|
|
-import { exportExcel } from "@/utils/exportExcel";
|
|
|
|
|
|
|
+import { dept_columns as columns, deptTypeDic } from "@/views/progress/main";
|
|
|
|
|
|
|
|
import yhPagination from "@/components/Pagination/index.vue";
|
|
import yhPagination from "@/components/Pagination/index.vue";
|
|
|
-import policyExplain from "@/views/policyStrive/explain.vue";
|
|
|
|
|
|
|
+import policyDetail from "@/views/progress/dialog.vue";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
yhPagination,
|
|
yhPagination,
|
|
|
- policyExplain
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- props: {
|
|
|
|
|
- ytbDate: { type: Number, default: 0 }
|
|
|
|
|
|
|
+ policyDetail
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- columns,
|
|
|
|
|
-
|
|
|
|
|
- deptQuery: {
|
|
|
|
|
- modelValue: null,
|
|
|
|
|
- data: [],
|
|
|
|
|
- props: {
|
|
|
|
|
- label: "name",
|
|
|
|
|
- value: "id"
|
|
|
|
|
- },
|
|
|
|
|
- paramsFormat: {
|
|
|
|
|
- 0: "deptId",
|
|
|
|
|
- 1: "companyId"
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
+ columns, deptTypeDic,
|
|
|
loading: false,
|
|
loading: false,
|
|
|
createMonth: moment().format("YYYY-MM"),
|
|
createMonth: moment().format("YYYY-MM"),
|
|
|
createTime: [moment().startOf("month").format("YYYY-MM-DD"), moment().endOf("month").format("YYYY-MM-DD")],
|
|
createTime: [moment().startOf("month").format("YYYY-MM-DD"), moment().endOf("month").format("YYYY-MM-DD")],
|
|
|
params: {
|
|
params: {
|
|
|
page: 1,
|
|
page: 1,
|
|
|
- size: 10
|
|
|
|
|
|
|
+ size: 10,
|
|
|
|
|
+ state: 0
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
total: 0,
|
|
total: 0,
|
|
@@ -123,7 +83,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- this.getDeptTree();
|
|
|
|
|
this.reloadTable();
|
|
this.reloadTable();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -132,25 +91,12 @@ export default {
|
|
|
return moment(date).valueOf() > moment(this.createMonth).endOf("month").valueOf() || moment(date).valueOf() < moment(this.createMonth).startOf("month").valueOf()
|
|
return moment(date).valueOf() > moment(this.createMonth).endOf("month").valueOf() || moment(date).valueOf() < moment(this.createMonth).startOf("month").valueOf()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- tagType(value) {
|
|
|
|
|
- return value == "否" && "danger" || "primary";
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
columnFormat(row, props) {
|
|
columnFormat(row, props) {
|
|
|
- if (props == "isReport") return row.isLand == 1 && row.sjFinishTime && "是" || "否";
|
|
|
|
|
- if (props == "isDelay") {
|
|
|
|
|
- if (!row.ytbDate) return "否";
|
|
|
|
|
- if (row.isLand == 1 && row.sjFinishTime) return moment(row.ytbDate).diff(row.sjFinishTime) < 0 && "是" || "否";
|
|
|
|
|
- else return moment().diff(row.ytbDate) > 0 && "是" || "否";
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if (props == "ytbDate") return row[props] && (this.createMonth + "-" + row[props]) || "";
|
|
|
|
|
+ if (props == "deptType") return deptTypeDic[row[props]] || "";
|
|
|
return row[props];
|
|
return row[props];
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- getDeptTree() {
|
|
|
|
|
- getMainList().then(res => this.deptQuery.data = res.data);
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
reloadTable() {
|
|
reloadTable() {
|
|
|
this.params.beginCreateTime = this.createTime[0] + " 00:00:00";
|
|
this.params.beginCreateTime = this.createTime[0] + " 00:00:00";
|
|
|
this.params.endCreateTime = this.createTime[1] + " 23:59:59";
|
|
this.params.endCreateTime = this.createTime[1] + " 23:59:59";
|
|
@@ -158,36 +104,18 @@ export default {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
API.progress.share(this.params).then(res => {
|
|
API.progress.share(this.params).then(res => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
- this.tableData = res.data.records.map(item => {
|
|
|
|
|
- item.ytbDate = this.ytbDate && (this.createMonth + "-" + this.ytbDate) || "";
|
|
|
|
|
- return item;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.tableData = res.data.records;
|
|
|
this.total = res.data.total;
|
|
this.total = res.data.total;
|
|
|
}).catch(() => this.loading = false);
|
|
}).catch(() => this.loading = false);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- nodeClick({ deptType, id }) {
|
|
|
|
|
- for (const key in this.deptQuery.paramsFormat) {
|
|
|
|
|
- this.params[this.deptQuery.paramsFormat[key]] = null;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- this.params[this.deptQuery.paramsFormat[deptType]] = id;
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
monthChange(e) {
|
|
monthChange(e) {
|
|
|
this.createTime = [moment(e).startOf("month").format("YYYY-MM-DD"), moment(e).endOf("month").format("YYYY-MM-DD")];
|
|
this.createTime = [moment(e).startOf("month").format("YYYY-MM-DD"), moment(e).endOf("month").format("YYYY-MM-DD")];
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- table_export() {
|
|
|
|
|
- const header = columns.map(c => c.label);
|
|
|
|
|
- const data = this.tableData.map(v => columns.map(c => c.props).map(j => this.columnFormat(v, j)));
|
|
|
|
|
-
|
|
|
|
|
- exportExcel(header, data, [], `${this.$route.name}.xlsx`);
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
table_detail(row) {
|
|
table_detail(row) {
|
|
|
this.dialog = true;
|
|
this.dialog = true;
|
|
|
- nextTick(() => this.$refs.policyExplain.open("detail").setData(row.id));
|
|
|
|
|
|
|
+ nextTick(() => this.$refs.policyDetail.open().setData(row));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -212,9 +140,13 @@ export default {
|
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- .tjm_card_tools {
|
|
|
|
|
- justify-content: flex-end;
|
|
|
|
|
|
|
+@media (min-width: 1200px) {
|
|
|
|
|
+ .tjm_card_style_custom :deep(.query-date-col) {
|
|
|
|
|
+ .el-date-editor.el-date-editor--month + .el-date-editor {
|
|
|
|
|
+ max-width: 240px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|