工作提交

This commit is contained in:
曹辉 2022-09-23 14:45:51 +08:00
parent 09954788b2
commit ddb3514ac7
7 changed files with 295 additions and 102 deletions

View File

@ -6,7 +6,7 @@ ENV = 'development'
# 全医通护理站管理平台/开发环境
# VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://192.168.16.64:8080'
VUE_APP_BASE_API = 'http://192.168.16.87:8080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -1,3 +1,3 @@
var baseurl = "http://192.168.16.81:8080";
var baseurl = "http://192.168.16.81:8082";
export default baseurl

View File

@ -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
})
}

View File

@ -16,15 +16,42 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item label="护理站名称" prop="nurseStationName">
<el-input
v-model="queryParams.nurseStationName"
placeholder="请输入护理站名称"
<el-form-item
label="护理站名称"
prop="nurseStationName"
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
>
<el-select
v-model="queryParams.nurseStationCode"
clearable
@keyup.enter.native="handleQuery"
/> </el-form-item
><el-form-item label="护理站编号" prop="nurseStationCode">
placeholder="请选择护理站"
v-loadmore="loadMore"
>
<el-option
v-for="item in nurseStationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.nurseStationCode"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属护理站" prop="nurseStationName" v-else>
<el-select
v-model="queryParams.nurseStationCode"
placeholder="请选择护理站"
v-loadmore="loadMore"
>
<el-option
v-for="item in nurseStationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.nurseStationCode"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="护理站编号" prop="nurseStationCode">
<el-input
v-model="queryParams.nurseStationCode"
placeholder="请输入护理站编号"
@ -137,7 +164,6 @@
icon="el-icon-upload2"
size="mini"
@click="handledata"
v-hasPermi="['system:station:importData']"
>导入</el-button
>
</el-col>
@ -714,7 +740,6 @@
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
<!-- <userlist /> -->
</div>
</template>
@ -734,11 +759,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 +826,7 @@ export default {
showSearch: true,
//
total: 0,
total2: 0,
//
typelooks: [],
//
@ -813,12 +839,18 @@ export default {
],
//
stationList: [],
nurseStationlist: [],
//
title: "",
//
open: false,
typeopen: false,
nurseStationLabelopen: false,
//
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
//
queryParams: {
pageNum: 1,
@ -904,6 +936,7 @@ export default {
},
created() {
this.getList();
this.info();
},
methods: {
imgUrl(imgUrl) {
@ -1062,27 +1095,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 +1222,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 +1303,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);
});
});
}
}
},
},
};
</script>

View File

@ -8,7 +8,7 @@
v-show="showSearch"
label-width="100px"
>
<el-form-item label="护理站名称" prop="">
<el-form-item label="护理站名称" prop="" v-if="nurseStationlist.find((e) => e.isAdmin == '1')">
<el-select
v-model="queryParams.nurseStationId"
clearable
@ -24,6 +24,35 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属护理站" prop="" v-else>
<el-select
v-model="queryParams.nurseStationId"
placeholder="请选择护理站"
v-loadmore="loadMore"
>
<el-option
v-for="item in nurseStationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="耗材包编号" prop="consumableCode">
<el-input
v-model="queryParams.consumableCode"
@ -124,7 +153,6 @@
icon="el-icon-upload2"
size="mini"
@click="handleport"
v-hasPermi="['system:stationConsumable:importData']"
>导入</el-button
>
</el-col>
@ -461,7 +489,7 @@
</el-form>
<el-table
v-loading="loading"
:data="nurseStationlist"
:data="nurseStationlist2"
@cell-dblclick="clicknurseStation"
>
<el-table-column width="60" align="center" label="请选择">
@ -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);
});
});
}
}
},
},
};
</script>

View File

@ -9,9 +9,10 @@
label-width="110px"
>
<el-form-item
label="所属护理站"
label="护理站名称"
prop="nurseStationId"
label-width="100px"
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
>
<el-select
v-model="queryParams.nurseStationId"
@ -28,6 +29,27 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="所属护理站"
prop="nurseStationId"
label-width="100px"
v-else
>
<el-select
v-model="queryParams.nurseStationId"
placeholder="请选择护理站"
v-loadmore="loadMore"
>
<el-option
v-for="item in nurseStationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="护理类型" prop="nurseTypeId" label-width="90px">
<el-select
v-model="queryParams.nurseTypeId"
@ -82,7 +104,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:nurseItem:add']"
v-hasPermi="['system:stationItem:add']"
>新增</el-button
>
</el-col>
@ -94,7 +116,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:nurseItem:edit']"
v-hasPermi="['system:stationItem:edit']"
>修改</el-button
>
</el-col>
@ -106,7 +128,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:nurseItem:remove']"
v-hasPermi="['system:stationItem:remove']"
>删除</el-button
>
</el-col>
@ -117,7 +139,6 @@
icon="el-icon-upload2"
size="mini"
@click="handleExport"
v-hasPermi="['system:nurseItem:importData']"
>导入</el-button
>
</el-col>
@ -292,8 +313,9 @@
<el-form-item label="提前预约时长" prop="advanceAppointDuration">
<el-input
v-model="form.nurseStationItem.advanceAppointDuration"
placeholder="请输入提前预约时长(小时)"
placeholder="提前预约时长(单位小时)"
type="number"
min="0"
/>
</el-form-item>
<el-form-item label="排序" prop="sort">
@ -465,7 +487,6 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 护理站 -->
<el-dialog
title="选择护理站"
@ -507,7 +528,7 @@
</el-form>
<el-table
v-loading="loading"
:data="nurseStationlist"
:data="nurseStationlist2"
@cell-dblclick="choicestationid"
>
<el-table-column label="请选择" width="70" align="center">
@ -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);
});
});
}
}
},
},
};
</script>

View File

@ -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);
}
});
},
},