diff --git a/src/views/system/classifyItem/index.vue b/src/views/system/classifyItem/index.vue index d2817d1..d1ce5f4 100644 --- a/src/views/system/classifyItem/index.vue +++ b/src/views/system/classifyItem/index.vue @@ -25,16 +25,8 @@ /> - 搜索 - 重置 + 搜索 + 重置 @@ -47,8 +39,7 @@ size="mini" @click="handleAdd" v-hasPermi="['system:classifyItem:add']" - >新增 + >新增 修改 + >修改 删除 + >删除 - + --> + - + @@ -104,13 +86,9 @@ >{{ scope.row.classifyType == "NURSE_AGNECY" ? "护理机构分类" : "" }} {{ scope.row.classifyType == "NURSE_ITEM" ? "护理项目分类" : "" }} - --> + --> - + @@ -167,7 +143,7 @@ :prop="`nurseClassifyInfoList.${index}.classifyName`" > - + @@ -273,7 +245,7 @@ import { getInfo, delInfo, addInfo, - updateInfo, + updateInfo } from "@/api/system/classifyItem.js"; import { updatePicture } from "@/api/system/station"; export default { @@ -287,7 +259,7 @@ export default { ids: [], // 非单个禁用 single: true, - imgone:"", + imgone: "", // 非多个禁用 multiple: true, // 显示搜索条件 @@ -308,15 +280,15 @@ export default { parentId: null, classifyCode: null, classifyName: null, - + classifyLevel: null, classifyType: null, classifyPictureUrl: null, - classifySort: null, + classifySort: null }, // 表单参数 form: { - nurseClassifyInfoList: [], + nurseClassifyInfoList: [] }, idd: 0, classifyPictureUrl: null, @@ -328,46 +300,46 @@ export default { { required: true, message: "请输入分类名称", - trigger: "blur", - }, + trigger: "blur" + } ], classifyPictureUrl: [ { required: true, message: "请选择分类图标", - trigger: "blur", - }, + trigger: "blur" + } ], classifySort: [ { required: true, message: "请输入分类排序", - trigger: "blur", - }, - ], + trigger: "blur" + } + ] }, classifyName: [ { required: true, message: "请输入分类名称", - trigger: "blur", - }, + trigger: "blur" + } ], classifyPictureUrl: [ { required: true, message: "请选择分类图标", - trigger: "blur", - }, + trigger: "blur" + } ], classifySort: [ { required: true, message: "请输入分类排序", - trigger: "blur", - }, - ], - }, + trigger: "blur" + } + ] + } }; }, created() { @@ -385,7 +357,7 @@ export default { classifyName: "", classifyPictureUrl: "", classifySort: "", - idd: this.idd, + idd: this.idd }; if (this.form.nurseClassifyInfoList.length == 5) { this.$message.error("最多批量添加5条"); @@ -399,7 +371,7 @@ export default { imgclassifyPictureitem(item) { let items = JSON.parse(item); if (items.idd && !items.id) { - this.form.nurseClassifyInfoList.forEach((e) => { + this.form.nurseClassifyInfoList.forEach(e => { if (e.idd == items.idd) { e.classifyPictureUrl = items.classifyPictureUrl; } @@ -411,7 +383,7 @@ export default { /** 查询护理机构和护理项目分类信息列表 */ getList() { this.loading = true; - listInfo(this.queryParams).then((response) => { + listInfo(this.queryParams).then(response => { this.infoList = response.rows; this.total = response.total; this.loading = false; @@ -424,18 +396,18 @@ export default { if (this.form.classifyPictureUrl != this.imgone) { obj.pictureUrlList.push(this.form.classifyPictureUrl); } - updatePicture(obj).then((res) => { + updatePicture(obj).then(res => { this.editopen = false; }); } if (this.open) { var obj = { pictureUrlList: [] }; if (this.form.nurseClassifyInfoList) { - this.form.nurseClassifyInfoList.forEach((e) => { + this.form.nurseClassifyInfoList.forEach(e => { obj.pictureUrlList.push(e.classifyPictureUrl); }); } - updatePicture(obj).then((res) => { + updatePicture(obj).then(res => { this.open = false; }); } @@ -455,7 +427,7 @@ export default { createBy: null, createTime: null, updateBy: null, - updateTime: null, + updateTime: null }; this.resetForm("form"); }, @@ -471,7 +443,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map((item) => item.id); + this.ids = selection.map(item => item.id); this.single = selection.length !== 1; this.multiple = !selection.length; }, @@ -483,11 +455,9 @@ export default { classifyName: "", classifyPictureUrl: "", classifySort: "", - idd: this.idd, - }, - ], - - + idd: this.idd + } + ] }; this.open = true; this.title = "添加护理项目分类信息"; @@ -496,7 +466,7 @@ export default { handleUpdate(row) { this.reset(); const id = row.id || this.ids; - getInfo(id).then((response) => { + getInfo(id).then(response => { this.form = response.data; this.imgone = this.form.classifyPictureUrl; this.classifyPictureUrl = response.data.classifyPictureUrl; @@ -506,27 +476,27 @@ export default { }, /** 提交按钮 */ submitForm() { - console.log(this.form); - this.$refs["form"].validate((valid) => { + this.form.classifySort = Number(this.form.classifySort); + this.$refs["form"].validate(valid => { if (valid) { - if (this.form.id != null) { - updateInfo(this.form).then((response) => { + updateInfo(this.form).then(response => { this.$modal.msgSuccess("修改成功"); if (this.form.classifyPictureUrl != this.imgone) { var obj = { pictureUrlList: [] }; obj.pictureUrlList.push(this.imgone); - updatePicture(obj).then((res) => {}); + updatePicture(obj).then(res => {}); } this.editopen = false; this.getList(); }); } else { - if(this.form.nurseClassifyInfoList[0].classifySort){ - this.form.nurseClassifyInfoList[0].classifySort = parseInt(this.form.nurseClassifyInfoList[0].classifySort); + if (this.form.nurseClassifyInfoList[0].classifySort) { + this.form.nurseClassifyInfoList[0].classifySort = parseInt( + this.form.nurseClassifyInfoList[0].classifySort + ); } - - addInfo(this.form).then((response) => { + addInfo(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -541,7 +511,7 @@ export default { console.log(row); this.$modal .confirm("是否确认删除?") - .then(function () { + .then(function() { return delInfo(ids); }) .then(() => { @@ -555,11 +525,11 @@ export default { this.download( "classify/info/export", { - ...this.queryParams, + ...this.queryParams }, `info_${new Date().getTime()}.xlsx` ); - }, - }, + } + } }; diff --git a/src/views/system/poser/index.vue b/src/views/system/poser/index.vue index e06ded0..590e0d8 100644 --- a/src/views/system/poser/index.vue +++ b/src/views/system/poser/index.vue @@ -9,14 +9,18 @@ label-width="110px" > - {{ + + {{ queryParams.nurseStationName - }} + }} + - {{ + + {{ queryParams.nurseItemName - }} + }} + - + - + > @@ -50,16 +49,8 @@ /> - 搜索 - 重置 + 搜索 + 重置 @@ -71,8 +62,7 @@ size="mini" @click="handleAdd" v-hasPermi="['system:poser:add']" - >新增 + >新增 修改 + >修改 删除 + >删除 - + --> + - + - - + + - + @@ -194,19 +161,9 @@ :before-close="cancel" append-to-body > - + - + @@ -221,8 +178,7 @@ :key="item.value" :label="item.label" :value="item.value" - > - + > @@ -230,7 +186,7 @@ v-model="form.poserSort" placeholder="请输入海报显示顺序" oninput="value=value.replace(/[^\d]/g,'')" - maxLength="5" + maxlength="5" /> {{ form.nurseItemName }} + >{{ form.nurseItemName }} {{ form.nurseItemName }} - + >{{ form.nurseItemName }} + + - +