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

对接新建项目中的选择范围接口 改小bug

上级 7baf82f9
...@@ -146,6 +146,7 @@ module.exports = { ...@@ -146,6 +146,7 @@ module.exports = {
GET(api, para, callback,str) { GET(api, para, callback,str) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE" // para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
let url = api + this.getUrlPara(para) let url = api + this.getUrlPara(para)
url = encodeURI(url);
return fetch({ return fetch({
url: getBaseUrl(url), url: getBaseUrl(url),
method: 'get', method: 'get',
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
class="bg-img" class="bg-img"
src="../../assets/image/small.png" src="../../assets/image/small.png"
> >
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i> -->
<div class="limit-text"> <div class="limit-text">
<p>尺寸:48*48</p> <p>尺寸:48*48</p>
<p>限制大小: 500Kb</p> <p>限制大小: 500Kb</p>
...@@ -81,7 +81,6 @@ ...@@ -81,7 +81,6 @@
</el-form-item> </el-form-item>
<el-form-item label="封面图片(视频):" prop="attachmentUrl2"> <el-form-item label="封面图片(视频):" prop="attachmentUrl2">
<el-upload <el-upload
size="mini"
v-model="formData.attachmentUrl2" v-model="formData.attachmentUrl2"
class="bg-uploader" class="bg-uploader"
action="#" action="#"
...@@ -94,7 +93,7 @@ ...@@ -94,7 +93,7 @@
class="bg-img" class="bg-img"
src="../../assets/image/small.png" src="../../assets/image/small.png"
> >
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i> -->
<div class="limit-text"> <div class="limit-text">
<p>尺寸:750*420</p> <p>尺寸:750*420</p>
<p>限制大小: 2.0 Mb</p> <p>限制大小: 2.0 Mb</p>
...@@ -108,9 +107,12 @@ ...@@ -108,9 +107,12 @@
v-model="formData.attachmentUrl3" v-model="formData.attachmentUrl3"
class="upload-pdf" class="upload-pdf"
action="#" action="#"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-upload="beforeUploadPDF" :before-upload="beforeUploadPDF"
:on-change="handleChange"
:before-remove="beforeRemove"
multiple multiple
:limit="3"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:file-list="fileList" :file-list="fileList"
> >
...@@ -151,27 +153,35 @@ ...@@ -151,27 +153,35 @@
<el-tab-pane label="设定机构" name="second"> <el-tab-pane label="设定机构" name="second">
<el-form :inline="true" :model="formOrganization" class="demo-form-inline"> <el-form :inline="true" :model="formOrganization" class="demo-form-inline">
<el-form-item label> <el-form-item label>
<el-input v-model="formOrganization.name" placeholder="请输入机构名称"></el-input> <el-input size="mini" v-model="formOrganization.name" placeholder="请输入机构名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label> <el-form-item label>
<el-select v-model="formOrganization.region" placeholder="全部地区"> <el-select size="mini" v-model="formOrganization.region" placeholder="全部地区">
<el-option label="全部地区" value></el-option> <el-option
<el-option label="区域一" value="shanghai"></el-option> v-for="(item, index) in organizationRegion"
<el-option label="区域二" value="beijing"></el-option> :key="index"
:label="item.label"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="formOrganization.grade" placeholder="全部医院级别"> <el-select size="mini" v-model="formOrganization.grade" placeholder="全部医院级别">
<el-option label="全部医院级别" value></el-option> <el-option
<el-option label="三家" value="3"></el-option> v-for="(item, index) in organizationRank"
<el-option label="二甲" value="2"></el-option> :key="index"
<el-option label="一甲" value="1"></el-option> :label="item.label"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" type="primary" @click="">搜索</el-button>
</el-form-item>
<el-form-item style="float:right;">
<el-button-group> <el-button-group>
<el-button type @click="checkAll(true)">选择全部</el-button> <el-button size="small" type="default" @click="checkAll(true,'multipleOrganization')">选择全部</el-button>
<el-button type @click="checkAll(false)">全部不选</el-button> <el-button size="small" type="default" @click="checkAll(false,'multipleOrganization')">全部不选</el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -185,30 +195,27 @@ ...@@ -185,30 +195,27 @@
> >
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="name" label="医院名称"></el-table-column> <el-table-column prop="name" label="医院名称"></el-table-column>
<el-table-column prop="grade" label="医院级别"></el-table-column> <el-table-column prop="hospitalLevel" label="医院级别"></el-table-column>
<el-table-column prop="province" label="所属省份"></el-table-column> <el-table-column prop="provinceName" label="所属省份"></el-table-column>
<el-table-column prop="city" label="所属城市"></el-table-column> <el-table-column prop="cityName" label="所属城市"></el-table-column>
<el-table-column prop="district" label="所属区县"></el-table-column> <el-table-column prop="countyName" label="所属区县"></el-table-column>
<el-table-column prop="street" label="所属街道"></el-table-column> <el-table-column prop="townName" label="所属街道"></el-table-column>
</el-table> </el-table>
<el-pagination <div class="pagination">
@size-change="handleSizeOrganization" <el-pagination
@current-change="handleCurrentOrganization" background
:current-page="currentOrganization" @size-change="handleSizeOrganization"
:page-sizes="[2, 3, 4]" @current-change="handleCurrentOrganization"
:page-size="pageSizeOrganization" :current-page="formOrganization.pageNum"
layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 40]"
:total="totalOrganization" :page-size="formOrganization.pageSize"
></el-pagination> layout="total, sizes, prev, pager, next, jumper"
:total="totalOrganization"
></el-pagination>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="设定科室" name="third"> <el-tab-pane label="设定科室" name="third">
<el-col :span="8"> <el-col :span="8">
<el-select v-model="formDepartment.grade" placeholder="全部医院级别">
<el-option label="全部医院级别" value></el-option>
<el-option label="三家" value="3"></el-option>
<el-option label="二甲" value="2"></el-option>
<el-option label="一甲" value="1"></el-option>
</el-select>
<el-table <el-table
class="department" class="department"
ref="multipleDepartment" ref="multipleDepartment"
...@@ -225,20 +232,34 @@ ...@@ -225,20 +232,34 @@
<el-tab-pane label="设定人员" name="fourth"> <el-tab-pane label="设定人员" name="fourth">
<el-form :inline="true" :model="formPersonnel" class="demo-form-inline"> <el-form :inline="true" :model="formPersonnel" class="demo-form-inline">
<el-form-item label> <el-form-item label>
<el-select v-model="formPersonnel.hospital" placeholder="全部医院"> <el-select size="mini" v-model="formPersonnel.hospital" placeholder="全部医院">
<el-option label="全部医院" value></el-option> <el-option
<el-option label="上海第一人民医院" value="shanghai"></el-option> v-for="(item, index) in organizationRank"
<el-option label="北京医院" value="beijing"></el-option> :key="index"
:label="item.label"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="formPersonnel.department" placeholder="全部部门"> <el-select size="mini" v-model="formPersonnel.department" placeholder="全部部门">
<el-option label="全部部门" value></el-option> <el-option
<el-option label="内科" value="3"></el-option> v-for="(item, index) in organizationRank"
<el-option label="外科" value="2"></el-option> :key="index"
<el-option label="心内科" value="1"></el-option> :label="item.label"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="getPeople">搜索</el-button>
</el-form-item>
<el-form-item style="float:right;">
<el-button-group>
<el-button size="small" type="default" @click="checkAll(true,'multiplePerson')">选择全部</el-button>
<el-button size="small" type="default" @click="checkAll(false,'multiplePerson')">全部不选</el-button>
</el-button-group>
</el-form-item>
</el-form> </el-form>
<el-table <el-table
class="rim" class="rim"
...@@ -250,21 +271,24 @@ ...@@ -250,21 +271,24 @@
> >
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="name" label="人员名称"></el-table-column> <el-table-column prop="name" label="人员名称"></el-table-column>
<el-table-column prop="hospital" label="所属医院"></el-table-column> <el-table-column prop="hospitalName" label="所属医院"></el-table-column>
<el-table-column prop="department" label="所属部门"></el-table-column> <el-table-column prop="departmentName" label="所属部门"></el-table-column>
<el-table-column prop="province" label="所属省份"></el-table-column> <el-table-column prop="provinceName" label="所属省份"></el-table-column>
<el-table-column prop="city" label="所属城市"></el-table-column> <el-table-column prop="cityName" label="所属城市"></el-table-column>
<el-table-column prop="district" label="所属区县" show-overflow-tooltip></el-table-column> <el-table-column prop="countyName" label="所属区县" show-overflow-tooltip></el-table-column>
</el-table> </el-table>
<el-pagination <div class="pagination">
@size-change="handleSizePerson" <el-pagination
@current-change="handleCurrentPerson" background
:current-page="currentPerson" @size-change="handleSizePerson"
:page-sizes="[2, 3, 4]" @current-change="handleCurrentPerson"
:page-size="pageSizePerson" :current-page="formPersonnel.pageNum"
layout="total, sizes, prev, pager, next, jumper" :page-sizes="[10, 20, 40]"
:total="totalPerson" :page-size="formPersonnel.pageSize"
></el-pagination> layout="total, sizes, prev, pager, next, jumper"
:total="totalPerson"
></el-pagination>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -312,7 +336,7 @@ ...@@ -312,7 +336,7 @@
<el-radio :label="2"></el-radio> <el-radio :label="2"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-show="formComponent.configure == 1" label="选择证书:" prop="certificate"> <el-form-item v-show="formComponent.configure == 1" label="选择证书:" >
<el-col :span="20"> <el-col :span="20">
<el-select <el-select
v-model="formComponent.certificate" v-model="formComponent.certificate"
...@@ -383,14 +407,9 @@ export default { ...@@ -383,14 +407,9 @@ export default {
attachmentUrl2: "", attachmentUrl2: "",
attachmentUrl3: "" attachmentUrl3: ""
}, },
fileList: [ fileList: [],
{
name: "food.pdf",
url:
"https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg"
}
],
//设定行政范围 数据 //设定行政范围 数据
updatedTree: false,
treeProp: { treeProp: {
label: "name", label: "name",
children: "zones", children: "zones",
...@@ -407,8 +426,24 @@ export default { ...@@ -407,8 +426,24 @@ export default {
name: "", name: "",
region: "", region: "",
grade: "", grade: "",
chechAll: true chechAll: true,
pageNum: 1,
pageSize: 10,
}, },
organizationRegion: [{
id:'100',
label: '上海',
},{
id:'101',
label: '北京',
}],
organizationRank: [{
id:'1',
label: '一甲',
},{
id:'2',
label: '二甲',
}],
hasOrganizationInit: false, hasOrganizationInit: false,
//tableOrganization: Array(10).fill(itemOrganization), //tableOrganization: Array(10).fill(itemOrganization),
tableOrganization: new Array(), tableOrganization: new Array(),
...@@ -420,28 +455,25 @@ export default { ...@@ -420,28 +455,25 @@ export default {
formDepartment: { formDepartment: {
grade: "" grade: ""
}, },
tableDepartment: [ tableDepartment: [],
{ name: "全科" },
{ name: "内科" },
{ name: "外科" },
{ name: "心内科" },
{ name: "内分泌科" }
],
//设定人员 数据 //设定人员 数据
formPersonnel: { formPersonnel: {
hospital: "", hospital: "",
department: "" department: "",
pageNum: 1,
pageSize: 10,
}, },
tablePerson: new Array(), tablePerson: new Array(),
currentPerson: 1, currentPerson: 1,
pageSizePerson: 2, pageSizePerson: 2,
totalPerson: 10, totalPerson: 10,
//选择项目组件 数据 //选择项目组件 数据
optionsComponent: [], optionsComponent: [],
optionsCertificate: [], optionsCertificate: [],
formComponent: { formComponent: {
component: [], component: [],
configure: 1, configure: 2,
certificate: "" certificate: ""
}, },
tagsComponent: [], tagsComponent: [],
...@@ -514,8 +546,6 @@ export default { ...@@ -514,8 +546,6 @@ export default {
vm = this; vm = this;
this.editManager(); this.editManager();
this.changeOnStep(this.active); this.changeOnStep(this.active);
this.initOrganization();
this.initPerson();
this.$nextTick(function() { this.$nextTick(function() {
this.getComponentInfo(); this.getComponentInfo();
...@@ -544,6 +574,7 @@ export default { ...@@ -544,6 +574,7 @@ export default {
//设置编辑数据 //设置编辑数据
setEditData(editData) { setEditData(editData) {
//console.log(editData); //console.log(editData);
//设置基础信息页
this.formData = { this.formData = {
id: vm.getUrlSearch(window.location.href, "projectId"), id: vm.getUrlSearch(window.location.href, "projectId"),
projectName: editData.projectData.projectName, projectName: editData.projectData.projectName,
...@@ -554,11 +585,31 @@ export default { ...@@ -554,11 +585,31 @@ export default {
editData.projectData.projectBegintime editData.projectData.projectBegintime
], ],
projectIntro: editData.projectData.projectIntro, projectIntro: editData.projectData.projectIntro,
type: editData.attachmentModel[1].attachmentType, type: editData.attachmentData[1].attachmentType,
attachmentUrl1: editData.attachmentModel[0].attachmentUrl, attachmentUrl1: editData.attachmentData[0].attachmentUrl,
attachmentUrl2: editData.attachmentModel[1].attachmentUrl, attachmentUrl2: editData.attachmentData[1].attachmentUrl,
attachmentUrl3: "" attachmentUrl3: ""
}; };
if (editData.attachmentData.length > 2) {
for (let i = 2; i < editData.attachmentData.length; i++) {
let pdfItem = {
name: editData.attachmentData[i].attachmentName,
url: editData.attachmentData[i].attachmentUrl
};
vm.fileList.push(pdfItem);
}
}
//设置选择项目组件页
let componentEdit = [];
let certificateEdit = 0;
for(let i = 0;i<editData.componentData.length;i++) {
componentEdit.push(editData.componentData[i].id);
}
this.formComponent.component = componentEdit;
if(editData.certificateData.length > 0) {
this.formComponent.configure = 1;
this.formComponent.certificate = editData.componentData[0].id;
}
}, },
//编辑管理 //编辑管理
editManager(data) { editManager(data) {
...@@ -598,13 +649,18 @@ export default { ...@@ -598,13 +649,18 @@ export default {
seqNo: 1 seqNo: 1
} }
]; ];
let attachmentPDFModel = [ let attachmentPDFModel = [];
{ // if (option == "add") {
for (let i = 0; i < vm.fileList.length; i++) {
let PDFModel = {
attachmentType: 3, attachmentType: 3,
attachmentUrl: this.formData.attachmentUrl3, attachmentName: vm.fileList[i].name,
attachmentUrl: vm.fileList[i].url,
kind: 3 kind: 3
} };
]; attachmentPDFModel.push(PDFModel);
}
//}
if (option == "edit") { if (option == "edit") {
//编辑 //编辑
projectModel.id = this.formData.id; projectModel.id = this.formData.id;
...@@ -654,15 +710,27 @@ export default { ...@@ -654,15 +710,27 @@ export default {
} }
}); });
}, },
//项目组件信息 暂存/完成
componentDraft(type) { componentDraft(type) {
let param = { let param = {
componentIds: this.formComponent.component, componentIds: this.formComponent.component,
certificateId: this.formComponent.certificate, certificateId: this.formComponent.certificate,
projectId: 9, projectId: parseInt(vm.getUrlSearch(window.location.href, "projectId")),
type: type type: type
}; };
vm.POST("portalInfo/componentDraft", param).then(res => { vm.POST("portalInfo/componentDraft", param).then(res => {
console.log(res); console.log(res);
if(res.code == '000000') {
this.$notify({
title: "成功",
message: "项目创建成功"
});
} else {
this.$notify({
title: "",
message: res.message
});
}
}); });
}, },
//步骤style //步骤style
...@@ -671,6 +739,7 @@ export default { ...@@ -671,6 +739,7 @@ export default {
this.stepData = [true, false, false]; this.stepData = [true, false, false];
} else if (active == 1) { } else if (active == 1) {
this.stepData = [false, true, false]; this.stepData = [false, true, false];
this.initRange();
} else if (active == 2) { } else if (active == 2) {
this.stepData = [false, false, true]; this.stepData = [false, false, true];
} }
...@@ -734,7 +803,8 @@ export default { ...@@ -734,7 +803,8 @@ export default {
this.insertOrUpdate("add"); this.insertOrUpdate("add");
this.active++; this.active++;
this.stepData = [false, true, false]; this.stepData = [false, true, false];
this.checkAllTable(); this.initRange();
//this.checkAllTable();
} else { } else {
this.$message.error("项目名称" + res.message); this.$message.error("项目名称" + res.message);
} }
...@@ -744,8 +814,9 @@ export default { ...@@ -744,8 +814,9 @@ export default {
this.insertOrUpdate("edit"); this.insertOrUpdate("edit");
this.active++; this.active++;
this.stepData = [false, true, false]; this.stepData = [false, true, false];
this.checkAllTable(); this.initRange();
} }
} }
} else if (this.active == 1) { } else if (this.active == 1) {
let removeState = true; let removeState = true;
...@@ -790,6 +861,7 @@ export default { ...@@ -790,6 +861,7 @@ export default {
//上传PDF //上传PDF
beforeUploadPDF(file) { beforeUploadPDF(file) {
console.log(file); console.log(file);
console.log(this.fileList);
const isPDF = file.type === "application/pdf"; const isPDF = file.type === "application/pdf";
if (!isPDF) { if (!isPDF) {
this.$message.error("请上传PDF格式文件!"); this.$message.error("请上传PDF格式文件!");
...@@ -803,10 +875,18 @@ export default { ...@@ -803,10 +875,18 @@ export default {
1 1
).then(function(path) { ).then(function(path) {
console.log(path); console.log(path);
let fileItem = {
name: path.name,
url: path.fullPath
};
vm.fileList.push(fileItem);
vm.$message.success("上传成功"); vm.$message.success("上传成功");
}); });
} }
}, },
handleChange(file, fileList) {
//this.fileList3 = fileList.slice(-3);
},
//上传mp4 //上传mp4
beforeUploadMp4(file) {}, beforeUploadMp4(file) {},
//上传图片校验 //上传图片校验
...@@ -853,10 +933,15 @@ export default { ...@@ -853,10 +933,15 @@ export default {
return isJPG && isLt2M; return isJPG && isLt2M;
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
console.log(file, fileList); for (let i = 0; i < vm.fileList.length; i++) {
if (vm.fileList[i].name == file.name) {
vm.fileList.splice(i, 1);
console.log("删除" + i);
}
}
}, },
handlePreview(file) { handlePreview(file) {
console.log(file); //console.log(file);
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning( this.$message.warning(
...@@ -868,10 +953,45 @@ export default { ...@@ -868,10 +953,45 @@ export default {
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`); return this.$confirm(`确定移除 ${file.name}?`);
}, },
//第二步 选择范围 初始化
initRange() {
let projectId = vm.getUrlSearch(window.location.href, "projectId");
if (projectId == null) {
//新建
} else {
//编辑
this.getAdministrative();
}
},
//查询行政范围(树)
getAdministrative() {
let req = {
projectId: 1
};
vm.GET("scope/v1/administrative", req).then(res => {
if (res.code == "000000") {
//console.log(res.data);
let administrativeAll = res.data.administrativeAll;
console.log(administrativeAll);
this.treeData = []
this.treeData[0] = administrativeAll;
}
});
},
//切换tab //切换tab
handleClick(tab, event) { handleClick(tab, event) {
//console.log(tab); let tabName = tab.name;
if(tabName == "second") {
//设定机构
this.getOrganization();
} else if(tabName == "third") {
//设定科室
} else if(tabName == "fourth") {
//设定人员
this.getPeople();
}
}, },
//列举选中地区 //列举选中地区
initCheckList(allSelectedKeys) { initCheckList(allSelectedKeys) {
this.tagsRegion = []; this.tagsRegion = [];
...@@ -973,6 +1093,7 @@ export default { ...@@ -973,6 +1093,7 @@ export default {
console.log(treeKeyList); console.log(treeKeyList);
this.$refs.tree.setCheckedKeys(treeKeyList); this.$refs.tree.setCheckedKeys(treeKeyList);
}, },
//删除label节点 同步树结构 //删除label节点 同步树结构
handleCloseTree(tag) { handleCloseTree(tag) {
this.tagsRegion.splice(this.tagsRegion.indexOf(tag), 1); this.tagsRegion.splice(this.tagsRegion.indexOf(tag), 1);
...@@ -998,6 +1119,23 @@ export default { ...@@ -998,6 +1119,23 @@ export default {
//this.$refs[name].clearSelection(); //this.$refs[name].clearSelection();
} }
}, },
//查询机构列表
getOrganization() {
let req = {
projectId: 1,
setKind:3,
scope: '000_110',
pageNum: this.formOrganization.pageNum,
pageSize: this.formOrganization.pageSize,
};
vm.GET("scope/v1/organization", req).then(res => {
if (res.code == "000000") {
console.log(res.data);
this.tableOrganization = res.data.organizationList;
this.$refs.multipleOrganization.toggleAllSelection();
}
});
},
//获取科室信息 //获取科室信息
getDepartment() { getDepartment() {
let req = { let req = {
...@@ -1009,30 +1147,46 @@ export default { ...@@ -1009,30 +1147,46 @@ export default {
} }
}); });
}, },
//查询人员列表
getPeople() {
let req = {
projectId: 1,
setKindOfAdministrative: 3,
scopeOfAdministrative: '000_110',
setKindOfOrganization: 3,
scopeOfOrganization: '2|3|4|5|6|7',
setKindOfDepartment: 3,
scopeOfDepartment: 54,
pageNum: this.formPersonnel.pageNum,
pageSize: this.formPersonnel.pageSize,
};
vm.GET("scope/v1/people", req).then(res => {
if (res.code == "000000") {
console.log(res.code);
this.tablePerson = res.data.people;
this.totalPerson = res.data.total;
}
});
},
//机构table修改 //机构table修改
handleSizeOrganization(val) { handleSizeOrganization(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
this.formOrganization.pageSize = val;
}, },
handleCurrentOrganization(val) { handleCurrentOrganization(val) {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
this.formOrganization.pageNum = val;
this.getOrganization();
}, },
//角色table修改 //角色table修改
handleSizePerson(val) { handleSizePerson(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
this.formPersonnel.pageSize = val;
}, },
handleCurrentPerson(val) { handleCurrentPerson(val) {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
}, this.formPersonnel.pageNum = val;
//初始化机构数据 this.getPeople();
initOrganization() {
//console.log(returnData());
let data = returnData().tableOrganization;
this.tableOrganization = data;
},
//初始化设定人员数据
initPerson() {
let data = returnData().tablePerson;
this.tablePerson = data;
}, },
//行政范围改变更新设定机构和设定人员 //行政范围改变更新设定机构和设定人员
updateOrganizationAndPerson(allSelectedKeys) { updateOrganizationAndPerson(allSelectedKeys) {
......
...@@ -46,6 +46,7 @@ let tablePerson = [{ ...@@ -46,6 +46,7 @@ let tablePerson = [{
let treeData = [ let treeData = [
{ {
id: 11, id: 11,
name: "一级 1",
label: "一级 1", label: "一级 1",
children: [ children: [
{ {
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="formInline.pageNo" :current-page="formInline.pageNo"
:page-sizes="[100, 200, 300, 400]" :page-sizes="[10, 20, 30, 100]"
:page-size="formInline.pageSize" :page-size="formInline.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="totalRows" :total="totalRows"
...@@ -150,8 +150,8 @@ export default { ...@@ -150,8 +150,8 @@ export default {
curmbFirst: "系统管理", curmbFirst: "系统管理",
curmbSecond: "角色管理", curmbSecond: "角色管理",
curmbThird: "项目角色", curmbThird: "项目角色",
tableData: Array(10).fill(item), tableData: [],
loading: false, loading: true,
timingTime: "", timingTime: "",
totalRows: 0, totalRows: 0,
currentPage: 1, currentPage: 1,
...@@ -203,6 +203,7 @@ export default { ...@@ -203,6 +203,7 @@ export default {
methods: { methods: {
//查询用户列表 //查询用户列表
queryRoleList() { queryRoleList() {
this.loading = true;
this.formInline.portalProjectId = vm.getUrlSearch( this.formInline.portalProjectId = vm.getUrlSearch(
window.location.href, window.location.href,
"portalProjectId" "portalProjectId"
...@@ -243,9 +244,12 @@ export default { ...@@ -243,9 +244,12 @@ export default {
}, },
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
this.formInline.pageSize = val;
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
this.formInline.pageNo = val;
this.queryRoleList();
}, },
//重置表单 //重置表单
resetForm() { resetForm() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册