|
|
@@ -27,7 +27,7 @@
|
|
|
:showCheckSub="false"
|
|
|
></org-tree>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+
|
|
|
<el-form-item label="统计周期" prop="cycle">
|
|
|
<el-select v-model="queryParams.cycle" placeholder="请选择统计周期">
|
|
|
<el-option
|
|
|
@@ -39,9 +39,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item v-if="queryParams.cycle==1 || queryParams.cycle==null" label="时间" prop="year">
|
|
|
- <el-date-picker v-model="queryParams.year" align="right"
|
|
|
- placeholder="请选择查询时间" type="month" value-format='yyyy-MM'>
|
|
|
+ <el-form-item v-if="queryParams.cycle==1 || queryParams.cycle==null" label="时间" prop="date">
|
|
|
+ <el-date-picker value-format='yyyy-MM-dd' v-model="queryParams.date" type="monthrange" range-separator="至"
|
|
|
+ align="right" start-placeholder="开始月份" end-placeholder="结束月份" @focus="datePositionMonth">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
|
|
|
@@ -50,7 +50,9 @@
|
|
|
v-model="queryParams.year"
|
|
|
placeholder="选择年份"
|
|
|
type="year"
|
|
|
- value-format='yyyy'>
|
|
|
+ value-format='yyyy'
|
|
|
+ @focus="datePositionYear"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -105,6 +107,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import {deptTreeSelect} from "@/api/system/public";
|
|
|
//import orgTree from "@/components/orgTree";
|
|
|
import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
|
|
|
+import {Message} from "element-ui";
|
|
|
export default {
|
|
|
dicts: ['sys_normal_disable', 'sys_org_type'],
|
|
|
name: "Check",
|
|
|
@@ -140,8 +143,6 @@ export default {
|
|
|
roleOptions: [],
|
|
|
//全部检查机构
|
|
|
orgOptions: [],
|
|
|
- //搜索tree
|
|
|
- deptName: null,
|
|
|
// 部门树选项
|
|
|
deptOptions: [],
|
|
|
// 总条数
|
|
|
@@ -160,14 +161,11 @@ export default {
|
|
|
pageSize: 10,
|
|
|
orgId: null,
|
|
|
year: new Date(),
|
|
|
- cycle: 1
|
|
|
+ cycle: 1,
|
|
|
+ date:[new Date(),new Date()]
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
- // 表单校验
|
|
|
- checkList: [],
|
|
|
- roleOptions: [],
|
|
|
- defaultKeys: [],
|
|
|
//是否关联下级
|
|
|
checked: false,
|
|
|
defaultProps: {
|
|
|
@@ -251,6 +249,25 @@ export default {
|
|
|
|
|
|
|
|
|
getList() {
|
|
|
+ if (!this.queryParams || !this.queryParams.cycle){
|
|
|
+ Message.error("请选择统计周期");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //cycle 1.月份 2.年份
|
|
|
+ if (this.queryParams.cycle === 2 && !this.queryParams.year){
|
|
|
+ Message.error("请选择统统计年份");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.queryParams.cycle === 1 && !this.queryParams.date){
|
|
|
+ Message.error("请选择统统计月份范围");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.queryParams.cycle === 1){
|
|
|
+ this.queryParams.year = null;
|
|
|
+ }
|
|
|
+ if (this.queryParams.cycle === 2){
|
|
|
+ this.queryParams.date = null;
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
listSelfReport(this.queryParams).then(response => {
|
|
|
this.orgName = response.orgName;
|
|
|
@@ -296,6 +313,7 @@ export default {
|
|
|
resetQuery() {
|
|
|
this.resetForm("queryForm");
|
|
|
this.queryParams.orgId=this.orgId;
|
|
|
+ this.queryParams.date = [new Date(),new Date()]
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
@@ -305,7 +323,26 @@ export default {
|
|
|
this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
-
|
|
|
+ datePositionYear(e){
|
|
|
+ this.$nextTick(() => {
|
|
|
+ e.popperJS.state.position = 'absolute';
|
|
|
+ setTimeout(() => {
|
|
|
+ e.picker.$el.style.top = '16%'
|
|
|
+ e.picker.$el.style.left = '47%'
|
|
|
+ },0)
|
|
|
+ e.popperJS.update();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ datePositionMonth(e){
|
|
|
+ this.$nextTick(() => {
|
|
|
+ e.popperJS.state.position = 'absolute';
|
|
|
+ setTimeout(() => {
|
|
|
+ e.picker.$el.style.top = '16%'
|
|
|
+ e.picker.$el.style.left = '30%'
|
|
|
+ },0)
|
|
|
+ e.popperJS.update();
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -316,4 +353,4 @@ export default {
|
|
|
width: 264px;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|