提交 d95530e3 编写于 作者: 张磊's avatar 张磊

Merge branch 'feature/zl' into 'release'

Feature/zl

See merge request com.pica.cloud.education.frontend/pica.cloud.web-education-admin!501
......@@ -6,7 +6,7 @@
"private": true,
"license": "GPL",
"scripts": {
"dev": "cross-env BUILD_ENV=test node build/dev-server.js",
"dev": "cross-env BUILD_ENV=uat node build/dev-server.js",
"local": "cross-env BUILD_ENV=development node build/dev-server.js",
"build": "node build/build.js",
"build:dev": "cross-env BUILD_ENV=dev node build/build.js",
......
......@@ -190,7 +190,6 @@ export default {
endDate: operationData.setDuringTime(vm.formInline.during, "end"),
hospitalIdList: vm.formInline.organization,
originalFlag: vm.formInline.checked == false ? 2 : 1,
// regionId: vm.formInline.region[vm.formInline.region.length - 1],
regionId: vm.formInline.selectRegionId,
timeFlag: vm.formInline.timeFlag
};
......
......@@ -586,7 +586,6 @@ export default {
if (vm.formInline.organization.length == 0) {//无机构
let req = {
projectId: vm.projectId,
// regionId: vm.formInline.region[vm.formInline.region.length - 1]
regionId: vm.formInline.selectRegionId
};
vm.GET("stats/region/hospitals/cnt", req, '', '', true).then(res => {
......
......@@ -27,8 +27,22 @@
<el-form v-if="staticData == 0" class="item-form" ref="formInline" :model="formInline" label-width="80px">
<div class="form-title">查询条件</div>
<el-form-item label="选择地区:">
<!-- :props="props" -->
<el-col :span="12">
<el-select
size="small"
v-model="timeFlag2"
placeholder="请选择"
style="width:330px;"
>
<el-option
v-for="item in timeFlagList2"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col v-show="timeFlag2 == 2" :span="12">
<el-cascader
size="small"
ref="cascaderRegion"
......@@ -47,40 +61,28 @@
</template>
</el-cascader>
</el-col>
<el-col :span="6">
<el-checkbox v-if="showOriginal == 1" size="small" v-model="formInline.checked">查看原始数据</el-checkbox>
</el-col>
</el-form-item>
<!--<el-form-item label="选择机构:">
<div class="form-text" v-if="optionsRegion.length == 1 && hospitalCntList.length == 1">{{ hospitalCntList[0].hospitalName }}</div>
<el-col v-show="timeFlag2 == 1" :span="12">
<el-select
v-else
size="small"
v-model="formInline.organization"
:placeholder="organizationNotice"
@change="changeOrganization"
multiple
collapse-tags
:disabled="areaLen < 3"
style="width:330px"
v-model="timeFlag3"
placeholder="请选择"
style="width:330px;"
@change="changeTimeFlag3"
>
<el-option
v-for="item in organizationList"
:key="item.index"
:label="item.label"
:value="item.value"
></el-option>
v-for="item in hslist"
:key="item.value"
:label="item.hospitalName"
:value="item.hospitalId">
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item>
<el-col :span="6">
<el-checkbox v-if="showOriginal == 1" size="small" v-model="formInline.checked">查看原始数据</el-checkbox>
</el-col>
</el-form-item>
<div class="tag-group">
<el-tag
v-for="tag in tags"
:key="tag.value"
type="info"
closable
@close="handleTagClose(tag)"
>{{ tag.label }}</el-tag>
</div>-->
<el-form-item label="选择时间:">
<el-col :span="12">
<el-select
......@@ -112,9 +114,6 @@
</el-col>
</el-form-item>
<div class="buttom-line"></div>
<!-- <el-form-item label v-if="showOriginal !== 1">
<el-checkbox size="small" v-model="formInline.checked">查看原始数据</el-checkbox>
</el-form-item> -->
<div v-if="staticData == 0" class="form-button">
<el-button size="small" @click="search()" type="primary">查询</el-button>
<el-button size="small" @click="resetForm()">重置</el-button>
......@@ -345,6 +344,14 @@ export default {
return time.getTime() > new Date(this.maxDate).getTime() || time.getTime() < new Date(this.minDate).getTime() - 8.64e7;
}
},
timeFlagList2: [
{value:1, label:'层级'},
{value:2, label:'地区'}
],
timeFlag2: 2,
timeFlag3: '',
currentTimeFlag3: {},
hslist: [],
};
},
computed: {
......@@ -367,16 +374,10 @@ export default {
this.curmbThird = vm.getUrlSearch(window.location.href, "projectName");
this.downloadId = vm.getUrlSearch(window.location.href, "downloadId");
this.checkShowType();
this.getRegionOption2();
},
mounted: function() {
commonUtil.resizeHeight();
// setInterval(function() {
// document.querySelectorAll(".el-cascader-node").forEach(el => {
// el.onclick = function() {
// if (this.previousElementSibling) this.previousElementSibling.click();
// };
// });
// }, 1000);
},
methods: {
checkShowType() {
......@@ -454,26 +455,6 @@ export default {
//获取地区
vm.getRegionOption();
/*let reqInfo = {
projectId: vm.projectId,
};
vm.GET("stats/region/info", reqInfo).then(res => {
if (res.code == "000000") {
vm.showOriginal = res.data.status;
vm.roleType = res.data.roleType;
vm.displayCourse = res.data.existCourse;
vm.displayExam = res.data.existExam;
vm.displayEffect = res.data.existEffect;
vm.certFlag = res.data.certFlag;
vm.maxDate = new Date(res.data.maxDate);
vm.minDate = new Date(res.data.minDate);
vm.containOfficialFlag = res.data.containOfficialFlag;
vm.finalDateFlag = res.data.finalDateFlag;
vm.setTimeFlagList();
vm.getRegionOption();
}
});*/
},
beforeLeave(activeName, oldActiveName) {
// console.log('action',activeName,'oldActive',oldActiveName)
......@@ -700,6 +681,13 @@ export default {
}
});
},
getRegionOption2() {
vm.GET(`hospital/hospitalStats/portal/hospital/deepLowers/${vm.projectId}`, '', '', '', true).then(res => {
if (res.code == "000000") {
this.hslist = res.data;
}
});
},
//获取机构
gethHspitalsCnt() {
let req = {
......@@ -728,27 +716,6 @@ export default {
});
},
//获取机构列表--V2.1弃用
/*getOrganizationList() {
vm.organizationList = [];
let regionId = vm.formInline.region[vm.formInline.region.length - 1];
let req = {
projectId: vm.projectId,
regionId : regionId
};
vm.GET("stats/region/hospital", req, '', '', true).then(res => {
if (res.code == "000000") {
this.organizationList = operationData.getLearnOrganization(
res.data.list
);
// // added by Anndy Yang
// if(this.organizationList.length == 1) {
// vm.formInline.organization = [];
// vm.formInline.organization = vm.organizationList[0].value
// }
}
});
},*/
getOrganizationNum() {
//选择全部
let num = 0;
......@@ -775,22 +742,32 @@ export default {
// }else {
// sureOriginalFlag = (vm.formInline.checked == false ? 2 : 1);
// }
const hl = this.timeFlag2 == 2 ? vm.formInline.organization : [this.currentTimeFlag3.hospitalId];
const regionId = this.timeFlag2 == 2 ? vm.formInline.selectRegionId : this.currentTimeFlag3.regionId;
vm.exportReq = {
projectId: vm.projectId,
beginDate: operationData.setDuringTime(vm.formInline.during,'begin'),
endDate: operationData.setDuringTime(vm.formInline.during,'end'),
hospitalIdList: vm.formInline.organization,
hospitalIdList: hl,
originalFlag: vm.formInline.checked == false ? 2 : 1,
// regionId: vm.formInline.region[vm.formInline.region.length - 1],
regionId: vm.formInline.selectRegionId,
regionId: regionId,
timeFlag: vm.formInline.timeFlag,
};
console.log('--vm.exportReq ', vm.exportReq );
},
changeTimeFlag(value) {
if(value == 1) {
vm.formInline.during = null;
}
},
changeTimeFlag3(v) {
const l = this.hslist.filter( i => { return i.hospitalId == this.timeFlag3; })[0];
console.log('--v', l, this.timeFlag3)
this.currentTimeFlag3 = l;
vm.formInline.selectRegionId = this.currentTimeFlag3.regionId;
vm.formInline.organization = [this.currentTimeFlag3.hospitalId];
},
exportTime() {
let req = {
projectId: vm.projectId,
......@@ -804,12 +781,6 @@ export default {
hospitalNames: vm.dialogData.organization,
regionNames: vm.dialogData.region,
};
// if(vm.organizationList.length == 1) {
// req.hospitalIdList = [];
// req.hospitalIdList[0] = vm.organizationList[0].value;
// }
// if(req.regionNames == '全部') {
//全部地区 机构只有一个情况
if(vm.hospitalCntList.length == 1) {
req.hospitalIdList = [];
req.hospitalIdList[0] = vm.hospitalCntList[0].hospitalId;
......@@ -827,7 +798,6 @@ export default {
});
},
search() {
// console.log('formInline',vm.formInline);
if(vm.formInline.timeFlag == 1) {
//截止昨日
vm.setExportReq();
......@@ -850,20 +820,6 @@ export default {
vm.dialogSearch = true;
}
}
// if (this.activeName == "first") {
// this.organizationNum = this.getOrganizationNum();
// // console.log('this.organizationNum',this.organizationNum)
// this.$nextTick(function() {
// this.$refs.childPart.$emit("search");
// });
// } else if (this.activeName == "second") {
// this.$refs.childCrowd.$emit("search");
// } else if (this.activeName == "third") {
// this.$refs.childCourse.$emit("search");
// } else if (this.activeName == "fourth") {
// this.$refs.childExam.$emit("search");
// }
},
//重置
resetForm() {
......@@ -896,7 +852,7 @@ export default {
}
vm.areaLen = 0;
vm.tags = [];
vm.timeFlag2 = 2
setTimeout(function(){
vm.search();
},20)
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册