修改提交
This commit is contained in:
parent
8748a0ef62
commit
de0bddb2a4
@ -14,7 +14,6 @@ import {
|
||||
} from "@/api/system/goodsCategory";
|
||||
import editor from "@/components/Editor";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
let id = 0;
|
||||
|
||||
export default {
|
||||
@ -455,10 +454,10 @@ export default {
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
++this.isResouceShow
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
++this.isResouceShow
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -468,11 +467,11 @@ export default {
|
||||
// this.nurseStationId=this.form.nurseStationId
|
||||
addGoodsInfo(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.StationName = "请选择所属护理站";
|
||||
++this.isResouceShow
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.StationName = "请选择所属护理站";
|
||||
++this.isResouceShow
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -542,4 +541,4 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -12,7 +12,7 @@
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div> -->
|
||||
</div>-->
|
||||
<div class="head-container" style="height: 580px; width: 100%">
|
||||
<el-tree
|
||||
node-key="id"
|
||||
@ -58,18 +58,10 @@
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button type="primary" 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>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@ -81,8 +73,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:goodsCategory:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -93,8 +84,7 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:goodsCategory:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -105,8 +95,7 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:goodsCategory:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
@ -118,11 +107,8 @@
|
||||
v-hasPermi="['system:goodsCategory:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@ -137,11 +123,7 @@
|
||||
align="center"
|
||||
prop="goodsCategoryName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="商品分类编码"
|
||||
align="center"
|
||||
prop="goodsCategoryCode"
|
||||
/>
|
||||
<el-table-column label="商品分类编码" align="center" prop="goodsCategoryCode" />
|
||||
<!-- <el-table-column label="商品分类图片地址" align="center" prop="goodsCategoryPicture" /> -->
|
||||
<el-table-column
|
||||
label="分类概述"
|
||||
@ -150,11 +132,7 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="显示顺序" align="center" prop="sort" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -162,16 +140,14 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:goodsCategory:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:goodsCategory:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -204,21 +180,16 @@
|
||||
ref="cascader"
|
||||
:placeholder="form.parentName ? form.parentName : '商品主分类'"
|
||||
:key="isResouceShow"
|
||||
>
|
||||
</el-cascader>
|
||||
></el-cascader>
|
||||
<!-- <el-input
|
||||
v-model="form.parentName"
|
||||
placeholder="请输入父级分类名称"
|
||||
maxlength="10"
|
||||
disabled
|
||||
/> -->
|
||||
/>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-input
|
||||
v-model="form.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
maxlength="10"
|
||||
/>
|
||||
<el-input v-model="form.goodsCategoryName" placeholder="请输入商品分类名称" maxlength="10" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="商品分类编码" prop="goodsCategoryCode">
|
||||
<el-input
|
||||
@ -226,7 +197,7 @@
|
||||
placeholder="请输入商品分类编码"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<el-form-item label="商品分类图片" prop="goodsCategoryPicture">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
@ -236,11 +207,7 @@
|
||||
<!-- <img :src="form.goodsCategoryPicture" alt="" /> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="分类概述" prop="categoryRemark">
|
||||
<el-input
|
||||
v-model="form.categoryRemark"
|
||||
placeholder="请输入分类概述"
|
||||
maxlength="300"
|
||||
/>
|
||||
<el-input v-model="form.categoryRemark" placeholder="请输入分类概述" maxlength="300" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="sort">
|
||||
<el-input
|
||||
@ -267,10 +234,9 @@ import {
|
||||
updatePicture,
|
||||
addGoodsCategory,
|
||||
updateGoodsCategory,
|
||||
getStationCategoryList,
|
||||
getStationCategoryList
|
||||
} from "@/api/system/goodsCategory";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import baseurl from "@/api/baseurl";
|
||||
let id = 0;
|
||||
export default {
|
||||
name: "GoodsCategory",
|
||||
@ -285,16 +251,16 @@ export default {
|
||||
const id = node.level === 0 ? 0 : node.data.id;
|
||||
setTimeout(() => {
|
||||
if (id == 9999999) {
|
||||
getStationCategoryList(0).then((res) => {
|
||||
getStationCategoryList(0).then(res => {
|
||||
// 接口请求
|
||||
res.data.forEach((e) => {
|
||||
res.data.forEach(e => {
|
||||
e.value = e.id;
|
||||
e.label = e.goodsCategoryName;
|
||||
});
|
||||
resolve(
|
||||
res.data.map((item) => {
|
||||
res.data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
...item
|
||||
};
|
||||
})
|
||||
);
|
||||
@ -304,37 +270,37 @@ export default {
|
||||
{
|
||||
label: "商品主分类",
|
||||
children: [],
|
||||
id: 9999999,
|
||||
},
|
||||
id: 9999999
|
||||
}
|
||||
];
|
||||
resolve(
|
||||
data.map((item) => {
|
||||
data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
...item
|
||||
};
|
||||
})
|
||||
);
|
||||
} else {
|
||||
getStationCategoryList(id).then((res) => {
|
||||
getStationCategoryList(id).then(res => {
|
||||
// 接口请求
|
||||
res.data.forEach((e) => {
|
||||
res.data.forEach(e => {
|
||||
e.value = e.id;
|
||||
e.label = e.goodsCategoryName;
|
||||
});
|
||||
resolve(
|
||||
res.data.map((item) => {
|
||||
res.data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
...item
|
||||
};
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
}, 300);
|
||||
},
|
||||
}
|
||||
},
|
||||
imgone: "",
|
||||
baseurl: "",
|
||||
baseurl: process.env.VUE_APP_BASE_API,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -363,47 +329,44 @@ export default {
|
||||
categoryRemark: null,
|
||||
sort: null,
|
||||
parentId: "",
|
||||
parentName: "",
|
||||
parentName: ""
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
goodsCategoryName: null,
|
||||
goodsCategoryPicture: null,
|
||||
categoryRemark: null,
|
||||
sort: null,
|
||||
sort: null
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
goodsCategoryName: [
|
||||
{ required: true, message: "商品分类名称不能为空", trigger: "blur" },
|
||||
{ required: true, message: "商品分类名称不能为空", trigger: "blur" }
|
||||
],
|
||||
goodsCategoryCode: [
|
||||
{ required: true, message: "商品分类编码不能为空", trigger: "blur" },
|
||||
{ required: true, message: "商品分类编码不能为空", trigger: "blur" }
|
||||
],
|
||||
goodsCategoryPicture: [
|
||||
{ required: true, message: "商品分类图片不能为空", trigger: "blur" },
|
||||
{ required: true, message: "商品分类图片不能为空", trigger: "blur" }
|
||||
],
|
||||
categoryRemark: [
|
||||
{ required: true, message: "分类概述不能为空", trigger: "blur" },
|
||||
],
|
||||
sort: [
|
||||
{ required: true, message: "显示顺序不能为空", trigger: "blur" },
|
||||
{ required: true, message: "分类概述不能为空", trigger: "blur" }
|
||||
],
|
||||
sort: [{ required: true, message: "显示顺序不能为空", trigger: "blur" }]
|
||||
},
|
||||
// 树选项
|
||||
deptOptions: undefined,
|
||||
categoryLevel: null,
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "goodsCategoryName",
|
||||
},
|
||||
label: "goodsCategoryName"
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
watch: {},
|
||||
|
||||
created() {
|
||||
this.baseurl = baseurl;
|
||||
this.getList();
|
||||
this.info();
|
||||
},
|
||||
@ -426,12 +389,12 @@ export default {
|
||||
// this.categoryLevel = data.categoryLevel;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
getStationCategoryList(data.id).then((res) => {
|
||||
res.data.forEach((e) => {
|
||||
getStationCategoryList(data.id).then(res => {
|
||||
res.data.forEach(e => {
|
||||
e.children = [
|
||||
{
|
||||
goodsCategoryName: "",
|
||||
},
|
||||
goodsCategoryName: ""
|
||||
}
|
||||
];
|
||||
});
|
||||
this.loading = false;
|
||||
@ -441,20 +404,20 @@ export default {
|
||||
/** 查询商品分类信息列表 */
|
||||
info() {
|
||||
this.loading = true;
|
||||
getStationCategoryList(0).then((res) => {
|
||||
res.data.forEach((e) => {
|
||||
getStationCategoryList(0).then(res => {
|
||||
res.data.forEach(e => {
|
||||
e.children = [
|
||||
{
|
||||
goodsCategoryName: "",
|
||||
},
|
||||
goodsCategoryName: ""
|
||||
}
|
||||
];
|
||||
});
|
||||
var obj = [
|
||||
{
|
||||
goodsCategoryName: "商品主分类",
|
||||
children: res.data,
|
||||
id: 0,
|
||||
},
|
||||
id: 0
|
||||
}
|
||||
];
|
||||
this.deptOptions = obj;
|
||||
this.loading = false;
|
||||
@ -462,7 +425,7 @@ export default {
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGoodsCategory(this.queryParams).then((response) => {
|
||||
listGoodsCategory(this.queryParams).then(response => {
|
||||
this.goodsCategoryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -478,7 +441,7 @@ export default {
|
||||
}
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then(res => {});
|
||||
}
|
||||
this.open = false;
|
||||
this.reset();
|
||||
@ -522,14 +485,14 @@ export default {
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 10
|
||||
};
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
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;
|
||||
},
|
||||
@ -546,7 +509,7 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getGoodsCategory(id).then((response) => {
|
||||
getGoodsCategory(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.imgone = this.form.goodsCategoryPicture;
|
||||
this.open = true;
|
||||
@ -555,33 +518,33 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateGoodsCategory(this.form).then((response) => {
|
||||
updateGoodsCategory(this.form).then(response => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone != this.form.goodsCategoryPicture) {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then(res => {});
|
||||
}
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
++this.isResouceShow;
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.info();
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
++this.isResouceShow;
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.info();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addGoodsCategory(this.form).then((response) => {
|
||||
addGoodsCategory(this.form).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
++this.isResouceShow;
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.info();
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
++this.isResouceShow;
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.info();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -593,14 +556,14 @@ export default {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除?")
|
||||
.then(function () {
|
||||
.then(function() {
|
||||
return delGoodsCategory(ids);
|
||||
})
|
||||
.then(() => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.goodsCategoryPicture);
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then(res => {});
|
||||
}
|
||||
this.getList();
|
||||
this.info();
|
||||
@ -613,15 +576,15 @@ export default {
|
||||
this.download(
|
||||
"system/goodsCategory/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
...this.queryParams
|
||||
},
|
||||
`goodsCategory_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
this.form.goodsCategoryPicture = imgUrl;
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
class="user-info-head"
|
||||
@click="editCropper()"
|
||||
style="width: 100px; height: 100px"
|
||||
>
|
||||
<div class="user-info-head" @click="editCropper()" style="width: 100px; height: 100px">
|
||||
<img
|
||||
v-if="options.img"
|
||||
v-bind:src="options.img"
|
||||
@ -67,37 +63,19 @@
|
||||
</el-upload>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 1, offset: 2 }" :md="2">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@click="changeScale(1)"
|
||||
></el-button>
|
||||
<el-button icon="el-icon-plus" size="small" @click="changeScale(1)"></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 1, offset: 1 }" :md="2">
|
||||
<el-button
|
||||
icon="el-icon-minus"
|
||||
size="small"
|
||||
@click="changeScale(-1)"
|
||||
></el-button>
|
||||
<el-button icon="el-icon-minus" size="small" @click="changeScale(-1)"></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 1, offset: 1 }" :md="2">
|
||||
<el-button
|
||||
icon="el-icon-refresh-left"
|
||||
size="small"
|
||||
@click="rotateLeft()"
|
||||
></el-button>
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="rotateLeft()"></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 1, offset: 1 }" :md="2">
|
||||
<el-button
|
||||
icon="el-icon-refresh-right"
|
||||
size="small"
|
||||
@click="rotateRight()"
|
||||
></el-button>
|
||||
<el-button icon="el-icon-refresh-right" size="small" @click="rotateRight()"></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 2, offset: 6 }" :md="2">
|
||||
<el-button type="primary" size="small" @click="uploadImg()"
|
||||
>提 交</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" @click="uploadImg()">提 交</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
@ -106,21 +84,18 @@
|
||||
|
||||
<script>
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js";
|
||||
|
||||
export default {
|
||||
components: { VueCropper },
|
||||
|
||||
props: {
|
||||
img: {
|
||||
inputName: String,
|
||||
required: true,
|
||||
required: true
|
||||
},
|
||||
type: {
|
||||
inputName: String,
|
||||
required: true,
|
||||
},
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -137,9 +112,9 @@ export default {
|
||||
autoCrop: true, // 是否默认生成截图框
|
||||
autoCropWidth: 200, // 默认生成截图框宽度
|
||||
autoCropHeight: 200, // 默认生成截图框高度
|
||||
fixedBox: true, // 固定截图框大小 不允许改变
|
||||
fixedBox: true // 固定截图框大小 不允许改变
|
||||
},
|
||||
previews: {},
|
||||
previews: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -149,7 +124,7 @@ export default {
|
||||
} else if (this.img == "") {
|
||||
this.options.img = null;
|
||||
} else {
|
||||
this.options.img = baseurl + this.img;
|
||||
this.options.img = process.env.VUE_APP_BASE_API + this.img;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -160,15 +135,15 @@ export default {
|
||||
} else if (this.img == "") {
|
||||
this.options.img = null;
|
||||
} else {
|
||||
this.options.img = baseurl + this.img;
|
||||
this.options.img = process.env.VUE_APP_BASE_API + this.img;
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
type: {
|
||||
handler(newimg, oldimg) {
|
||||
this.types = this.type;
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 编辑头像
|
||||
@ -210,12 +185,12 @@ export default {
|
||||
},
|
||||
// 上传图片
|
||||
uploadImg() {
|
||||
this.$refs.cropper.getCropBlob((data) => {
|
||||
this.$refs.cropper.getCropBlob(data => {
|
||||
let formData = new FormData();
|
||||
formData.append("file", data);
|
||||
formData.append("type", this.types);
|
||||
updateNurseStationHeads(formData).then((response) => {
|
||||
this.options.img = baseurl + response.imgUrl;
|
||||
updateNurseStationHeads(formData).then(response => {
|
||||
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
|
||||
this.$emit("imgUrl", response.imgUrl);
|
||||
this.openimg = false;
|
||||
});
|
||||
@ -229,8 +204,8 @@ export default {
|
||||
closeDialog() {
|
||||
this.imgs = "";
|
||||
this.visible = false;
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -11,7 +11,6 @@ import {
|
||||
import editor from "@/components/Editor";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
|
||||
export default {
|
||||
components: { stationAcatar, editor },
|
||||
@ -51,22 +50,22 @@ export default {
|
||||
nursetotal: 0,
|
||||
nurseStationId: null,
|
||||
goods: [{
|
||||
value: "BUSINESS",
|
||||
label: "买卖",
|
||||
},
|
||||
{
|
||||
value: "LEASE",
|
||||
label: "租赁",
|
||||
},
|
||||
value: "BUSINESS",
|
||||
label: "买卖",
|
||||
},
|
||||
{
|
||||
value: "LEASE",
|
||||
label: "租赁",
|
||||
},
|
||||
],
|
||||
options: [{
|
||||
value: 0,
|
||||
label: "否",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "是",
|
||||
},
|
||||
value: 0,
|
||||
label: "否",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "是",
|
||||
},
|
||||
],
|
||||
goodDetailsLists: [],
|
||||
idd: 9999999,
|
||||
@ -96,11 +95,6 @@ export default {
|
||||
sort: null,
|
||||
// mame:null,
|
||||
},
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseStationName: "",
|
||||
@ -218,7 +212,7 @@ export default {
|
||||
obj.pictureUrlList.push(this.form.goodsPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => { });
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
this.open = false;
|
||||
this.reset();
|
||||
@ -230,8 +224,8 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
},],
|
||||
},];
|
||||
}, ],
|
||||
}, ];
|
||||
},
|
||||
//护理站页面选择护理站
|
||||
nurseclick(item) {
|
||||
@ -294,7 +288,7 @@ export default {
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
idd: 9999999,
|
||||
},];
|
||||
}, ];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -330,7 +324,7 @@ export default {
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
idd: 9999999,
|
||||
},];
|
||||
}, ];
|
||||
this.open = true;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
@ -362,21 +356,21 @@ export default {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => { });
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// this.nurseStationId=this.form.nurseStationId
|
||||
addGoodsInfo(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -386,25 +380,25 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.goodsPictureUrl);
|
||||
updatePicture(obj).then((res) => { });
|
||||
updatePicture(obj).then((res) => {});
|
||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
this.form.goodsPictureUrl = imgUrl;
|
||||
},
|
||||
attributePitureUrl(imgUrl) { },
|
||||
attributePitureUrl(imgUrl) {},
|
||||
attributePitureitem(item) {
|
||||
let items = JSON.parse(item);
|
||||
if (items.idd && !items.attributeDetailsId) {
|
||||
|
||||
@ -11,12 +11,11 @@ import {
|
||||
weChatRefundOrderApply,
|
||||
} from "@/api/system/goodsOrder";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
name: "GoodsOrder",
|
||||
data() {
|
||||
return {
|
||||
baseurl: null,
|
||||
baseurl: process.env.VUE_APP_BASE_API,
|
||||
// 查看商品信息
|
||||
innerorder: false,
|
||||
// 查看物流信息
|
||||
@ -135,7 +134,6 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.baseurl = baseurl
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
@ -389,17 +387,17 @@ export default {
|
||||
if (this.form.id != null) {
|
||||
updateGoodsOrder(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addGoodsOrder(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -9,13 +9,12 @@ import {
|
||||
getPersonInfo
|
||||
} from "@/api/system/order";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
name: "order",
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
baseurl: null,
|
||||
baseurl: process.env.VUE_APP_BASE_API,
|
||||
orderStatuslist: [{
|
||||
value: "WAIT_PAY",
|
||||
label: "待付款",
|
||||
@ -115,7 +114,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.baseurl = baseurl
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
@ -12,7 +12,6 @@ import {
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import baseurl from '@/api/baseurl'
|
||||
export default {
|
||||
components: { stationAcatar },
|
||||
name: "Person",
|
||||
@ -46,7 +45,7 @@ export default {
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
return {
|
||||
baseurl: null,
|
||||
baseurl: process.env.VUE_APP_BASE_API,
|
||||
//男女选择
|
||||
sexs: [{
|
||||
label: "男",
|
||||
@ -214,7 +213,6 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.baseurl = baseurl
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
@ -517,19 +515,19 @@ export default {
|
||||
if (this.form.id != null) {
|
||||
updatePerson(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addPerson(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.nurseStationName = "请选择所属护理站";
|
||||
this.departmentName = "请选择所属科室";
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.nurseStationName = "请选择所属护理站";
|
||||
this.departmentName = "请选择所属科室";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -493,7 +493,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import {
|
||||
listPoser,
|
||||
getPoser,
|
||||
@ -573,9 +572,7 @@ export default {
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseStationId: null,
|
||||
nurseTypeId: null,
|
||||
nurseItemName: "",
|
||||
nurseItemContent: "",
|
||||
advanceAppointDuration: "",
|
||||
itemPictureUrl: "",
|
||||
@ -655,7 +652,8 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.videourl = baseurl + "/system/station/updateNurseStationHeads";
|
||||
this.videourl =
|
||||
process.env.VUE_APP_BASE_API + "/system/station/updateNurseStationHeads";
|
||||
this.getList();
|
||||
this.nurseItemlistInfo();
|
||||
this.PosterImageJump();
|
||||
@ -824,7 +822,7 @@ export default {
|
||||
this.objitem.push(imgUrlData.posterPictureUrl);
|
||||
},
|
||||
imgUrl2(imgUrl) {
|
||||
this.videoForm.showVideoPath = baseurl + imgUrl;
|
||||
this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + imgUrl;
|
||||
this.form.posterVideoUrl = imgUrl;
|
||||
},
|
||||
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
|
||||
|
||||
@ -123,7 +123,6 @@
|
||||
|
||||
<script>
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import {
|
||||
updateNurseStationHeads,
|
||||
posts,
|
||||
@ -173,14 +172,14 @@ export default {
|
||||
} else if (this.tovideo == "") {
|
||||
this.video.VideoPath = null;
|
||||
} else {
|
||||
this.video.VideoPath = baseurl + this.tovideo;
|
||||
this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
|
||||
}
|
||||
if (this.img == null) {
|
||||
this.options.img = null;
|
||||
} else if (this.img == "") {
|
||||
this.options.img = null;
|
||||
} 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") {
|
||||
this.title = "上传视频";
|
||||
@ -204,7 +203,7 @@ export default {
|
||||
} else if (this.img == "") {
|
||||
this.options.img = null;
|
||||
} 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;
|
||||
uploadVideoUrl(formData).then(response => {
|
||||
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.items.itemDirectoryUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
@ -295,7 +294,7 @@ export default {
|
||||
) {
|
||||
uploadUrl(formData).then(response => {
|
||||
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.openimg = false;
|
||||
} else {
|
||||
@ -307,7 +306,7 @@ export default {
|
||||
} else if (this.types == "trainingCategoryPictureUrl") {
|
||||
uploadTrainingCategoryPicture(formData).then(response => {
|
||||
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.openimg = false;
|
||||
} else {
|
||||
@ -319,7 +318,7 @@ export default {
|
||||
} else if (this.types == "posterVideoUrl") {
|
||||
updatePoserHeads(formData).then(response => {
|
||||
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.openimg = false;
|
||||
} else {
|
||||
@ -331,7 +330,7 @@ export default {
|
||||
} else {
|
||||
updateNurseStationHeads(formData).then(response => {
|
||||
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);
|
||||
if (this.types == "attributePitureUrl") {
|
||||
this.items.attributePitureUrl = response.imgUrl;
|
||||
|
||||
@ -73,7 +73,6 @@
|
||||
|
||||
<script>
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import { uploadVideoUrl } from "@/api/system/stationAvatar.js";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
@ -114,7 +113,7 @@ export default {
|
||||
video: {
|
||||
VideoPath: null //回显的变量
|
||||
},
|
||||
uploadurl: null
|
||||
uploadurl: undefined
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -123,16 +122,16 @@ export default {
|
||||
this.uploadbtn = true;
|
||||
this.filedata.type = this.type;
|
||||
this.items = this.item;
|
||||
this.videoForm.showVideoPath = baseurl + this.tovideo;
|
||||
this.video.VideoPath = baseurl + this.tovideo;
|
||||
this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
|
||||
this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
|
||||
this.title = "上传视频";
|
||||
},
|
||||
watch: {
|
||||
tovideo: {
|
||||
handler(newimg, oldimg) {
|
||||
this.uploadbtn = true;
|
||||
this.videoForm.showVideoPath = baseurl + this.tovideo;
|
||||
this.video.VideoPath = baseurl + this.tovideo;
|
||||
this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
|
||||
this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
|
||||
}
|
||||
},
|
||||
item: {
|
||||
@ -206,7 +205,7 @@ export default {
|
||||
};
|
||||
},
|
||||
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.$emit("item", JSON.stringify(this.items));
|
||||
this.$modal.msgSuccess("上传视频成功");
|
||||
@ -224,7 +223,7 @@ export default {
|
||||
this.uploadbtn = false;
|
||||
uploadVideoUrl(formData).then(response => {
|
||||
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.$emit("item", JSON.stringify(this.items));
|
||||
this.openimg = false;
|
||||
|
||||
@ -536,7 +536,6 @@ import {
|
||||
addTrainingOrder,
|
||||
updateTrainingOrder,
|
||||
} from "@/api/system/trainingOrder";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import editor from "@/components/Editor";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
@ -545,7 +544,7 @@ export default {
|
||||
components: { stationAcatar, editor },
|
||||
data() {
|
||||
return {
|
||||
baseurl: null,
|
||||
baseurl: process.env.VUE_APP_BASE_API,
|
||||
trainingOrderStatusoptions: [
|
||||
{
|
||||
value: "WAIT_PAY",
|
||||
@ -658,7 +657,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.baseurl = baseurl;
|
||||
},
|
||||
methods: {
|
||||
//页面所属护理站
|
||||
|
||||
Loading…
Reference in New Issue
Block a user