From 73036e7dbbc9ee9d63dd6f10b6d3043cce7ef680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Mon, 31 Oct 2022 08:58:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A4=E7=90=86=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/baseurl.js | 4 +- src/api/system/goodsInfo.js | 6 +- src/views/system/goodsInfo/index.vue | 449 +++++++++++------------ src/views/system/station/index.vue | 2 +- src/views/system/stationAvatar/index.vue | 32 +- src/views/system/user/index.vue | 6 +- 6 files changed, 251 insertions(+), 248 deletions(-) diff --git a/src/api/baseurl.js b/src/api/baseurl.js index 4533f4b..8998a23 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.30:8080"; -export default baseurl +export default baseurl \ No newline at end of file diff --git a/src/api/system/goodsInfo.js b/src/api/system/goodsInfo.js index 4bef9cc..72c1ca7 100644 --- a/src/api/system/goodsInfo.js +++ b/src/api/system/goodsInfo.js @@ -20,7 +20,7 @@ export function goodsInfoList(query) { // 查询商品基本信息详细 export function getGoodsInfo(id) { return request({ - url: `/system/goodsInfo/goodsDetails?`+`goodsInfoId=${id}`, + url: `/system/goodsInfo/goodsDetails?` + `goodsInfoId=${id}`, // url: '/system/goodsInfo/goodsDetails/' + goodsInfoId, method: 'get' }) @@ -55,7 +55,7 @@ export function goodsCategory(query) { export function updateGoodsInfo(data) { return request({ url: '/system/goodsInfo/edit', - method: 'put', + method: 'POST', data: data }) } @@ -75,4 +75,4 @@ export function delGoodsInfo(id) { url: '/system/goodsInfo/' + id, method: 'delete' }) -} +} \ No newline at end of file diff --git a/src/views/system/goodsInfo/index.vue b/src/views/system/goodsInfo/index.vue index a42a4db..29854e3 100644 --- a/src/views/system/goodsInfo/index.vue +++ b/src/views/system/goodsInfo/index.vue @@ -8,7 +8,7 @@ v-show="showSearch" label-width="100px" > - - + > + + {{ scope.row.shelfTime }} + + + - - - + - - - - - - - + - + - + - + - + + + + + + 新增 - @@ -539,64 +545,29 @@ label-width="50px" style="margin-top: 20px" > - - - - + - - - - + - - - - + - - - - + - + - - - - - - 新增 - 删除 + @@ -605,34 +576,53 @@ prop="goodsRemark" style="margin-top: 20px" > - + + + diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue index a840093..0b14622 100644 --- a/src/views/system/station/index.vue +++ b/src/views/system/station/index.vue @@ -674,7 +674,7 @@ export default { value3: "", value2: "", value1: "", - value: "360000000000", + value: "", // 遮罩层 loading: true, // 选中数组 diff --git a/src/views/system/stationAvatar/index.vue b/src/views/system/stationAvatar/index.vue index e99888d..672e066 100644 --- a/src/views/system/stationAvatar/index.vue +++ b/src/views/system/stationAvatar/index.vue @@ -112,16 +112,7 @@ import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js"; export default { components: { VueCropper }, - props: { - img: { - inputName: String, - required: true, - }, - type: { - inputName: String, - required: true, - }, - }, + props: ["img", "type", "item"], data() { return { imageUrl: "", @@ -140,10 +131,13 @@ export default { fixedBox: true, // 固定截图框大小 不允许改变 }, previews: {}, + rows: {}, }; }, created() { this.types = this.type; + this.rows = this.item; + if (this.img == null) { this.options.img = null; } else if (this.img == "") { @@ -151,8 +145,21 @@ export default { } else { this.options.img = baseurl + this.img; } + console.log(this.item); }, watch: { + item: { + handler(newimg, oldimg) { + console.log(newimg,oldimg) + if (this.item == null) { + this.rows = null; + } else if (this.img == "") { + this.rows = null; + } else { + this.rows = this.item; + } + }, + }, img: { handler(newimg, oldimg) { if (this.img == null) { @@ -218,6 +225,11 @@ export default { updateNurseStationHeads(formData).then((response) => { this.options.img = baseurl + response.imgUrl; this.$emit("imgUrl", response.imgUrl); + console.log(this.rows); + if (this.types == "attributePitureUrl") { + this.rows.attributePitureUrl = response.imgUrl; + this.$emit("item", JSON.stringify(this.rows)); + } this.openimg = false; }); }); diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 6fc4d03..a3d6aef 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -364,7 +364,7 @@ - + { if (valid) { this.form.nurseStationIds = this.form.nurseStationIds.join(","); - if (this.form.userId != undefined) { updateUser(this.form).then((response) => { this.$modal.msgSuccess("修改成功");