图片取消

This commit is contained in:
闫晓茹 2022-11-10 13:50:38 +08:00
parent 28e8ab9c2a
commit 88138ba59d
8 changed files with 117 additions and 163 deletions

View File

@ -16,6 +16,14 @@ export function getGoodsInfo(id) {
method: 'get'
})
}
//取消
export function updatePicture(data) {
return request({
url: '/system/patientArchives/updatePicture',
method: 'post',
data: data
})
}
// 新增商品基本信息
export function addGoodsInfo(data) {

View File

@ -16,6 +16,14 @@ export function getGoodsCategory(id) {
method: 'get'
})
}
//取消
export function updatePicture(data) {
return request({
url: '/system/patientArchives/updatePicture',
method: 'post',
data: data
})
}
// 新增商品分类信息
export function addGoodsCategory(data) {

View File

@ -76,3 +76,12 @@ export function delGoodsInfo(goodsInfoId) {
method: 'delete'
})
}
//取消
export function updatePicture(data) {
return request({
url: '/system/patientArchives/updatePicture',
method: 'post',
data: data
})
}

View File

@ -95,4 +95,12 @@ export function getLabelList(id) {
url: `/system/nurseStationlabel/getLabelList?nurseStationId=${id}`,
method: 'get'
})
}
}
//取消
export function updatePicture(data) {
return request({
url: '/system/patientArchives/updatePicture',
method: 'post',
data: data
})
}

View File

