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

2.2.0二期逻辑大改

上级 c1ac002e
......@@ -2193,11 +2193,10 @@ export default {
},
selectableTableList(row, index) {
if (this.status4Flag == 1) {
if (row.status == 1) {
//console.log("scopeReq",this.scopeReq);
return false;
}
if(row.id == 1200) {
// if (row.status == 1) {
// return false;
// }
if (row.setFlag == false) {
return false;
}
return true;
......@@ -2525,7 +2524,7 @@ export default {
initOrganizationStatus() {
let tableStatus = this.tableOrganization;
tableStatus.forEach(row => {
if (row.status == 1) {
if (row.status == 1 && row.setFlag == true) {
this.$nextTick(function() {
this.$refs.multipleOrganization.toggleRowSelection(row);
});
......@@ -2634,16 +2633,20 @@ export default {
getOrganization() {
let req = {
projectId: this.projectId,
setKind: this.getKind("administrative"),
// scope: "000_110",
administrativeId: '',
hospitalLevel: '',
hospitalLevel: '',
// setKind: this.getKind("administrative"),
scope: this.getScope("administrative"),
pageNum: this.formOrganization.pageNum,
pageSize: this.formOrganization.pageSize
};
if (req.setKind == 3) {
req.scope = this.getScope("administrative");
}
// if (req.setKind == 3) {
// req.scope = this.getScope("administrative");
// }
openLoading(vm);
vm.POST("portal/scope/v1/organization", req).then(res => {
// vm.POST("portal/scope/v1/organization", req).then(res => {
vm.POST("portal/new/scope/org/v1/organization", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
this.tableOrganization = res.data.organizationList;
......@@ -3535,14 +3538,34 @@ export default {
});
},
selectAllOrganization(selection) {
console.log('selectAll',selection)
let setList = [];
for(let i=0;i<vm.tableOrganization.length;i++) {
if(vm.tableOrganization[i].setFlag == true) {
setList.push(vm.tableOrganization[i].id)
}
}
// let = this.$refs.multipleTable.selection
console.log('selectAll',selection,setList);
},
selectOrganization(selection, row) {
console.log('select',selection,row)
let flag = false;
for(let i=0;i<selection.length;i++) {
if(selection[i].id == row.id) {
flag = true;
}
}
let req = {
ids: [
row.id
],
projectId: this.projectId,
type: flag === false ? 0 : 1
};
openLoading(vm);
vm.GET("portal/new/scope/org/v1/organization/option", req).then(res => {
closeLoading(vm);
});
},
}
};
......
......@@ -155,6 +155,12 @@
type="primary"
size="small"
>删除</el-button>
<el-button
@click="toShield(scope.row)"
v-show="scope.row.blackModifiable == true"
type="primary"
size="small"
>屏蔽</el-button>
</template>
</el-table-column>
<div slot="empty">
......@@ -288,6 +294,9 @@ export default {
toPage() {
this.$router.push("add-manager");
},
toShield(row) {
this.$router.push("item-shield?projectId="+row.id);
},
searchList() {
this.formInline.pageNo = 1;
this.getProjectList();
......
......@@ -206,32 +206,31 @@ export default {
},
// 挂载到Dom完成时
mounted: function() {
window.onbeforeunload = function(e) {
let pathname = location.href.split("/");
pathname = pathname[pathname.length - 1];
console.log(pathname);
if (pathname == "item-shield") {
e = e || window.event;
if (e) {
e.returnValue = "数据不会保存";
}
return "数据不会保存";
}
};
// window.onbeforeunload = function(e) {
// let pathname = location.href.split("/");
// pathname = pathname[pathname.length - 1];
// console.log(pathname);
// if (pathname == "item-shield") {
// e = e || window.event;
// if (e) {
// e.returnValue = "数据不会保存";
// }
// return "数据不会保存";
// }
// };
commonUtil.resizeHeight();
},
beforeRouteLeave(to, from, next) {
const answer = window.confirm(
"Do you really want to leave? you have unsaved changes!"
);
if (answer) {
next();
} else {
next(false);
}
// const answer = window.confirm(
// "Do you really want to leave? you have unsaved changes!"
// );
// if (answer) {
// next();
// } else {
// next(false);
// }
},
destroyed() {},
methods: {
handleChange(value) {
let areaId = '000';
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册