提交 45d3be6e 编写于 作者: zhentian.jia's avatar zhentian.jia

数据修改

上级 c4310e63
......@@ -470,12 +470,12 @@ export function getRank(xAxisData, seriesData) {
};
return option;
}
export function getSearchType(formData) {
export function getSearchType(formData,checkAll) {
let type = 0;
if (formData.region.length == 1 || formData.region.length == 2) {
type = formData.region.length;
} else if (formData.region.length == 3) {
if (formData.organization.length == 0) {
if (formData.organization.length == 0 || checkAll === true) {
type = 3;
} else {
type = 4
......@@ -501,19 +501,20 @@ export function getIds(formData, organizationList, checkAll) {
} else {
//机构id 选了'全部'
if (checkAll === true) {
for (let i = 0; i < organizationList.length; i++) {
if (organizationList[i].value != 0) {
ids += organizationList[i].value + ',';
}
}
// for (let i = 0; i < organizationList.length; i++) {
// if (organizationList[i].value != 0) {
// ids += organizationList[i].value + ',';
// }
// }
ids = formData.region[formData.region.length - 1];
} else {
for (let i = 0; i < formData.organization.length; i++) {
if (formData.organization[i] != 0) {
ids += formData.organization[i] + ',';
}
}
ids = ids.substring(0, ids.length - 1);
}
ids = ids.substring(0, ids.length - 1);
}
return ids;
}
......
......@@ -41,7 +41,7 @@
</el-form-item>
</el-form>
<div class="form-button">
<el-button @click="search()" type="primary">查询</el-button>
<el-button @click="searchData()" type="primary">查询</el-button>
<el-button @click="resetForm()">重置</el-button>
</div>
<el-table :data="tableData" class="course-table">
......@@ -173,10 +173,27 @@ export default {
commonUtil.resizeHeight();
},
methods: {
getHostital() {
let req = {
projectId: vm.queryData.projectId,
hospitalIds: vm.queryData.ids,
};
vm.GET("report/portal/getHostitalName", req).then(res => {
if (res.code == "000000") {
}
});
},
getInitData() {
vm.queryData = this.$route.query;
vm.tableType = vm.queryData.tableType;
console.log("queryData", vm.queryData);
if(vm.queryData.type == 4) {
vm.getHostital();
}
},
searchData() {
vm.formData.pageNo = 1;
vm.search();
},
search() {
let query = this.queryData;
......
......@@ -56,7 +56,7 @@
</el-form-item>
</el-form>
<div class="form-button">
<el-button @click="search()" type="primary">查询</el-button>
<el-button @click="searchData()" type="primary">查询</el-button>
<el-button @click="resetForm()">重置</el-button>
</div>
<div class="line"></div>
......@@ -136,9 +136,9 @@ export default {
return {
formData: {
achievementStatus: "",
status: 3,
status: 1,
pageNo: 1,
pageSize: 2,
pageSize: 10,
},
achievementList: [
//项目状态
......@@ -159,22 +159,20 @@ export default {
//项目状态
{
label: "全部",
value: 3
value: 1
},
{
label: "归入统计",
value: 1
value: 2
},
{
label: "移除统计",
value: 2
value: 3
},
],
tableData: [],
multipleSelection: [], //被选中的行
totalRows: 0, //数据总数
pageNo: 1, //当前是第几页
pageSize: 2, //页面总数
getRowKeys(row) {
return row.doctorId;
},
......@@ -196,6 +194,7 @@ export default {
//父组件传值
this.$on("search", () => {
this.search();
this.$refs.multipleTable.clearSelection();
});
},
methods: {
......@@ -231,10 +230,15 @@ export default {
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
vm.formData.pageNo = val;
vm.search();
},
close() {
this.$emit("closeDialog");
},
searchData() {
vm.formData.pageNo = 1;
vm.search();
},
search() {
let checkAll = operationData.hasAll(vm.formInline.organization);
let req = {
......@@ -242,7 +246,7 @@ export default {
achievementStatus: vm.formData.achievementStatus,
status: vm.formData.status,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline),
type: operationData.getSearchType(vm.formInline,checkAll),
pageNo: vm.formData.pageNo,
pageSize: vm.formData.pageSize,
};
......
......@@ -98,6 +98,7 @@ export default {
mounted: function() {
this.$on('search',()=>{
// console.log(this.formInline);
this.pageNo = 1;
this.search();
});
this.$on("init", () => {
......@@ -124,7 +125,7 @@ export default {
let req = {
projectId: vm.projectId,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline),
type: operationData.getSearchType(vm.formInline,checkAll),
originalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("3 req", req);
......@@ -154,19 +155,19 @@ export default {
routerData.tableType = 1;
routerData.courseId = data.courseId;
routerData.ids = operationData.getIds(vm.formInline,vm.organizationList,checkAll);
routerData.type = operationData.getSearchType(vm.formInline),
routerData.type = operationData.getSearchType(vm.formInline,checkAll),
routerData.originalFlag = vm.formInline.checked == false ? 0 : 1
this.$router.push({ path: '/course-training', query: routerData});
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.vm.pageSize = val;
vm.pageSize = val;
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.vm.pageNo = val;
this.search();
vm.pageNo = val;
vm.search();
},
},
}
......
......@@ -87,7 +87,7 @@ export default {
let req = {
projectId: vm.projectId,
cityOrHospitalId: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
kind: operationData.getSearchType(vm.formInline),
kind: operationData.getSearchType(vm.formInline,checkAll),
type: vm.radio,
originalFlag: vm.formInline.checked == false ? 0 : 1
};
......
......@@ -96,7 +96,8 @@ export default {
// 挂载到Dom完成时
mounted: function() {
this.$on('search',()=>{
console.log(this.formInline);
// console.log(this.formInline);
this.pageNo = 1;
this.search();
});
this.$on("init", () => {
......@@ -123,7 +124,7 @@ export default {
let req = {
projectId: vm.projectId,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline),
type: operationData.getSearchType(vm.formInline,checkAll),
originalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("4 req", req);
......@@ -163,7 +164,7 @@ export default {
// 换页
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
vm.pageNo = value
vm.pageNo = val
vm.search()
}
}
......
......@@ -125,7 +125,7 @@ export default {
let req = {
projectId: vm.projectId,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline),
type: operationData.getSearchType(vm.formInline,checkAll),
originalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("1 req", req);
......@@ -200,11 +200,11 @@ export default {
},
{
title: "已参与人数",
num: data.participatePeopleCount,
num: data.hasParticipatePeopleCount,
},
{
title: "项目获证人数",
num: data.participatePeopleCount,
num: data.acquireCertificatePeopleCount,
}];
for(let i=0;i<data.manyCertificate.length;i++) {
let obj = {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册