@ -672,6 +672,7 @@ import {
goodsInfoList,
goodsCategory,
editGoodsWhetherShelf,
updatePicture,
} from "@/api/system/OperateGoodsInfo";
import editor from "@/components/Editor";
import { getListByUser } from "@/api/system/userlist.js";
@ -682,6 +683,7 @@ export default {
name: "OperateGoodsInfo",
data() {
return {
imgone:"",
imageUrl: "", //
value: "",
datas: null,
@ -884,6 +886,14 @@ export default {
},
//
cancel() {
console.log(this.form);
var obj = { pictureUrlList: [] };
if(this.imgone !=this.form.goodsPictureUrl ){
obj.pictureUrlList.push(this.form.goodsPictureUrl);
}
updatePicture(obj).then((res) => {
console.log(res);
});
this.open = false;
this.reset();
this.StationName = "请选择所属护理站";

View File

@ -212,6 +212,7 @@ import {
listGoodsCategory,
getGoodsCategory,
delGoodsCategory,
updatePicture ,
addGoodsCategory,
updateGoodsCategory,
} from "@/api/system/goodsCategory";
@ -222,6 +223,7 @@ export default {
components: { stationAcatar },
data() {
return {
imgone:"",
baseurl: "",
//
loading: true,
@ -289,6 +291,14 @@ export default {
},
//
cancel() {
console.log(this.form);
var obj = { pictureUrlList: [] };
if(this.imgone !=this.form.goodsCategoryPicture ){
obj.pictureUrlList.push(this.form.goodsCategoryPicture);
}
updatePicture (obj).then((res) => {
console.log(res);
});
this.open = false;
this.reset();
},

View File

@ -94,7 +94,7 @@
>修改</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
@ -177,7 +177,7 @@
v-hasPermi="['system:operateGoodInfo:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
@ -237,7 +237,7 @@
"
>{{ StationName }}</el-button
>
</el-form-item>
<el-form-item label="商品分类名称" prop="goodsCategoryId">
<el-select
@ -254,7 +254,8 @@
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品用途" prop="goodsPurpose">
<el-select
@ -380,7 +381,7 @@
>
<el-form
ref="queryForm"
:model="nurseStationqueryParams"
:model="getListByUserquery"
:rules="rules"
label-width="80px"
:inline="true"
@ -391,7 +392,7 @@
label-width="120"
>
<el-input
v-model="nurseStationqueryParams.nurseStationCode"
v-model="getListByUserquery.nurseStationCode"
placeholder="请输入护理站编码"
clearable
/>
@ -402,7 +403,7 @@
label-width="120"
>
<el-input
v-model="nurseStationqueryParams.nurseStationName"
v-model="getListByUserquery.nurseStationName"
placeholder="请输入护理站名称"
clearable
/>
@ -463,10 +464,10 @@
</el-table-column>
</el-table>
<pagination
v-show="nursetotal > 0"
:total="nursetotal"
:page.sync="nurseStationqueryParams.pageNum"
:limit.sync="nurseStationqueryParams.pageSize"
v-show="total2 > 0"
:total="total2"
:page.sync="getListByUserquery.pageNum"
:limit.sync="getListByUserquery.pageSize"
@pagination="handleQuery2"
/>
</el-dialog>
@ -479,10 +480,11 @@ import {
delGoodsInfo,
addGoodsInfo,
updateGoodsInfo,
updatePicture,
goodsInfoList,
goodsCategory,
editGoodsWhetherShelf,
} from "@/api/system/OperateGoodsInfo";
} from "@/api/system/goodsInfo";
import editor from "@/components/Editor";
import { getListByUser } from "@/api/system/userlist.js";
import stationAcatar from "../stationAvatar/index.vue";
@ -492,6 +494,7 @@ export default {
name: "OperateGoodsInfo",
data() {
return {
imgone:"",
imageUrl: "", //
value: "",
datas: null,
@ -507,6 +510,8 @@ export default {
showSearch: true,
//
total: 0,
total2: 0,
//
goodsInfoList: [],
//
@ -550,7 +555,7 @@ export default {
id: null,
whetherShelf: null,
},
nurseStationqueryParams: {
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
@ -604,7 +609,7 @@ export default {
created() {
this.getList();
this.info();
this.getList2();
// this.getList2();
},
methods: {
upwhetherShelf(row) {
@ -688,6 +693,14 @@ export default {
},
//
cancel() {
console.log(this.form);
var obj = { pictureUrlList: [] };
if(this.imgone !=this.form.goodsPictureUrl ){
obj.pictureUrlList.push(this.form.goodsPictureUrl);
}
updatePicture(obj).then((res) => {
console.log(res);
});
this.open = false;
this.reset();
this.StationName = "请选择所属护理站";
@ -717,30 +730,30 @@ export default {
},
handleQuery2(){
this.queryParams.pageNum = 1;
this.getList2()
},
getList2(){
getListByUser(this.nurseStationqueryParams).then((res) => {
this.nursetotal = res.total;
this.nurseStationlist = res.rows;
});
this.info()
},
// getList2(){
// getListByUser(this.nurseStationqueryParams).then((res) => {
// this.nursetotal = res.total;
// this.nurseStationlist = res.rows;
// });
// },
resetQuery2() {
this.resetForm("queryForm");
this.nurseStationqueryParams={
this.getListByUserquery={
pageNum:1,
pageSize:10
},
this.handleQuery2();
},
addcancel() {
this.innerVisible = false;
// this.innerVisiblexg = false;
this.resetQuery2();
},
//
reset() {
this.form = {
@ -822,7 +835,7 @@ export default {
this.title = "修改商品基本信息";
});
},
/** 提交按钮 */
submitForm() {
console.log(this.form);
@ -844,7 +857,7 @@ export default {
addGoodsInfo(this.form).then((response) => {
console.log(this.form);
this.$modal.msgSuccess("新增成功");
this.StationName = "请选择所属护理站";
this.open = false;
this.getList();

View File

@ -145,18 +145,7 @@
>修改</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:station:remove']"
>删除</el-button
>
</el-col> -->
<el-col :span="1.5">
<el-button
type="info"
@ -168,17 +157,7 @@
>导入</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:station:export']"
>导出</el-button
>
</el-col> -->
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
@ -225,18 +204,7 @@
prop="address"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column
label="护理站简介"
align="center"
prop="agencyIntroduce"
:show-overflow-tooltip="true"
/>
<el-table-column
label="护理站总概述"
align="center"
prop="nurseStationDescription"
:show-overflow-tooltip="true"
/> -->
<el-table-column label="护理站经度" align="center" prop="longitude" />
<el-table-column label="护理站纬度" align="center" prop="latitude" />
<el-table-column label="联系电话" align="center" prop="phone" />
@ -250,13 +218,6 @@
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<!-- <el-button
size="mini"
type="text"
icon="el-icon-search"
@click="looknurseStationLabelList(scope.row)"
>查看标签信息</el-button
> -->
<el-button
size="mini"
type="text"
@ -310,33 +271,6 @@
</div>
</el-dialog>
<!-- 查看标签信息 -->
<!-- <el-dialog
title="标签信息"
:visible.sync="nurseStationLabelopen"
width="700px"
append-to-body
>
<el-table v-loading="loading" :data="looknurseStationLabel">
<el-table-column
label="标签名称"
align="center"
prop="labelDescription"
/>
<el-table-column label="标签编号" align="center" prop="labelCode" />
<el-table-column label="排序" align="center" prop="sort" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button
type="primary"
plain
@click="nurseStationLabelopen = false"
size="small"
>关闭窗口</el-button
>
</div>
</el-dialog> -->
<!-- 新增护理站信息对话框 -->
<el-dialog
:title="title"
@ -445,22 +379,7 @@
oninput=" if(value.length>10){value=value.slice(0,20)}"
/>
</el-form-item>
<!-- <el-form-item label="护理类型" prop="nurseStationType">
<el-select
v-model="nurseStationType2"
multiple
placeholder="请选择护理类型"
style="width: 208px"
>
<el-option
v-for="item in nurseStationTypelist"
:key="item.nurseTypeCode"
:label="item.nurseTypeName"
:value="item.nurseTypeCode"
>
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="联系电话" prop="phone">
<el-input
v-model="form.phone"
@ -635,10 +554,9 @@ import {
updateStation,
getFirstLevelInfo,
getSecondaryLevelInfo,
getSubordinateRegions,
getInfoLists,
nurseStationlabel,
getLabelList,
updatePicture,
} from "@/api/system/station";
import { getInfoList } from "@/api/system/nurseItem";
import stationAcatar from "../stationAvatar/index.vue";
@ -677,6 +595,8 @@ export default {
return {
imageUrl: "",
imageUrl2: "",
imgtwo:"",
imgone:"",
//
upload: {
//
@ -749,6 +669,7 @@ export default {
pageSize: 10,
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
@ -798,18 +719,14 @@ export default {
trigger: "blur",
message: "",
},
// { required: true, message: "", trigger: "blur" },
],
// dutyPerson: [
// { required: true, message: "", trigger: "blur" },
// ],
dutyPhone: [
{
validator: checkMobile2,
trigger: "blur",
message: "",
},
// { required: false, message: "", trigger: "blur" },
],
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
@ -859,37 +776,7 @@ export default {
} else {
this.looknurseStationLabel.splice(index, 1);
}
// if (item.ids && !item.id) {
// if (this.looknurseStationLabel.length == 1) {
// // this.$message.error("");
// this.looknurseStationLabel = [
// {
// labelDescription: "",
// sort: "",
// ids: 1,
// },
// ];
// } else {
// this.looknurseStationLabel = this.looknurseStationLabel.filter(
// (e) => e.ids != item.ids
// );
// }
// } else if (!item.ids && item.id) {
// if (this.looknurseStationLabel.length == 1) {
// // this.$message.error("");
// this.nurseStationLabelList = [
// {
// labelDescription: "",
// sort: "",
// ids: 1,
// },
// ];
// } else {
// this.looknurseStationLabel = this.looknurseStationLabel.filter(
// (e) => e.id != item.id
// );
// }
// }
console.log(this.form.nurseStationLabelList);
},
addnurseStationLabelList() {
@ -906,15 +793,7 @@ export default {
}
console.log(this.looknurseStationLabel);
},
//
// looknurseStationLabelList(item) {
// console.log(item);
// nurseStationlabel(item.id).then((res) => {
// this.looknurseStationLabel = res.rows;
// this.nurseStationLabelopen = true;
// console.log(this.looknurseStationLabel);
// });
// },
//
looktype(item) {
// console.log(item);
@ -972,6 +851,17 @@ export default {
},
//
cancel() {
console.log(this.form);
var obj = { pictureUrlList: [] };
if(this.imgone !=this.form.stationIntroducePcitureUrl ){
obj.pictureUrlList.push(this.form.stationIntroducePcitureUrl);
}
if(this.imgtwo !=this.form.stationPictureUrl ){
obj.pictureUrlList.push(this.form.stationPictureUrl);
}
updatePicture(obj).then((res) => {
console.log(res);
});
this.open = false;
this.reset();
this.value3 = "";
@ -1083,9 +973,7 @@ export default {
console.log(response);
this.form = response.data;
this.looknurseStationLabel = response.data.nurseStationLabel;
this.nurseStationType2 = this.form.nurseStationType.split(",");
console.log(this.list);
this.open = true;
this.loading = false;
console.log(this.form);