修改提交

This commit is contained in:
曹辉 2023-05-04 14:14:44 +08:00
parent 8748a0ef62
commit de0bddb2a4
11 changed files with 176 additions and 257 deletions

View File

@ -14,7 +14,6 @@ import {
} from "@/api/system/goodsCategory"; } from "@/api/system/goodsCategory";
import editor from "@/components/Editor"; import editor from "@/components/Editor";
import stationAcatar from "../stationAvatar/index.vue"; import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl.js";
let id = 0; let id = 0;
export default { export default {
@ -455,10 +454,10 @@ export default {
updatePicture(obj).then((res) => {}); updatePicture(obj).then((res) => {});
} }
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
++this.isResouceShow ++this.isResouceShow
this.open = false; this.open = false;
this.getList(); this.getList();
} }
}); });
} else { } else {
@ -468,11 +467,11 @@ export default {
// this.nurseStationId=this.form.nurseStationId // this.nurseStationId=this.form.nurseStationId
addGoodsInfo(this.form).then((response) => { addGoodsInfo(this.form).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.StationName = "请选择所属护理站"; this.StationName = "请选择所属护理站";
++this.isResouceShow ++this.isResouceShow
this.open = false; this.open = false;
this.getList(); this.getList();
} }
}); });
} }

View File

