diff --git a/.env.development b/.env.development index 8a3b4e7..00ae071 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,7 @@ ENV = 'development' # 全医通护理站管理平台/开发环境 # VUE_APP_BASE_API = '/dev-api' -VUE_APP_BASE_API = 'http://192.168.16.85:8080' +VUE_APP_BASE_API = 'http://192.168.16.85:8081' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/api/baseurl.js b/src/api/baseurl.js index a56555f..1d13b8d 100644 --- a/src/api/baseurl.js +++ b/src/api/baseurl.js @@ -1,3 +1,3 @@ -var baseurl = "http://192.168.16.81:8080"; +var baseurl = "http://192.168.16.81:8082"; -export default baseurl \ No newline at end of file +export default baseurl diff --git a/src/api/system/communityInfo.js b/src/api/system/communityInfo.js index fe19e17..5433056 100644 --- a/src/api/system/communityInfo.js +++ b/src/api/system/communityInfo.js @@ -31,6 +31,13 @@ export function SecondaryLevelInfo(id) { method: 'get', }) } +//省市区 +export function SubordinateRegions(Code) { + return request({ + url: `/system/area/getSubordinateRegions?areaCode=${Code}`, + method: 'get' + }) +} // 新增居住社区信息 export function addCommunityInfo(data) { return request({ diff --git a/src/api/system/userlist.js b/src/api/system/userlist.js index 00bee4b..ac33759 100644 --- a/src/api/system/userlist.js +++ b/src/api/system/userlist.js @@ -1,8 +1,9 @@ import request from '@/utils/request' -export function getListByUser(data) { +export function getListByUser(query) { return request({ url: '/system/user/getListByUser', - method: 'GET' + method: 'GET', + params: query }) -} \ No newline at end of file +} diff --git a/src/views/system/communityInfo/index.vue b/src/views/system/communityInfo/index.vue index f6288c7..1ba8ba3 100644 --- a/src/views/system/communityInfo/index.vue +++ b/src/views/system/communityInfo/index.vue @@ -237,7 +237,8 @@
- - - - + + + + + + + + + + + + + + + + + + + + + + @@ -385,6 +445,7 @@ v-model="form.communityLongitude" placeholder="请输入社区经度" maxlength="20" + style="width:200px" /> @@ -392,6 +453,7 @@ v-model="form.communityLatitude" placeholder="请输入社区纬度" maxlength="20" + style="width:200px" /> @@ -412,6 +474,7 @@ import { updateCommunityInfo, FirstLevels, SecondaryLevelInfo, + SubordinateRegions, } from "@/api/system/communityInfo"; export default { @@ -560,7 +623,7 @@ export default { this.queryParams.areaCode = ""; SecondaryLevelInfo(item.id).then((res) => { console.log(res); - this.SecondaryLevelInfolist = res.data; + // this.SecondaryLevelInfolist = res.data; // console.log(this.SecondaryLevelInfolist); this.citylist = res.data; }); @@ -573,7 +636,21 @@ export default { console.log(item); SecondaryLevelInfo(item.id).then((res) => { console.log(res); - this.SecondaryLevelInfolist = res.data; + // this.SecondaryLevelInfolist = res.data; + // console.log(this.SecondaryLevelInfolist); + this.citylist = res.data; + }); + }, + // 修改 + province3(item) { + // this.form.xxx[index].code='' + console.log(item); + this.form.city = ""; + this.form.area = ""; + this.form.areaCode = ""; + SecondaryLevelInfo(item.id).then((res) => { + console.log(res); + // this.SecondaryLevelInfolist = res.data; // console.log(this.SecondaryLevelInfolist); this.citylist = res.data; }); @@ -582,6 +659,8 @@ export default { clickcity(item) { console.log(item); SecondaryLevelInfo(item.id).then((res) => { + this.queryParams.area = ""; + this.queryParams.areaCode = ""; console.log(res); this.arealists = res.data; }); @@ -592,14 +671,27 @@ export default { // this.queryParams.areaCode = ""; // this.value2 = ""; // this.value3 = ""; + this.form.communityInfoList[index].area = ""; + this.form.communityInfoList[index].areaCode = ""; console.log(item); SecondaryLevelInfo(item.id).then((res) => { console.log(res); this.arealists = res.data; }); }, + // 修改 + clickcity3(item) { + console.log(item); + SecondaryLevelInfo(item.id).then((res) => { + this.form.area = ""; + this.form.areaCode = ""; + console.log(res); + this.arealists = res.data; + }); + }, //点击区县城 clickarea(item) { + this.queryParams.areaCode = ""; // this.queryParams.areaCode = ""; // this.value3 = ""; console.log(item); @@ -612,6 +704,19 @@ export default { clickarea2(item, index) { // this.queryParams.areaCode = ""; // this.value3 = ""; + + this.form.communityInfoList[index].areaCode = ""; + console.log(item); + SecondaryLevelInfo(item.id).then((res) => { + console.log(res); + this.streetlist = res.data; + }); + }, + + clickarea3(item) { + this.form.areaCode = ""; + // this.queryParams.areaCode = ""; + // this.value3 = ""; console.log(item); SecondaryLevelInfo(item.id).then((res) => { console.log(res); @@ -623,6 +728,10 @@ export default { this.form.areaCode = item.areaCode; console.log(this.form); }, + // clickstreet3(item) { + // this.form.areaCode = item.areaCode; + // // console.log(this.queryParams); + // }, // 所属省下拉框 loadMore() { console.log("1"); @@ -716,6 +825,10 @@ export default { /** 重置按钮操作 */ resetQuery() { this.resetForm("queryForm"); + // this.arealist="", + this.arealists="", + this.streetlist="", + this.citylist="", (this.queryParams = { pageNum: 1, pageSize: 10, @@ -749,8 +862,22 @@ export default { const id = row.id || this.ids; getCommunityInfo(id).then((response) => { this.form = response.data; + // this.form.province=response.data; + // this.form.city=response.data; + // this.form.area=response.data; + // this.form.areaCode=response.data; this.open = true; this.title = "修改居住社区信息"; + SubordinateRegions(response.data.areaCode).then((res) => { + console.log(res) + if(res.data!==null){ + this.form.province = res.data.provinceCode; + this.form.city = res.data.cityName; + this.form.area = res.data.regionName; + this.form.areaCode = res.data.streetName; + } + + }); }); }, /** 提交按钮 */ @@ -761,7 +888,7 @@ export default { updateCommunityInfo(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); this.open = false; - + this.open2 = false; this.getList(); }); } else { diff --git a/src/views/system/patientArchives/index.vue b/src/views/system/patientArchives/index.vue index b57f1d0..13e646f 100644 --- a/src/views/system/patientArchives/index.vue +++ b/src/views/system/patientArchives/index.vue @@ -172,7 +172,7 @@ /> - + diff --git a/src/views/system/person/index.vue b/src/views/system/person/index.vue index d00cb4e..4728761 100644 --- a/src/views/system/person/index.vue +++ b/src/views/system/person/index.vue @@ -8,10 +8,10 @@ v-show="showSearch" label-width="68px" > - + + + + + + + + { - this.StationDepartmentLists = res.rows; - this.total3 = res.total; - this.loading = false; - }); + console.log(item); this.departid = item.departmentCode; this.innerVisible2 = true; @@ -1281,11 +1297,7 @@ export default { }, // 新增护理站按钮 clickinnerVisible(item, index) { - stationList(this.queryParams2).then((res) => { - this.stationLists = res.rows; - this.total2 = res.total; - this.loading = false; - }); + // console.log(item); this.stationid = item.nurseStationId; this.innerVisible = true; @@ -1304,24 +1316,24 @@ export default { // this.index = index; }, //xialakuang - loadMore() { - console.log("1"); - var a = Math.ceil(this.total4 / 10); - console.log(this.nurseStationlist.length); - if (this.nurseStationlist.length + 1 >= this.total4) { - } else { - if (this.nurseStationqueryParams.pageNum >= a) { - } else { - this.nurseStationqueryParams.pageNum++; - stationList(this.nurseStationqueryParams).then((res) => { - console.log(res); - res.rows.forEach((e) => { - this.nurseStationlist.push(e); - }); - }); - } - } - }, + // loadMore() { + // console.log("1"); + // var a = Math.ceil(this.total4 / 10); + // console.log(this.nurseStationlist.length); + // if (this.nurseStationlist.length + 1 >= this.total4) { + // } else { + // if (this.nurseStationqueryParams.pageNum >= a) { + // } else { + // this.nurseStationqueryParams.pageNum++; + // stationList(this.nurseStationqueryParams).then((res) => { + // console.log(res); + // res.rows.forEach((e) => { + // this.nurseStationlist.push(e); + // }); + // }); + // } + // } + // }, nurselist() { stationList(this.nurseStationqueryParams).then((res) => { console.log(res); @@ -1417,6 +1429,21 @@ export default { this.loading = false; }); }, + getList2() { + // 护理站名称 + this.loading = true; + stationList(this.queryParams2).then((res) => { + this.stationLists = res.rows; + this.total2 = res.total; + this.loading = false; + }); + StationDepartmentList(this.queryParams3).then((res) => { + this.StationDepartmentLists = res.rows; + this.total3 = res.total; + this.loading = false; + }); + + }, // 取消按钮 cancel() { this.open = false; @@ -1428,6 +1455,7 @@ export default { }, // 表单重置 reset() { + this.form = { id: null, nurseStationId: null, @@ -1461,6 +1489,7 @@ export default { ], }; this.resetForm("form"); + }, /** 搜索按钮操作 */ @@ -1485,12 +1514,12 @@ export default { this.getList(); }, handleQuery() { - stationList(this.nurseStationqueryParams).then((res) => { - console.log(res); - this.nurseStationlist = res.rows; - this.total4 = res.total; - console.log(this.nurseStationlist); - }); + // stationList(this.nurseStationqueryParams).then((res) => { + // console.log(res); + // this.nurseStationlist = res.rows; + // this.total4 = res.total; + // console.log(this.nurseStationlist); + // }); this.queryParams.pageNum = 1; this.getList(); // this.nurselist() @@ -1506,7 +1535,6 @@ export default { id: null, nurseStationId: null, }; - stationList(this.queryParams2).then((res) => { this.stationLists = res.rows; this.total2 = res.total; @@ -1522,7 +1550,6 @@ export default { departmentName: null, nurseStationId: null, }; - StationDepartmentList(this.queryParams3).then((response) => { this.StationDepartmentLists = response.rows; this.total3 = response.total; @@ -1531,6 +1558,7 @@ export default { }, resetQuery() { + if (this.nurseStationlist[0].isAdmin == "1") { this.resetForm("queryForm"); this.queryParams = { pageNum: 1, @@ -1544,11 +1572,15 @@ export default { phone: null, address: null, }; - stationList(this.queryParams2).then((res) => { - this.stationLists = res.rows; - this.total2 = res.total; - }); this.handleQuery(); + } else { + console.log(1); + this.queryParams.departmentName = null; + this.queryParams.pageSize = 10; + this.queryParams.pageNum = 1; + this.queryParams.nursePersonName = null; + this.handleQuery(); + } }, // 多选框选中数据 handleSelectionChange(selection) { @@ -1672,6 +1704,58 @@ export default { `person_${new Date().getTime()}.xlsx` ); }, + //权限列表 + info() { + getListByUser(this.nurseStationqueryParams).then((res) => { + console.log(res); + if (res.rows[0].isAdmin == "1") { + console.log(true); + this.nurseStationlist = res.rows; + this.total2 = res.total; + } else { + this.total2 = res.total; + this.nurseStationlist = res.rows; + this.queryParams.nurseStationId = res.rows[0].id; + this.handleQuery(); + } + }); + }, + //滑动下拉框 + loadMore() { + var a = Math.ceil(this.total4 / 10); + if (this.nurseStationlist.length + 1 >= this.total4) { + } else { + if (this.nurseStationqueryParams.pageNum >= a) { + } else { + this.nurseStationqueryParams.pageNum++; + console.log(this.nurseStationqueryParams.pageNum); + getListByUser(this.nurseStationqueryParams).then((res) => { + console.log(res); + res.rows.forEach((e) => { + this.nurseStationlist.push(e); + }); + }); + } + } + }, + // loadMore() { + // console.log("1"); + // var a = Math.ceil(this.total4 / 10); + // console.log(this.nurseStationlist.length); + // if (this.nurseStationlist.length + 1 >= this.total4) { + // } else { + // if (this.nurseStationqueryParams.pageNum >= a) { + // } else { + // this.nurseStationqueryParams.pageNum++; + // stationList(this.nurseStationqueryParams).then((res) => { + // console.log(res); + // res.rows.forEach((e) => { + // this.nurseStationlist.push(e); + // }); + // }); + // } + // } + // }, }, }; diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue index 85b612e..d5f7789 100644 --- a/src/views/system/station/index.vue +++ b/src/views/system/station/index.vue @@ -16,15 +16,42 @@ @keyup.enter.native="handleQuery" /> --> - - - + + placeholder="请选择护理站" + v-loadmore="loadMore" + > + + + + + + + + + + + 取 消
- @@ -734,11 +760,11 @@ import { } from "@/api/system/station"; import { getInfoList } from "@/api/system/nurseItem"; import stationAcatar from "../stationAvatar/index.vue"; +import { getListByUser } from "@/api/system/userlist.js"; import { getToken } from "@/utils/auth"; import editor from "@/components/Editor"; -import userlist from "../userlist/index.vue"; export default { - components: { stationAcatar, editor, userlist }, + components: { stationAcatar, editor }, name: "Station", data() { // 验证手机号的规则 @@ -801,6 +827,7 @@ export default { showSearch: true, // 总条数 total: 0, + total2: 0, //所属护理类型 typelooks: [], //所属标签 @@ -813,12 +840,18 @@ export default { ], // 护理站信息表格数据 stationList: [], + nurseStationlist: [], // 弹出层标题 title: "", // 是否显示弹出层 open: false, typeopen: false, nurseStationLabelopen: false, + //权限查询 + getListByUserquery: { + pageNum: 1, + pageSize: 10, + }, // 查询参数 queryParams: { pageNum: 1, @@ -904,6 +937,7 @@ export default { }, created() { this.getList(); + this.info(); }, methods: { imgUrl(imgUrl) { @@ -1052,6 +1086,7 @@ export default { liststationinfo() { listStation(this.queryParams).then((response) => { this.stationList = response.rows; + console.log('this.stationList :>> ', this.stationList); this.total = response.total; this.loading = false; }); @@ -1062,27 +1097,36 @@ export default { }, /** 重置按钮操作 */ resetQuery() { - this.queryParams = { - pageNum: 1, - pageSize: 10, - areaCode: null, - userId: null, - nurseStationCode: null, - nurseStationName: null, - nurseStationType: null, - agencyIntroduce: null, - nurseStationDescription: null, - longitude: null, - latitude: null, - phone: null, - address: null, - dutyPerson: null, - dutyPhone: null, - stationPictureUrl: null, - sort: null, - }; - this.resetForm("queryForm"); - this.handleQuery(); + if (this.nurseStationlist[0].isAdmin == "1") { + this.queryParams = { + pageNum: 1, + pageSize: 10, + areaCode: null, + userId: null, + nurseStationCode: null, + nurseStationName: null, + nurseStationType: null, + agencyIntroduce: null, + nurseStationDescription: null, + longitude: null, + latitude: null, + phone: null, + address: null, + dutyPerson: null, + dutyPhone: null, + stationPictureUrl: null, + sort: null, + }; + this.resetForm("queryForm"); + this.handleQuery(); + } else { + console.log(1); + // this.queryParams.nurseStationCode = null; + this.queryParams.pageSize = 10; + this.queryParams.pageNum = 1; + this.queryParams.nurseStationType = null; + this.handleQuery(); + } }, // 多选框选中数据 handleSelectionChange(selection) { @@ -1180,6 +1224,7 @@ export default { console.log(this.form); this.$refs["form"].validate((valid) => { if (valid) { + this.form.areaCode = Number(this.form.areaCode); this.form.nurseStationType = this.form.nurseStationType2.join(","); if (this.form.id != null) { updateStation(this.form).then((response) => { @@ -1260,6 +1305,40 @@ export default { handleFileUploadProgress(event, file, fileList) { this.upload.isUploading = true; }, + //权限列表 + info() { + getListByUser(this.getListByUserquery).then((res) => { + console.log(res); + if (res.rows[0].isAdmin == "1") { + console.log(true); + this.nurseStationlist = res.rows; + this.total2 = res.total; + } else { + this.total2 = res.total; + this.nurseStationlist = res.rows; + this.queryParams.nurseStationCode = res.rows[0].nurseStationCode; + this.handleQuery(); + } + }); + }, + //滑动下拉框 + loadMore() { + var a = Math.ceil(this.total2 / 10); + if (this.nurseStationlist.length + 1 >= this.total2) { + } else { + if (this.getListByUserquery.pageNum >= a) { + } else { + this.getListByUserquery.pageNum++; + console.log(this.getListByUserquery.pageNum); + getListByUser(this.getListByUserquery).then((res) => { + console.log(res); + res.rows.forEach((e) => { + this.nurseStationlist.push(e); + }); + }); + } + } + }, }, }; diff --git a/src/views/system/stationConsumable/index.vue b/src/views/system/stationConsumable/index.vue index 3467cad..142a83c 100644 --- a/src/views/system/stationConsumable/index.vue +++ b/src/views/system/stationConsumable/index.vue @@ -8,7 +8,7 @@ v-show="showSearch" label-width="100px" > - + + + + + + + + + + + + + + + + + + + + + 导入 @@ -461,7 +489,7 @@ @@ -561,6 +589,7 @@ import { updateStationConsumable, list, } from "@/api/system/stationConsumable"; +import { getListByUser } from "@/api/system/userlist.js"; import { getToken } from "@/utils/auth"; export default { name: "StationConsumable", @@ -593,9 +622,11 @@ export default { // 总条数 total: 0, total2: 0, + total3: 0, // 护理站耗材信息表格数据 stationConsumableList: [], nurseStationlist: [], + nurseStationlist2: [], // 弹出层标题 title: "", // 是否显示弹出层 @@ -603,6 +634,11 @@ export default { open2: false, xgopen: false, index: "", + //权限查询 + getListByUserquery: { + pageNum: 1, + pageSize: 10, + }, // 查询参数 nurseStationqueryParams: { pageNum: 1, @@ -708,6 +744,7 @@ export default { }, created() { this.getList(); + this.info(); this.listinfo(); }, methods: { @@ -741,24 +778,6 @@ export default { handleFileUploadProgress(event, file, fileList) { this.upload.isUploading = true; }, - loadMore() { - console.log("1"); - var a = Math.ceil(this.total2 / 10); - console.log(this.nurseStationlist.length); - if (this.nurseStationlist.length + 1 >= this.total2) { - } else { - if (this.nurseStationqueryParams.pageNum >= a) { - } else { - this.nurseStationqueryParams.pageNum++; - list(this.nurseStationqueryParams).then((res) => { - console.log(res); - res.rows.forEach((e) => { - this.nurseStationlist.push(e); - }); - }); - } - } - }, delnurseStationConsumables(index) { this.form.nurseStationConsumables.splice(index, 1); console.log(this.form.nurseStationConsumables); @@ -872,7 +891,7 @@ export default { listinfo() { list(this.nurseStationqueryParams).then((res) => { console.log(res); - this.nurseStationlist = res.rows; + this.nurseStationlist2 = res.rows; this.total2 = res.total; }); }, @@ -884,19 +903,28 @@ export default { }, /** 重置按钮操作 */ sresetQuery() { - this.resetForm("queryForm"); - this.queryParams = { - pageNum: 1, - pageSize: 10, - nurseStationId: "", - userId: null, - consumableCode: null, - consumableDetail: null, - consumableUnit: null, - consumablePrice: null, - sort: null, - }; - this.handleQuery(); + if (this.nurseStationlist[0].isAdmin == "1") { + this.resetForm("queryForm"); + this.queryParams = { + pageNum: 1, + pageSize: 10, + nurseStationId: "", + userId: null, + consumableCode: null, + consumableDetail: null, + consumableUnit: null, + consumablePrice: null, + sort: null, + }; + this.handleQuery(); + } else { + this.queryParams.pageNum = 1; + this.queryParams.consumableCode = null; + this.queryParams.consumableDetail = null; + this.queryParams.consumableUnit = null; + this.queryParams.consumablePrice = null; + this.handleQuery(); + } }, //护理站重置 resetQuery() { @@ -977,6 +1005,41 @@ export default { this.upload.title = "用户导入"; this.upload.open = true; }, + + //权限列表 + info() { + getListByUser(this.getListByUserquery).then((res) => { + console.log(res); + if (res.rows[0].isAdmin == "1") { + console.log(true); + this.nurseStationlist = res.rows; + this.total3 = res.total; + } else { + this.total3 = res.total; + this.nurseStationlist = res.rows; + this.queryParams.nurseStationId = res.rows[0].id; + this.handleQuery(); + } + }); + }, + + loadMore() { + console.log(1); + var a = Math.ceil(this.total3 / 10); + if (this.nurseStationlist.length + 1 >= this.total3) { + } else { + if (this.getListByUserquery.pageNum >= a) { + } else { + this.getListByUserquery.pageNum++; + getListByUser(this.getListByUserquery).then((res) => { + console.log(res); + res.rows.forEach((e) => { + this.nurseStationlist.push(e); + }); + }); + } + } + }, }, }; diff --git a/src/views/system/nurseItem/index.vue b/src/views/system/stationItem/index.vue similarity index 94% rename from src/views/system/nurseItem/index.vue rename to src/views/system/stationItem/index.vue index 3520713..3a6edd9 100644 --- a/src/views/system/nurseItem/index.vue +++ b/src/views/system/stationItem/index.vue @@ -9,9 +9,10 @@ label-width="110px" > + + + + + + + 新增 @@ -94,7 +116,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['system:nurseItem:edit']" + v-hasPermi="['system:stationItem:edit']" >修改 @@ -106,7 +128,7 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['system:nurseItem:remove']" + v-hasPermi="['system:stationItem:remove']" >删除 @@ -117,7 +139,6 @@ icon="el-icon-upload2" size="mini" @click="handleExport" - v-hasPermi="['system:nurseItem:importData']" >导入 @@ -292,8 +313,9 @@ @@ -465,7 +487,6 @@ 取 消 - @@ -725,6 +746,7 @@ import { liststation, } from "@/api/system/nurseItem"; import { getToken } from "@/utils/auth"; +import { getListByUser } from "@/api/system/userlist.js"; export default { components: { stationAcatar }, @@ -761,6 +783,7 @@ export default { total: 0, total2: 0, total3: 0, + total4: 0, //耗材 stationConsumableList: [], // 护理站护理项目表格数据 @@ -771,6 +794,13 @@ export default { title: "", // 是否显示弹出层 open: false, + //权限查询 + nurseStationlist: [], + nurseStationlist2: [], + getListByUserquery: { + pageNum: 1, + pageSize: 10, + }, // 查询参数 queryParams: { pageNum: 1, @@ -795,7 +825,6 @@ export default { pageNum: 1, pageSize: 10, }, - nurseStationlist: [], // 表单参数 form: { nurseStationItem: { @@ -833,6 +862,7 @@ export default { }, created() { this.getList(); + this.info(); this.getInfoListinfo(); this.stationlist(); // this.listStationConsumableinfo(); @@ -875,7 +905,6 @@ export default { handleFileUploadProgress(event, file, fileList) { this.upload.isUploading = true; }, - //耗材包选择完成 stationConsumablechoiceok() { this.form.nurseStationItemConsumables.forEach((e) => { @@ -940,29 +969,13 @@ export default { }; this.stationlist(); }, - //下拉框 stationlist() { liststation(this.nurseStationqueryParams).then((res) => { - this.nurseStationlist = res.rows; + this.nurseStationlist2 = res.rows; this.total2 = res.total; }); }, - loadMore() { - var a = Math.ceil(this.total2 / 10); - if (this.nurseStationlist.length + 1 >= this.total2) { - } else { - if (this.nurseStationqueryParams.pageNum >= a) { - } else { - this.nurseStationqueryParams.pageNum++; - liststation(this.nurseStationqueryParams).then((res) => { - res.rows.forEach((e) => { - this.nurseStationlist.push(e); - }); - }); - } - } - }, //护理类型 getInfoListinfo() { getInfoList().then((res) => { @@ -978,7 +991,6 @@ export default { } ); }, - listStationConsumableinfo() { if (this.form.nurseStationItem.nurseStationId != null) { listStationConsumable(this.StationConsumablequeryParams).then( @@ -1086,7 +1098,10 @@ export default { }, /** 重置按钮操作 */ resetQuery() { - this.resetForm("queryForm"); + this.queryParams.pageNu = 1; + this.queryParams.nurseTypeId = null; + this.queryParams.nurseItemCode = null; + this.queryParams.nurseItemName = null; this.handleQuery(); }, // 多选框选中数据 @@ -1181,6 +1196,38 @@ export default { this.upload.title = "用户导入"; this.upload.open = true; }, + + //权限列表 + info() { + getListByUser(this.getListByUserquery).then((res) => { + console.log(res); + if (res.rows[0].isAdmin == "1") { + console.log(true); + this.nurseStationlist = res.rows; + this.total4 = res.total; + } else { + this.total4 = res.total; + this.nurseStationlist = res.rows; + this.queryParams.nurseStationId = res.rows[0].id; + this.handleQuery(); + } + }); + }, + loadMore() { + var a = Math.ceil(this.total4 / 10); + if (this.nurseStationlist.length + 1 >= this.total4s) { + } else { + if (this.getListByUserquery.pageNum >= a) { + } else { + this.getListByUserquery.pageNum++; + getListByUser(this.getListByUserquery).then((res) => { + res.rows.forEach((e) => { + this.nurseStationlist.push(e); + }); + }); + } + } + }, }, }; diff --git a/src/views/system/userlist/index.vue b/src/views/system/userlist/index.vue index 13e2e28..eff881b 100644 --- a/src/views/system/userlist/index.vue +++ b/src/views/system/userlist/index.vue @@ -8,12 +8,17 @@ export default { return {}; }, created() { - this.info() + this.info(); }, methods: { info() { getListByUser().then((res) => { console.log(res); + if (res.rows[0].isAdmin == "1") { + console.log(true); + } else { + this.$emit("itemlist", res.rows); + } }); }, },