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

2.2.0二期逻辑大改

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