@ -12,7 +12,7 @@
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
style="margin-bottom: 20px" style="margin-bottom: 20px"
/> />
</div> --> </div>-->
<div class="head-container" style="height: 580px; width: 100%"> <div class="head-container" style="height: 580px; width: 100%">
<el-tree <el-tree
node-key="id" node-key="id"
@ -58,18 +58,10 @@
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> --> </el-form-item>-->
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
@ -81,8 +73,7 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:goodsCategory:add']" v-hasPermi="['system:goodsCategory:add']"
>新增</el-button >新增</el-button>
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -93,8 +84,7 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['system:goodsCategory:edit']" v-hasPermi="['system:goodsCategory:edit']"
>修改</el-button >修改</el-button>
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -105,8 +95,7 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:goodsCategory:remove']" v-hasPermi="['system:goodsCategory:remove']"
>删除</el-button >删除</el-button>
>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
@ -118,11 +107,8 @@
v-hasPermi="['system:goodsCategory:export']" v-hasPermi="['system:goodsCategory:export']"
>导出</el-button >导出</el-button
> >
</el-col> --> </el-col>-->
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table <el-table
@ -137,11 +123,7 @@
align="center" align="center"
prop="goodsCategoryName" prop="goodsCategoryName"
/> />
<el-table-column <el-table-column label="商品分类编码" align="center" prop="goodsCategoryCode" />
label="商品分类编码"
align="center"
prop="goodsCategoryCode"
/>
<!-- <el-table-column label="商品分类图片地址" align="center" prop="goodsCategoryPicture" /> --> <!-- <el-table-column label="商品分类图片地址" align="center" prop="goodsCategoryPicture" /> -->
<el-table-column <el-table-column
label="分类概述" label="分类概述"
@ -150,11 +132,7 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column label="显示顺序" align="center" prop="sort" /> <el-table-column label="显示顺序" align="center" prop="sort" />
<el-table-column <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -162,16 +140,14 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:goodsCategory:edit']" v-hasPermi="['system:goodsCategory:edit']"
>修改</el-button >修改</el-button>
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:goodsCategory:remove']" v-hasPermi="['system:goodsCategory:remove']"
>删除</el-button >删除</el-button>
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -204,21 +180,16 @@
ref="cascader" ref="cascader"
:placeholder="form.parentName ? form.parentName : '商品主分类'" :placeholder="form.parentName ? form.parentName : '商品主分类'"
:key="isResouceShow" :key="isResouceShow"
> ></el-cascader>
</el-cascader>
<!-- <el-input <!-- <el-input
v-model="form.parentName" v-model="form.parentName"
placeholder="请输入父级分类名称" placeholder="请输入父级分类名称"
maxlength="10" maxlength="10"
disabled disabled
/> --> />-->
</el-form-item> </el-form-item>
<el-form-item label="商品分类名称" prop="goodsCategoryName"> <el-form-item label="商品分类名称" prop="goodsCategoryName">
<el-input <el-input v-model="form.goodsCategoryName" placeholder="请输入商品分类名称" maxlength="10" />
v-model="form.goodsCategoryName"
placeholder="请输入商品分类名称"
maxlength="10"
/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="商品分类编码" prop="goodsCategoryCode"> <!-- <el-form-item label="商品分类编码" prop="goodsCategoryCode">
<el-input <el-input
@ -226,7 +197,7 @@
placeholder="请输入商品分类编码" placeholder="请输入商品分类编码"
maxlength="20" maxlength="20"
/> />
</el-form-item> --> </el-form-item>-->
<el-form-item label="商品分类图片" prop="goodsCategoryPicture"> <el-form-item label="商品分类图片" prop="goodsCategoryPicture">
<stationAcatar <stationAcatar
@imgUrl="imgUrl" @imgUrl="imgUrl"
@ -236,11 +207,7 @@
<!-- <img :src="form.goodsCategoryPicture" alt="" /> --> <!-- <img :src="form.goodsCategoryPicture" alt="" /> -->
</el-form-item> </el-form-item>
<el-form-item label="分类概述" prop="categoryRemark"> <el-form-item label="分类概述" prop="categoryRemark">
<el-input <el-input v-model="form.categoryRemark" placeholder="请输入分类概述" maxlength="300" />
v-model="form.categoryRemark"
placeholder="请输入分类概述"
maxlength="300"
/>
</el-form-item> </el-form-item>
<el-form-item label="显示顺序" prop="sort"> <el-form-item label="显示顺序" prop="sort">
<el-input <el-input
@ -267,10 +234,9 @@ import {
updatePicture, updatePicture,
addGoodsCategory, addGoodsCategory,
updateGoodsCategory, updateGoodsCategory,
getStationCategoryList, getStationCategoryList
} from "@/api/system/goodsCategory"; } from "@/api/system/goodsCategory";
import stationAcatar from "../stationAvatar/index.vue"; import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl";
let id = 0; let id = 0;
export default { export default {
name: "GoodsCategory", name: "GoodsCategory",
@ -285,16 +251,16 @@ export default {
const id = node.level === 0 ? 0 : node.data.id; const id = node.level === 0 ? 0 : node.data.id;
setTimeout(() => { setTimeout(() => {
if (id == 9999999) { if (id == 9999999) {
getStationCategoryList(0).then((res) => { getStationCategoryList(0).then(res => {
// //
res.data.forEach((e) => { res.data.forEach(e => {
e.value = e.id; e.value = e.id;
e.label = e.goodsCategoryName; e.label = e.goodsCategoryName;
}); });
resolve( resolve(
res.data.map((item) => { res.data.map(item => {
return { return {
...item, ...item
}; };
}) })
); );
@ -304,37 +270,37 @@ export default {
{ {
label: "商品主分类", label: "商品主分类",
children: [], children: [],
id: 9999999, id: 9999999
}, }
]; ];
resolve( resolve(
data.map((item) => { data.map(item => {
return { return {
...item, ...item
}; };
}) })
); );
} else { } else {
getStationCategoryList(id).then((res) => { getStationCategoryList(id).then(res => {
// //
res.data.forEach((e) => { res.data.forEach(e => {
e.value = e.id; e.value = e.id;
e.label = e.goodsCategoryName; e.label = e.goodsCategoryName;
}); });
resolve( resolve(
res.data.map((item) => { res.data.map(item => {
return { return {
...item, ...item
}; };
}) })
); );
}); });
} }
}, 300); }, 300);
}, }
}, },
imgone: "", imgone: "",
baseurl: "", baseurl: process.env.VUE_APP_BASE_API,
// //
loading: true, loading: true,
// //
@ -363,47 +329,44 @@ export default {
categoryRemark: null, categoryRemark: null,
sort: null, sort: null,
parentId: "", parentId: "",
parentName: "", parentName: ""
}, },
// //
form: { form: {
goodsCategoryName: null, goodsCategoryName: null,
goodsCategoryPicture: null, goodsCategoryPicture: null,
categoryRemark: null, categoryRemark: null,
sort: null, sort: null
}, },
// //
rules: { rules: {
goodsCategoryName: [ goodsCategoryName: [
{ required: true, message: "商品分类名称不能为空", trigger: "blur" }, { required: true, message: "商品分类名称不能为空", trigger: "blur" }
], ],
goodsCategoryCode: [ goodsCategoryCode: [
{ required: true, message: "商品分类编码不能为空", trigger: "blur" }, { required: true, message: "商品分类编码不能为空", trigger: "blur" }
], ],
goodsCategoryPicture: [ goodsCategoryPicture: [
{ required: true, message: "商品分类图片不能为空", trigger: "blur" }, { required: true, message: "商品分类图片不能为空", trigger: "blur" }
], ],
categoryRemark: [ categoryRemark: [
{ required: true, message: "分类概述不能为空", trigger: "blur" }, { required: true, message: "分类概述不能为空", trigger: "blur" }
],
sort: [
{ required: true, message: "显示顺序不能为空", trigger: "blur" },
], ],
sort: [{ required: true, message: "显示顺序不能为空", trigger: "blur" }]
}, },
// //
deptOptions: undefined, deptOptions: undefined,
categoryLevel: null, categoryLevel: null,
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "goodsCategoryName", label: "goodsCategoryName"
}, }
}; };
}, },
watch: {}, watch: {},
created() { created() {
this.baseurl = baseurl;
this.getList(); this.getList();
this.info(); this.info();
}, },
@ -426,12 +389,12 @@ export default {
// this.categoryLevel = data.categoryLevel; // this.categoryLevel = data.categoryLevel;
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
getStationCategoryList(data.id).then((res) => { getStationCategoryList(data.id).then(res => {
res.data.forEach((e) => { res.data.forEach(e => {
e.children = [ e.children = [
{ {
goodsCategoryName: "", goodsCategoryName: ""
}, }
]; ];
}); });
this.loading = false; this.loading = false;
@ -441,20 +404,20 @@ export default {
/** 查询商品分类信息列表 */ /** 查询商品分类信息列表 */
info() { info() {
this.loading = true; this.loading = true;
getStationCategoryList(0).then((res) => { getStationCategoryList(0).then(res => {
res.data.forEach((e) => { res.data.forEach(e => {
e.children = [ e.children = [
{ {
goodsCategoryName: "", goodsCategoryName: ""
}, }
]; ];
}); });
var obj = [ var obj = [
{ {
goodsCategoryName: "商品主分类", goodsCategoryName: "商品主分类",
children: res.data, children: res.data,
id: 0, id: 0
}, }
]; ];
this.deptOptions = obj; this.deptOptions = obj;
this.loading = false; this.loading = false;
@ -462,7 +425,7 @@ export default {
}, },
getList() { getList() {
this.loading = true; this.loading = true;
listGoodsCategory(this.queryParams).then((response) => { listGoodsCategory(this.queryParams).then(response => {
this.goodsCategoryList = response.rows; this.goodsCategoryList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -478,7 +441,7 @@ export default {
} }
} }
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {}); updatePicture(obj).then(res => {});
} }
this.open = false; this.open = false;
this.reset(); this.reset();
@ -522,14 +485,14 @@ export default {
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10
}; };
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id); this.ids = selection.map(item => item.id);
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -546,7 +509,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getGoodsCategory(id).then((response) => { getGoodsCategory(id).then(response => {
this.form = response.data; this.form = response.data;
this.imgone = this.form.goodsCategoryPicture; this.imgone = this.form.goodsCategoryPicture;
this.open = true; this.open = true;
@ -555,33 +518,33 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updateGoodsCategory(this.form).then((response) => { updateGoodsCategory(this.form).then(response => {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
if (this.imgone != this.form.goodsCategoryPicture) { if (this.imgone != this.form.goodsCategoryPicture) {
obj.pictureUrlList.push(this.imgone); obj.pictureUrlList.push(this.imgone);
} }
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {}); updatePicture(obj).then(res => {});
} }
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
++this.isResouceShow; ++this.isResouceShow;
this.open = false; this.open = false;
this.getList(); this.getList();
this.info(); this.info();
} }
}); });
} else { } else {
addGoodsCategory(this.form).then((response) => { addGoodsCategory(this.form).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
++this.isResouceShow; ++this.isResouceShow;
this.open = false; this.open = false;
this.getList(); this.getList();
this.info(); this.info();
} }
}); });
} }
@ -593,14 +556,14 @@ export default {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal this.$modal
.confirm("是否确认删除?") .confirm("是否确认删除?")
.then(function () { .then(function() {
return delGoodsCategory(ids); return delGoodsCategory(ids);
}) })
.then(() => { .then(() => {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
obj.pictureUrlList.push(row.goodsCategoryPicture); obj.pictureUrlList.push(row.goodsCategoryPicture);
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {}); updatePicture(obj).then(res => {});
} }
this.getList(); this.getList();
this.info(); this.info();
@ -613,15 +576,15 @@ export default {
this.download( this.download(
"system/goodsCategory/export", "system/goodsCategory/export",
{ {
...this.queryParams, ...this.queryParams
}, },
`goodsCategory_${new Date().getTime()}.xlsx` `goodsCategory_${new Date().getTime()}.xlsx`
); );
}, },
imgUrl(imgUrl) { imgUrl(imgUrl) {
this.form.goodsCategoryPicture = imgUrl; this.form.goodsCategoryPicture = imgUrl;
}, }
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,10 +1,6 @@
<template> <template>
<div> <div>
<div <div class="user-info-head" @click="editCropper()" style="width: 100px; height: 100px">
class="user-info-head"
@click="editCropper()"
style="width: 100px; height: 100px"
>
<img <img
v-if="options.img" v-if="options.img"
v-bind:src="options.img" v-bind:src="options.img"
@ -67,37 +63,19 @@
</el-upload> </el-upload>
</el-col> </el-col>
<el-col :lg="{ span: 1, offset: 2 }" :md="2"> <el-col :lg="{ span: 1, offset: 2 }" :md="2">
<el-button <el-button icon="el-icon-plus" size="small" @click="changeScale(1)"></el-button>
icon="el-icon-plus"
size="small"
@click="changeScale(1)"
></el-button>
</el-col> </el-col>
<el-col :lg="{ span: 1, offset: 1 }" :md="2"> <el-col :lg="{ span: 1, offset: 1 }" :md="2">
<el-button <el-button icon="el-icon-minus" size="small" @click="changeScale(-1)"></el-button>
icon="el-icon-minus"
size="small"
@click="changeScale(-1)"
></el-button>
</el-col> </el-col>
<el-col :lg="{ span: 1, offset: 1 }" :md="2"> <el-col :lg="{ span: 1, offset: 1 }" :md="2">
<el-button <el-button icon="el-icon-refresh-left" size="small" @click="rotateLeft()"></el-button>
icon="el-icon-refresh-left"
size="small"
@click="rotateLeft()"
></el-button>
</el-col> </el-col>
<el-col :lg="{ span: 1, offset: 1 }" :md="2"> <el-col :lg="{ span: 1, offset: 1 }" :md="2">
<el-button <el-button icon="el-icon-refresh-right" size="small" @click="rotateRight()"></el-button>
icon="el-icon-refresh-right"
size="small"
@click="rotateRight()"
></el-button>
</el-col> </el-col>
<el-col :lg="{ span: 2, offset: 6 }" :md="2"> <el-col :lg="{ span: 2, offset: 6 }" :md="2">
<el-button type="primary" size="small" @click="uploadImg()" <el-button type="primary" size="small" @click="uploadImg()"> </el-button>
> </el-button
>
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
@ -106,21 +84,18 @@
<script> <script>
import { VueCropper } from "vue-cropper"; import { VueCropper } from "vue-cropper";
import baseurl from "@/api/baseurl.js";
import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js"; import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js";
export default { export default {
components: { VueCropper }, components: { VueCropper },
props: { props: {
img: { img: {
inputName: String, inputName: String,
required: true, required: true
}, },
type: { type: {
inputName: String, inputName: String,
required: true, required: true
}, }
}, },
data() { data() {
return { return {
@ -137,9 +112,9 @@ export default {
autoCrop: true, // autoCrop: true, //
autoCropWidth: 200, // autoCropWidth: 200, //
autoCropHeight: 200, // autoCropHeight: 200, //
fixedBox: true, // fixedBox: true //
}, },
previews: {}, previews: {}
}; };
}, },
created() { created() {
@ -149,7 +124,7 @@ export default {
} else if (this.img == "") { } else if (this.img == "") {
this.options.img = null; this.options.img = null;
} else { } else {
this.options.img = baseurl + this.img; this.options.img = process.env.VUE_APP_BASE_API + this.img;
} }
}, },
watch: { watch: {
@ -160,15 +135,15 @@ export default {
} else if (this.img == "") { } else if (this.img == "") {
this.options.img = null; this.options.img = null;
} else { } else {
this.options.img = baseurl + this.img; this.options.img = process.env.VUE_APP_BASE_API + this.img;
} }
}, }
}, },
type: { type: {
handler(newimg, oldimg) { handler(newimg, oldimg) {
this.types = this.type; this.types = this.type;
}, }
}, }
}, },
methods: { methods: {
// //
@ -210,12 +185,12 @@ export default {
}, },
// //
uploadImg() { uploadImg() {
this.$refs.cropper.getCropBlob((data) => { this.$refs.cropper.getCropBlob(data => {
let formData = new FormData(); let formData = new FormData();
formData.append("file", data); formData.append("file", data);
formData.append("type", this.types); formData.append("type", this.types);
updateNurseStationHeads(formData).then((response) => { updateNurseStationHeads(formData).then(response => {
this.options.img = baseurl + response.imgUrl; this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl); this.$emit("imgUrl", response.imgUrl);
this.openimg = false; this.openimg = false;
}); });
@ -229,8 +204,8 @@ export default {
closeDialog() { closeDialog() {
this.imgs = ""; this.imgs = "";
this.visible = false; this.visible = false;
}, }
}, }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -11,7 +11,6 @@ import {
import editor from "@/components/Editor"; import editor from "@/components/Editor";
import { getListByUser } from "@/api/system/userlist.js"; import { getListByUser } from "@/api/system/userlist.js";
import stationAcatar from "../stationAvatar/index.vue"; import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl.js";
export default { export default {
components: { stationAcatar, editor }, components: { stationAcatar, editor },
@ -51,22 +50,22 @@ export default {
nursetotal: 0, nursetotal: 0,
nurseStationId: null, nurseStationId: null,
goods: [{ goods: [{
value: "BUSINESS", value: "BUSINESS",
label: "买卖", label: "买卖",
}, },
{ {
value: "LEASE", value: "LEASE",
label: "租赁", label: "租赁",
}, },
], ],
options: [{ options: [{
value: 0, value: 0,
label: "否", label: "否",
}, },
{ {
value: 1, value: 1,
label: "是", label: "是",
}, },
], ],
goodDetailsLists: [], goodDetailsLists: [],
idd: 9999999, idd: 9999999,
@ -96,11 +95,6 @@ export default {
sort: null, sort: null,
// mame:null, // mame:null,
}, },
//权限查询
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
// 表单参数 // 表单参数
form: { form: {
nurseStationName: "", nurseStationName: "",
@ -218,7 +212,7 @@ export default {
obj.pictureUrlList.push(this.form.goodsPictureUrl); obj.pictureUrlList.push(this.form.goodsPictureUrl);
} }
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => { }); updatePicture(obj).then((res) => {});
} }
this.open = false; this.open = false;
this.reset(); this.reset();
@ -230,8 +224,8 @@ export default {
goodsPrice: "", goodsPrice: "",
goodsStock: "", goodsStock: "",
sort: "", sort: "",
},], }, ],
},]; }, ];
}, },
//护理站页面选择护理站 //护理站页面选择护理站
nurseclick(item) { nurseclick(item) {
@ -294,7 +288,7 @@ export default {
goodsStock: "", goodsStock: "",
sort: "", sort: "",
idd: 9999999, idd: 9999999,
},]; }, ];
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -330,7 +324,7 @@ export default {
goodsStock: "", goodsStock: "",
sort: "", sort: "",
idd: 9999999, idd: 9999999,
},]; }, ];
this.open = true; this.open = true;
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
@ -362,21 +356,21 @@ export default {
obj.pictureUrlList.push(this.imgone); obj.pictureUrlList.push(this.imgone);
} }
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => { }); updatePicture(obj).then((res) => {});
} }
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
} }
}); });
} else { } else {
// this.nurseStationId=this.form.nurseStationId // this.nurseStationId=this.form.nurseStationId
addGoodsInfo(this.form).then((response) => { addGoodsInfo(this.form).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
} }
}); });
} }
@ -386,25 +380,25 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.$confirm("是否确认删除订单信息的数据项?", "提示", { this.$confirm("是否确认删除订单信息的数据项?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
obj.pictureUrlList.push(row.goodsPictureUrl); obj.pictureUrlList.push(row.goodsPictureUrl);
updatePicture(obj).then((res) => { }); updatePicture(obj).then((res) => {});
delGoodsInfo(row.goodsInfoId).then((res) => { delGoodsInfo(row.goodsInfoId).then((res) => {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.getList(); this.getList();
}); });
}) })
.catch(() => { }); .catch(() => {});
}, },
imgUrl(imgUrl) { imgUrl(imgUrl) {
this.form.goodsPictureUrl = imgUrl; this.form.goodsPictureUrl = imgUrl;
}, },
attributePitureUrl(imgUrl) { }, attributePitureUrl(imgUrl) {},
attributePitureitem(item) { attributePitureitem(item) {
let items = JSON.parse(item); let items = JSON.parse(item);
if (items.idd && !items.attributeDetailsId) { if (items.idd && !items.attributeDetailsId) {

View File

@ -11,12 +11,11 @@ import {
weChatRefundOrderApply, weChatRefundOrderApply,
} from "@/api/system/goodsOrder"; } from "@/api/system/goodsOrder";
import { getListByUser } from "@/api/system/userlist.js"; import { getListByUser } from "@/api/system/userlist.js";
import baseurl from '@/api/baseurl.js'
export default { export default {
name: "GoodsOrder", name: "GoodsOrder",
data() { data() {
return { return {
baseurl: null, baseurl: process.env.VUE_APP_BASE_API,
// 查看商品信息 // 查看商品信息
innerorder: false, innerorder: false,
// 查看物流信息 // 查看物流信息
@ -135,7 +134,6 @@ export default {
}; };
}, },
created() { created() {
this.baseurl = baseurl
this.getList(); this.getList();
}, },
methods: { methods: {
@ -389,17 +387,17 @@ export default {
if (this.form.id != null) { if (this.form.id != null) {
updateGoodsOrder(this.form).then((response) => { updateGoodsOrder(this.form).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
} }
}); });
} else { } else {
addGoodsOrder(this.form).then((response) => { addGoodsOrder(this.form).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
} }
}); });
} }

View File

@ -9,13 +9,12 @@ import {
getPersonInfo getPersonInfo
} from "@/api/system/order"; } from "@/api/system/order";
import { getListByUser } from "@/api/system/userlist.js"; import { getListByUser } from "@/api/system/userlist.js";
import baseurl from '@/api/baseurl.js'
export default { export default {
name: "order", name: "order",
data() { data() {
return { return {
map: null, map: null,
baseurl: null, baseurl: process.env.VUE_APP_BASE_API,
orderStatuslist: [{ orderStatuslist: [{
value: "WAIT_PAY", value: "WAIT_PAY",
label: "待付款", label: "待付款",
@ -115,7 +114,6 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.baseurl = baseurl
}, },
mounted() {}, mounted() {},
methods: { methods: {

View File

@ -12,7 +12,6 @@ import {
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { getListByUser } from "@/api/system/userlist.js"; import { getListByUser } from "@/api/system/userlist.js";
import stationAcatar from "../stationAvatar/index.vue"; import stationAcatar from "../stationAvatar/index.vue";
import baseurl from '@/api/baseurl'
export default { export default {
components: { stationAcatar }, components: { stationAcatar },
name: "Person", name: "Person",
@ -46,7 +45,7 @@ export default {
cb(new Error("请输入正确的联系电话")); cb(new Error("请输入正确的联系电话"));
}; };
return { return {
baseurl: null, baseurl: process.env.VUE_APP_BASE_API,
//男女选择 //男女选择
sexs: [{ sexs: [{
label: "男", label: "男",
@ -214,7 +213,6 @@ export default {
}; };
}, },
created() { created() {
this.baseurl = baseurl
this.getList(); this.getList();
}, },
methods: { methods: {
@ -517,19 +515,19 @@ export default {
if (this.form.id != null) { if (this.form.id != null) {
updatePerson(this.form).then((response) => { updatePerson(this.form).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
} }
}); });
} else { } else {
addPerson(this.form).then((response) => { addPerson(this.form).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.nurseStationName = "请选择所属护理站"; this.nurseStationName = "请选择所属护理站";
this.departmentName = "请选择所属科室"; this.departmentName = "请选择所属科室";
} }
}); });
} }

View File

@ -493,7 +493,6 @@
</template> </template>
<script> <script>
import baseurl from "@/api/baseurl.js";
import { import {
listPoser, listPoser,
getPoser, getPoser,
@ -573,9 +572,7 @@ export default {
}, },
// //
form: { form: {
nurseStationId: null,
nurseTypeId: null, nurseTypeId: null,
nurseItemName: "",
nurseItemContent: "", nurseItemContent: "",
advanceAppointDuration: "", advanceAppointDuration: "",
itemPictureUrl: "", itemPictureUrl: "",
@ -655,7 +652,8 @@ export default {
}; };
}, },
created() { created() {
this.videourl = baseurl + "/system/station/updateNurseStationHeads"; this.videourl =
process.env.VUE_APP_BASE_API + "/system/station/updateNurseStationHeads";
this.getList(); this.getList();
this.nurseItemlistInfo(); this.nurseItemlistInfo();
this.PosterImageJump(); this.PosterImageJump();
@ -824,7 +822,7 @@ export default {
this.objitem.push(imgUrlData.posterPictureUrl); this.objitem.push(imgUrlData.posterPictureUrl);
}, },
imgUrl2(imgUrl) { imgUrl2(imgUrl) {
this.videoForm.showVideoPath = baseurl + imgUrl; this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + imgUrl;
this.form.posterVideoUrl = imgUrl; this.form.posterVideoUrl = imgUrl;
}, },
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */ /** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */

View File

@ -123,7 +123,6 @@
<script> <script>
import { VueCropper } from "vue-cropper"; import { VueCropper } from "vue-cropper";
import baseurl from "@/api/baseurl.js";
import { import {
updateNurseStationHeads, updateNurseStationHeads,
posts, posts,
@ -173,14 +172,14 @@ export default {
} else if (this.tovideo == "") { } else if (this.tovideo == "") {
this.video.VideoPath = null; this.video.VideoPath = null;
} else { } else {
this.video.VideoPath = baseurl + this.tovideo; this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
} }
if (this.img == null) { if (this.img == null) {
this.options.img = null; this.options.img = null;
} else if (this.img == "") { } else if (this.img == "") {
this.options.img = null; this.options.img = null;
} else { } else {
this.options.img = baseurl + this.img; this.options.img = process.env.VUE_APP_BASE_API + this.img;
} }
if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") { if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") {
this.title = "上传视频"; this.title = "上传视频";
@ -204,7 +203,7 @@ export default {
} else if (this.img == "") { } else if (this.img == "") {
this.options.img = null; this.options.img = null;
} else { } else {
this.options.img = baseurl + this.img; this.options.img = process.env.VUE_APP_BASE_API + this.img;
} }
} }
}, },
@ -276,7 +275,7 @@ export default {
this.uploadbtn = false; this.uploadbtn = false;
uploadVideoUrl(formData).then(response => { uploadVideoUrl(formData).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.video.VideoPath = baseurl + response.imgUrl; this.video.VideoPath = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl); this.$emit("imgUrl", response.imgUrl);
this.items.itemDirectoryUrl = response.imgUrl; this.items.itemDirectoryUrl = response.imgUrl;
this.$emit("item", JSON.stringify(this.items)); this.$emit("item", JSON.stringify(this.items));
@ -295,7 +294,7 @@ export default {
) { ) {
uploadUrl(formData).then(response => { uploadUrl(formData).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.options.img = baseurl + response.imgUrl; this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl); this.$emit("imgUrl", response.imgUrl);
this.openimg = false; this.openimg = false;
} else { } else {
@ -307,7 +306,7 @@ export default {
} else if (this.types == "trainingCategoryPictureUrl") { } else if (this.types == "trainingCategoryPictureUrl") {
uploadTrainingCategoryPicture(formData).then(response => { uploadTrainingCategoryPicture(formData).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.options.img = baseurl + response.imgUrl; this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl); this.$emit("imgUrl", response.imgUrl);
this.openimg = false; this.openimg = false;
} else { } else {
@ -319,7 +318,7 @@ export default {
} else if (this.types == "posterVideoUrl") { } else if (this.types == "posterVideoUrl") {
updatePoserHeads(formData).then(response => { updatePoserHeads(formData).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.video.VideoPath = baseurl + response.imgUrl; this.video.VideoPath = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl); this.$emit("imgUrl", response.imgUrl);
this.openimg = false; this.openimg = false;
} else { } else {
@ -331,7 +330,7 @@ export default {
} else { } else {
updateNurseStationHeads(formData).then(response => { updateNurseStationHeads(formData).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.options.img = baseurl + response.imgUrl; this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl); this.$emit("imgUrl", response.imgUrl);
if (this.types == "attributePitureUrl") { if (this.types == "attributePitureUrl") {
this.items.attributePitureUrl = response.imgUrl; this.items.attributePitureUrl = response.imgUrl;

View File

@ -73,7 +73,6 @@
<script> <script>
import { VueCropper } from "vue-cropper"; import { VueCropper } from "vue-cropper";
import baseurl from "@/api/baseurl.js";
import { uploadVideoUrl } from "@/api/system/stationAvatar.js"; import { uploadVideoUrl } from "@/api/system/stationAvatar.js";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
export default { export default {
@ -114,7 +113,7 @@ export default {
video: { video: {
VideoPath: null // VideoPath: null //
}, },
uploadurl: null uploadurl: undefined
}; };
}, },
created() { created() {
@ -123,16 +122,16 @@ export default {
this.uploadbtn = true; this.uploadbtn = true;
this.filedata.type = this.type; this.filedata.type = this.type;
this.items = this.item; this.items = this.item;
this.videoForm.showVideoPath = baseurl + this.tovideo; this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
this.video.VideoPath = baseurl + this.tovideo; this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
this.title = "上传视频"; this.title = "上传视频";
}, },
watch: { watch: {
tovideo: { tovideo: {
handler(newimg, oldimg) { handler(newimg, oldimg) {
this.uploadbtn = true; this.uploadbtn = true;
this.videoForm.showVideoPath = baseurl + this.tovideo; this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
this.video.VideoPath = baseurl + this.tovideo; this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
} }
}, },
item: { item: {
@ -206,7 +205,7 @@ export default {
}; };
}, },
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
this.video.VideoPath = baseurl + res.imgUrl; this.video.VideoPath = process.env.VUE_APP_BASE_API + res.imgUrl;
this.items.itemDirectoryUrl = res.imgUrl; this.items.itemDirectoryUrl = res.imgUrl;
this.$emit("item", JSON.stringify(this.items)); this.$emit("item", JSON.stringify(this.items));
this.$modal.msgSuccess("上传视频成功"); this.$modal.msgSuccess("上传视频成功");
@ -224,7 +223,7 @@ export default {
this.uploadbtn = false; this.uploadbtn = false;
uploadVideoUrl(formData).then(response => { uploadVideoUrl(formData).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.video.VideoPath = baseurl + response.imgUrl; this.video.VideoPath = process.env.VUE_APP_BASE_API + response.imgUrl;
this.items.itemDirectoryUrl = response.imgUrl; this.items.itemDirectoryUrl = response.imgUrl;
this.$emit("item", JSON.stringify(this.items)); this.$emit("item", JSON.stringify(this.items));
this.openimg = false; this.openimg = false;

View File

@ -536,7 +536,6 @@ import {
addTrainingOrder, addTrainingOrder,
updateTrainingOrder, updateTrainingOrder,
} from "@/api/system/trainingOrder"; } from "@/api/system/trainingOrder";
import baseurl from "@/api/baseurl.js";
import stationAcatar from "../stationAvatar/index.vue"; import stationAcatar from "../stationAvatar/index.vue";
import editor from "@/components/Editor"; import editor from "@/components/Editor";
import { getListByUser } from "@/api/system/userlist.js"; import { getListByUser } from "@/api/system/userlist.js";
@ -545,7 +544,7 @@ export default {
components: { stationAcatar, editor }, components: { stationAcatar, editor },
data() { data() {
return { return {
baseurl: null, baseurl: process.env.VUE_APP_BASE_API,
trainingOrderStatusoptions: [ trainingOrderStatusoptions: [
{ {
value: "WAIT_PAY", value: "WAIT_PAY",
@ -658,7 +657,6 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.baseurl = baseurl;
}, },
methods: { methods: {
// //