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

数据修改

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