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

change btn

上级 7546d864
......@@ -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,9 +27,23 @@
<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-cascader
<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"
:options="optionsRegion"
......@@ -47,40 +61,28 @@
</template>
</el-cascader>
</el-col>
<el-col v-show="timeFlag2 == 1" :span="12">
<el-select
size="small"
v-model="timeFlag3"
placeholder="请选择"
style="width:330px;"
@change="changeTimeFlag3"
>
<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>
<!--<el-form-item label="选择机构:">
<div class="form-text" v-if="optionsRegion.length == 1 && hospitalCntList.length == 1">{{ hospitalCntList[0].hospitalName }}</div>
<el-select
v-else
size="small"
v-model="formInline.organization"
:placeholder="organizationNotice"
@change="changeOrganization"
multiple
collapse-tags
:disabled="areaLen < 3"
style="width:330px"
>
<el-option
v-for="item in organizationList"
:key="item.index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</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() {
......@@ -700,6 +701,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 = {
......@@ -775,22 +783,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 +822,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 +839,6 @@ export default {
});
},
search() {
// console.log('formInline',vm.formInline);
if(vm.formInline.timeFlag == 1) {
//截止昨日
vm.setExportReq();
......@@ -850,20 +861,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() {
......@@ -1066,8 +1063,8 @@ export default {
border-bottom: 1px solid rgba(39, 0, 8, 0.1) !important;
}
// .el-cascader-node.in-active-path,
// .el-cascader-node.is-active,
// .el-cascader-node.in-active-path,
// .el-cascader-node.is-active,
// .el-cascader-node.is-selectable.in-checked-path {
// border-bottom: 1px solid rgba(39, 0, 8, 0.1) !important;
// }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册