Merge remote-tracking branch 'origin/dev'
# Conflicts: # .env.production # src/api/baseurl.js
This commit is contained in:
commit
ed07f298ad
@ -8,5 +8,6 @@ ENV = 'development'
|
|||||||
# VUE_APP_BASE_API = '/dev-api'
|
# VUE_APP_BASE_API = '/dev-api'
|
||||||
VUE_APP_BASE_API = 'https://quanyidaojia.xinelu.cn'
|
VUE_APP_BASE_API = 'https://quanyidaojia.xinelu.cn'
|
||||||
|
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
var baseurl = "https://quanyidaojia.xinelu.cn";
|
|
||||||
|
|
||||||
export default baseurl
|
|
||||||
@ -28,7 +28,6 @@ export function appointmentOrderDetails(id) {
|
|||||||
// 确定按钮
|
// 确定按钮
|
||||||
export function xylWeChatRefundNotify(data) {
|
export function xylWeChatRefundNotify(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
||||||
url: '/nurseApp/weChatPayment/weChatRefundOrderApply',
|
url: '/nurseApp/weChatPayment/weChatRefundOrderApply',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
|
|||||||
@ -17,6 +17,28 @@ export function updatePoserHeads(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function uploadVideoUrl(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingItem/uploadVideoUrl',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function uploadUrl(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingItem/uploadUrl',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function uploadTrainingCategoryPicture(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingCategory/uploadTrainingCategoryPicture',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function posts(data) {
|
export function posts(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
44
src/api/system/trainingCategory.js
Normal file
44
src/api/system/trainingCategory.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询学习培训分类列表
|
||||||
|
export function listTrainingCategory(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingCategory/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询学习培训分类详细
|
||||||
|
export function getTrainingCategory(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingCategory/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增学习培训分类
|
||||||
|
export function addTrainingCategory(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingCategory/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改学习培训分类
|
||||||
|
export function updateTrainingCategory(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingCategory/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除学习培训分类
|
||||||
|
export function delTrainingCategory(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingCategory/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
68
src/api/system/trainingItem.js
Normal file
68
src/api/system/trainingItem.js
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询学习培训项目信息列表
|
||||||
|
export function listTrainingItem(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingItem/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function listTrainingCategory(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingCategory/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 父级项目组
|
||||||
|
export function selectTrainingParent(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingItem/selectTrainingParent',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改上下架
|
||||||
|
export function updateTrainingShelfFlag(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingItem/updateTrainingShelfFlag',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询学习培训项目信息详细
|
||||||
|
export function getTrainingItem(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingItem/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增学习培训项目信息
|
||||||
|
export function addTrainingItem(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingItem/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改学习培训项目信息
|
||||||
|
export function updateTrainingItem(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingItem/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除学习培训项目信息
|
||||||
|
export function delTrainingItem(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingItem/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
68
src/api/system/trainingOrder.js
Normal file
68
src/api/system/trainingOrder.js
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询学习培训订单主列表
|
||||||
|
export function listTrainingOrder(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingOrder/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查看视频
|
||||||
|
export function orderItemDirectory(id) {
|
||||||
|
return request({
|
||||||
|
url: `/system/trainingOrder/orderItemDirectory?trainingOrderDetailsId=${id}`,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询学习培训订单主详细
|
||||||
|
export function getTrainingOrder(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingOrder/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 确定按钮
|
||||||
|
export function xylWeChatRefundNotify(data) {
|
||||||
|
return request({
|
||||||
|
url: '/nurseApp/weChatPayment/weChatRefundOrderApply',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 退款
|
||||||
|
export function refundInformation(id) {
|
||||||
|
return request({
|
||||||
|
url: `/system/trainingOrder/refundInformation` + `?id=${id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 新增学习培训订单主
|
||||||
|
export function addTrainingOrder(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingOrder/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改学习培训订单主
|
||||||
|
export function updateTrainingOrder(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingOrder/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除学习培训订单主
|
||||||
|
export function delTrainingOrder(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/trainingOrder/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -9,6 +9,7 @@
|
|||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
style="display: none"
|
style="display: none"
|
||||||
|
:data="filetype"
|
||||||
ref="upload"
|
ref="upload"
|
||||||
v-if="this.type == 'url'"
|
v-if="this.type == 'url'"
|
||||||
></el-upload>
|
></el-upload>
|
||||||
@ -29,39 +30,47 @@ export default {
|
|||||||
/* 编辑器的内容 */
|
/* 编辑器的内容 */
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ""
|
default: "",
|
||||||
},
|
},
|
||||||
/* 高度 */
|
/* 高度 */
|
||||||
height: {
|
height: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null
|
default: null,
|
||||||
},
|
},
|
||||||
/* 最小高度 */
|
/* 最小高度 */
|
||||||
minHeight: {
|
minHeight: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null
|
default: null,
|
||||||
},
|
},
|
||||||
/* 只读 */
|
/* 只读 */
|
||||||
readOnly: {
|
readOnly: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
// 上传文件大小限制(MB)
|
// 上传文件大小限制(MB)
|
||||||
fileSize: {
|
fileSize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 5
|
default: 5,
|
||||||
},
|
},
|
||||||
/* 类型(base64格式、url格式) */
|
/* 类型(base64格式、url格式) */
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "url"
|
default: "url",
|
||||||
}
|
},
|
||||||
|
url: {
|
||||||
|
type: String,
|
||||||
|
default: "/common/richTextPictureUrl",
|
||||||
|
},
|
||||||
|
// filetypes: {
|
||||||
|
// type: String,
|
||||||
|
// default: "",
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
uploadUrl: process.env.VUE_APP_BASE_API + "/common/richTextPictureUrl", // 上传的图片服务器地址
|
uploadUrl: process.env.VUE_APP_BASE_API, // 上传的图片服务器地址
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: "Bearer " + getToken()
|
Authorization: "Bearer " + getToken(),
|
||||||
},
|
},
|
||||||
Quill: null,
|
Quill: null,
|
||||||
currentValue: "",
|
currentValue: "",
|
||||||
@ -81,14 +90,22 @@ export default {
|
|||||||
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
||||||
[{ align: [] }], // 对齐方式
|
[{ align: [] }], // 对齐方式
|
||||||
["clean"], // 清除文本格式
|
["clean"], // 清除文本格式
|
||||||
["link", "image"] // 链接、图片、视频
|
["link", "image"], // 链接、图片、视频
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
placeholder: "请输入内容",
|
placeholder: "请输入内容",
|
||||||
readOnly: this.readOnly
|
readOnly: this.readOnly,
|
||||||
}
|
},
|
||||||
|
filetype: {
|
||||||
|
type: "",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.uploadUrl = process.env.VUE_APP_BASE_API + this.url;
|
||||||
|
// console.log(this.url)
|
||||||
|
// this.filetype.type = this.filetypes;
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
styles() {
|
styles() {
|
||||||
let style = {};
|
let style = {};
|
||||||
@ -99,7 +116,7 @@ export default {
|
|||||||
style.height = `${this.height}px`;
|
style.height = `${this.height}px`;
|
||||||
}
|
}
|
||||||
return style;
|
return style;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value: {
|
value: {
|
||||||
@ -111,8 +128,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
@ -127,7 +144,7 @@ export default {
|
|||||||
// 如果设置了上传地址则自定义图片上传事件
|
// 如果设置了上传地址则自定义图片上传事件
|
||||||
if (this.type == "url") {
|
if (this.type == "url") {
|
||||||
let toolbar = this.Quill.getModule("toolbar");
|
let toolbar = this.Quill.getModule("toolbar");
|
||||||
toolbar.addHandler("image", value => {
|
toolbar.addHandler("image", (value) => {
|
||||||
this.uploadType = "image";
|
this.uploadType = "image";
|
||||||
if (value) {
|
if (value) {
|
||||||
this.$refs.upload.$children[0].$refs.input.click();
|
this.$refs.upload.$children[0].$refs.input.click();
|
||||||
@ -180,6 +197,7 @@ export default {
|
|||||||
"image",
|
"image",
|
||||||
process.env.VUE_APP_BASE_API + res.fileName
|
process.env.VUE_APP_BASE_API + res.fileName
|
||||||
);
|
);
|
||||||
|
console.log(res);
|
||||||
this.$emit("imgs", res.fileName);
|
this.$emit("imgs", res.fileName);
|
||||||
// 调整光标到最后
|
// 调整光标到最后
|
||||||
quill.setSelection(length + 1);
|
quill.setSelection(length + 1);
|
||||||
@ -189,8 +207,8 @@ export default {
|
|||||||
},
|
},
|
||||||
handleUploadError() {
|
handleUploadError() {
|
||||||
this.$message.error("图片插入失败");
|
this.$message.error("图片插入失败");
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -97,7 +97,7 @@ service.interceptors.response.use(res => {
|
|||||||
message: msg,
|
message: msg,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return Promise.reject(new Error(msg))
|
return res.data & Promise.reject(new Error(msg))
|
||||||
} else if (code === 600) {
|
} else if (code === 600) {
|
||||||
return Promise.reject(new Error(msg))
|
return Promise.reject(new Error(msg))
|
||||||
} else if (code !== 200) {
|
} else if (code !== 200) {
|
||||||
|
|||||||
@ -507,19 +507,21 @@ 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) {
|
||||||
updateInformationCategory(this.form).then((response) => {
|
updateInformationCategory(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
addInformationCategory(this.form).then((response) => {
|
addInformationCategory(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.addopen = false;
|
this.addopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 {
|
||||||
@ -187,6 +186,7 @@ export default {
|
|||||||
whetherShelf: 1,
|
whetherShelf: 1,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
console.log(obj)
|
||||||
editGoodsWhetherShelf(obj).then((res) => {
|
editGoodsWhetherShelf(obj).then((res) => {
|
||||||
if (obj.whetherShelf == 0) {
|
if (obj.whetherShelf == 0) {
|
||||||
this.$modal.msgSuccess("已修改上架状态为未上架");
|
this.$modal.msgSuccess("已修改上架状态为未上架");
|
||||||
@ -453,10 +453,12 @@ export default {
|
|||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {});
|
updatePicture(obj).then((res) => {});
|
||||||
}
|
}
|
||||||
|
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 {
|
||||||
this.form.goodDetailsLists.forEach(e => {
|
this.form.goodDetailsLists.forEach(e => {
|
||||||
@ -464,11 +466,13 @@ 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) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.StationName = "请选择所属护理站";
|
this.StationName = "请选择所属护理站";
|
||||||
++this.isResouceShow
|
++this.isResouceShow
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -283,15 +283,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateStationDepartment(this.form).then((response) => {
|
updateStationDepartment(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addStationDepartment(this.form).then((response) => {
|
addStationDepartment(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.addopen = false;
|
this.addopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -337,15 +337,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateAppFileInfo(this.form).then(response => {
|
updateAppFileInfo(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addAppFileInfo(this.form).then(response => {
|
addAppFileInfo(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -564,17 +564,21 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateArea(this.form).then((response) => {
|
updateArea(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addArea(this.form).then((response) => {
|
addArea(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.queryParams.parentCode = this.form.parentCode;
|
this.queryParams.parentCode = this.form.parentCode;
|
||||||
this.queryParams.areaLevel = null;
|
this.queryParams.areaLevel = null;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -596,15 +596,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateCertificate(this.form).then((response) => {
|
updateCertificate(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addCertificate(this.form).then((response) => {
|
addCertificate(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -481,6 +481,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateInfo(this.form).then(response => {
|
updateInfo(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
if (this.form.classifyPictureUrl != this.imgone) {
|
if (this.form.classifyPictureUrl != this.imgone) {
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
@ -489,13 +490,16 @@ export default {
|
|||||||
}
|
}
|
||||||
this.editopen = false;
|
this.editopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
addInfo(this.form).then(response => {
|
addInfo(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -938,18 +938,22 @@ export default {
|
|||||||
|
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateCommunityInfo(this.form).then((response) => {
|
updateCommunityInfo(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open2 = false;
|
this.open2 = false;
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addCommunityInfo(this.form).then((response) => {
|
addCommunityInfo(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.open2 = false;
|
this.open2 = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -302,15 +302,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.configId != undefined) {
|
if (this.form.configId != undefined) {
|
||||||
updateConfig(this.form).then(response => {
|
updateConfig(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addConfig(this.form).then(response => {
|
addConfig(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -593,15 +593,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateCoupon(this.form).then((response) => {
|
updateCoupon(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addCoupon(this.form).then((response) => {
|
addCoupon(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -308,15 +308,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.deptId != undefined) {
|
if (this.form.deptId != undefined) {
|
||||||
updateDept(this.form).then(response => {
|
updateDept(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addDept(this.form).then(response => {
|
addDept(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -419,15 +419,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateDiseaseInfo(this.form).then((response) => {
|
updateDiseaseInfo(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addDiseaseInfo(this.form).then((response) => {
|
addDiseaseInfo(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open2 = false;
|
this.open2 = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,16 +60,8 @@
|
|||||||
/>
|
/>
|
||||||
</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
|
||||||
@ -119,10 +108,7 @@
|
|||||||
>导出</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,8 +180,7 @@
|
|||||||
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="请输入父级分类名称"
|
||||||
@ -214,11 +189,7 @@
|
|||||||
/>-->
|
/>-->
|
||||||
</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
|
||||||
@ -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,30 +518,34 @@ 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) {
|
||||||
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) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
++this.isResouceShow;
|
++this.isResouceShow;
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.info();
|
this.info();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -596,7 +563,7 @@ export default {
|
|||||||
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();
|
||||||
@ -609,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>
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
@ -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 },
|
||||||
@ -96,11 +95,6 @@ export default {
|
|||||||
sort: null,
|
sort: null,
|
||||||
// mame:null,
|
// mame:null,
|
||||||
},
|
},
|
||||||
//权限查询
|
|
||||||
getListByUserquery: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
},
|
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
nurseStationName: "",
|
nurseStationName: "",
|
||||||
@ -364,16 +358,20 @@ export default {
|
|||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {});
|
updatePicture(obj).then((res) => {});
|
||||||
}
|
}
|
||||||
|
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) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -403,7 +401,7 @@ export default {
|
|||||||
attributePitureUrl(imgUrl) {},
|
attributePitureUrl(imgUrl) {},
|
||||||
attributePitureitem(item) {
|
attributePitureitem(item) {
|
||||||
let items = JSON.parse(item);
|
let items = JSON.parse(item);
|
||||||
if (items.idd && !items.id) {
|
if (items.idd && !items.attributeDetailsId) {
|
||||||
this.goodDetailsLists.forEach((e) => {
|
this.goodDetailsLists.forEach((e) => {
|
||||||
if (e.idd == items.idd) {
|
if (e.idd == items.idd) {
|
||||||
e.attributePitureUrl = items.attributePitureUrl;
|
e.attributePitureUrl = items.attributePitureUrl;
|
||||||
|
|||||||
@ -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: {
|
||||||
@ -388,15 +386,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateGoodsOrder(this.form).then((response) => {
|
updateGoodsOrder(this.form).then((response) => {
|
||||||
|
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) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -701,16 +701,19 @@ export default {
|
|||||||
obj.pictureUrlList.push(this.imgone);
|
obj.pictureUrlList.push(this.imgone);
|
||||||
updatePicture(obj).then(res => {});
|
updatePicture(obj).then(res => {});
|
||||||
}
|
}
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.editopen = false;
|
this.editopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addGroupQrCodeInfo(this.form).then(response => {
|
addGroupQrCodeInfo(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -353,15 +353,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateHospital(this.form).then(response => {
|
updateHospital(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addHospital(this.form).then(response => {
|
addHospital(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -799,15 +799,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateHospitalDepartment(this.form).then((response) => {
|
updateHospitalDepartment(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addHospitalDepartment(this.form).then((response) => {
|
addHospitalDepartment(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.addopen = false;
|
this.addopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -969,15 +969,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateHospitalPerson(this.form).then(response => {
|
updateHospitalPerson(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.addopen = false;
|
this.addopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addHospitalPerson(this.form).then(response => {
|
addHospitalPerson(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.addopen = false;
|
this.addopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -753,6 +753,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateInformationInfo(this.form).then((response) => {
|
updateInformationInfo(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
if (this.imgone != this.form.leadThumbnailUrl) {
|
if (this.imgone != this.form.leadThumbnailUrl) {
|
||||||
@ -764,13 +765,16 @@ export default {
|
|||||||
this.imgsurl = { pictureUrlList: [] };
|
this.imgsurl = { pictureUrlList: [] };
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.form.informationSort = parseInt(this.form.informationSort);
|
this.form.informationSort = parseInt(this.form.informationSort);
|
||||||
addInformationInfo(this.form).then((response) => {
|
addInformationInfo(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -425,15 +425,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.menuId != undefined) {
|
if (this.form.menuId != undefined) {
|
||||||
updateMenu(this.form).then(response => {
|
updateMenu(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addMenu(this.form).then(response => {
|
addMenu(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -283,15 +283,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.noticeId != undefined) {
|
if (this.form.noticeId != undefined) {
|
||||||
updateNotice(this.form).then(response => {
|
updateNotice(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addNotice(this.form).then(response => {
|
addNotice(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -366,15 +366,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateNurseType(this.form).then((response) => {
|
updateNurseType(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addNurseType(this.form).then((response) => {
|
addNurseType(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open2 = false;
|
this.open2 = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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: {
|
||||||
|
|||||||
@ -858,15 +858,19 @@ export default {
|
|||||||
// this.form.areaCode = Number(item.areaCode);
|
// this.form.areaCode = Number(item.areaCode);
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updatePatientArchives(this.form).then((response) => {
|
updatePatientArchives(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addPatientArchives(this.form).then((response) => {
|
addPatientArchives(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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: {
|
||||||
@ -516,17 +514,21 @@ 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) {
|
||||||
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) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.nurseStationName = "请选择所属护理站";
|
this.nurseStationName = "请选择所属护理站";
|
||||||
this.departmentName = "请选择所属科室";
|
this.departmentName = "请选择所属科室";
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -534,6 +536,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 审核提交
|
// 审核提交
|
||||||
templesubmit() {
|
templesubmit() {
|
||||||
|
this.form.modifyCheckStatus = "CHECKED"
|
||||||
this.form.positionalTitleLevel = this.form.positionalTitleLevelCheck
|
this.form.positionalTitleLevel = this.form.positionalTitleLevelCheck
|
||||||
this.form.geniusItem = this.form.geniusItemCheck
|
this.form.geniusItem = this.form.geniusItemCheck
|
||||||
updateNurseStationPersonChecks(this.form).then(res => {
|
updateNurseStationPersonChecks(this.form).then(res => {
|
||||||
|
|||||||
@ -9,18 +9,18 @@
|
|||||||
label-width="110px"
|
label-width="110px"
|
||||||
>
|
>
|
||||||
<el-form-item label="护理站名称" prop="nurseStationId">
|
<el-form-item label="护理站名称" prop="nurseStationId">
|
||||||
<el-button type class="stationbtn" @click="ParamsStation(true)">
|
<el-button
|
||||||
{{
|
type
|
||||||
queryParams.nurseStationName
|
class="stationbtn"
|
||||||
}}
|
@click="ParamsStation(true)"
|
||||||
</el-button>
|
>{{ queryParams.nurseStationName }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理项目" prop="nurseItemId" label-width="100px">
|
<el-form-item label="护理项目" prop="nurseItemId" label-width="100px">
|
||||||
<el-button type class="stationbtn" @click="ParamsStationxm(true)">
|
<el-button
|
||||||
{{
|
type
|
||||||
queryParams.nurseItemName
|
class="stationbtn"
|
||||||
}}
|
@click="ParamsStationxm(true)"
|
||||||
</el-button>
|
>{{ queryParams.nurseItemName }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="海报名称" prop="poserName">
|
<el-form-item label="海报名称" prop="poserName">
|
||||||
<el-input
|
<el-input
|
||||||
@ -266,20 +266,43 @@
|
|||||||
>{{ form.nurseItemName }}</el-button>
|
>{{ form.nurseItemName }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="海报图片" prop="posterPictureUrl">
|
<!-- <el-form-item label="海报图片" prop="posterPictureUrl"> -->
|
||||||
<el-table label-width="50px" style="margin-top: 20px" :data="form.posterPictureUrlLists">
|
<el-table label-width="50px" style="margin: 20px 0 30px" :data="form.posterPictureUrlLists">
|
||||||
<el-table-column label="图片" align="center" width="300">
|
<el-table-column label="图片" align="center" width="300">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-form-item
|
||||||
|
:prop="
|
||||||
|
'posterPictureUrlLists.' + scope.$index + '.posterPictureUrl'
|
||||||
|
"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请上传海报图片',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
]"
|
||||||
|
>
|
||||||
<stationAcatar
|
<stationAcatar
|
||||||
@item="imgUrl"
|
@item="imgUrl"
|
||||||
:img="scope.row.posterPictureUrl"
|
:img="scope.row.posterPictureUrl"
|
||||||
:type="'posterPictureUrl'"
|
:type="'posterPictureUrl'"
|
||||||
:item="scope.row"
|
:item="scope.row"
|
||||||
/>
|
/>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="图片跳转标识" align="center" width="300">
|
<el-table-column label="图片跳转标识" align="center" width="300">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-form-item
|
||||||
|
:prop="'posterPictureUrlLists.' + scope.$index + '.jumpType'"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择图片跳转标识',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
]"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.jumpType"
|
v-model="scope.row.jumpType"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
@ -294,11 +317,23 @@
|
|||||||
@click.native="taptypes(scope.row, item)"
|
@click.native="taptypes(scope.row, item)"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="图片跳转链接" align="center" width="300">
|
<el-table-column label="图片跳转链接" align="center" width="300">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-form-item
|
||||||
|
:prop="'posterPictureUrlLists.' + scope.$index + '.jumpLink'"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入跳转链接',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
]"
|
||||||
|
>
|
||||||
<el-input v-model="scope.row.jumpLink" placeholder="请输入跳转链接" style="widt h:250px"></el-input>
|
<el-input v-model="scope.row.jumpLink" placeholder="请输入跳转链接" style="widt h:250px"></el-input>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="250">
|
<el-table-column label="操作" align="center" width="250">
|
||||||
@ -308,7 +343,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-form-item>
|
<!-- </el-form-item> -->
|
||||||
<el-form-item label="海报简介">
|
<el-form-item label="海报简介">
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@ -458,7 +493,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseurl from "@/api/baseurl.js";
|
|
||||||
import {
|
import {
|
||||||
listPoser,
|
listPoser,
|
||||||
getPoser,
|
getPoser,
|
||||||
@ -538,9 +572,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
nurseStationId: null,
|
|
||||||
nurseTypeId: null,
|
nurseTypeId: null,
|
||||||
nurseItemName: "",
|
|
||||||
nurseItemContent: "",
|
nurseItemContent: "",
|
||||||
advanceAppointDuration: "",
|
advanceAppointDuration: "",
|
||||||
itemPictureUrl: "",
|
itemPictureUrl: "",
|
||||||
@ -620,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();
|
||||||
@ -637,6 +670,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//删除海报图片列表
|
//删除海报图片列表
|
||||||
delPictureUrl(item) {
|
delPictureUrl(item) {
|
||||||
|
console.log(item);
|
||||||
if (item.idd && !item.id) {
|
if (item.idd && !item.id) {
|
||||||
if (this.form.posterPictureUrlLists.length == 1) {
|
if (this.form.posterPictureUrlLists.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
@ -788,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;
|
||||||
},
|
},
|
||||||
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
|
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
|
||||||
@ -906,24 +940,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updatePoser(this.form).then(response => {
|
updatePoser(this.form).then(response => {
|
||||||
// var obj = { pictureUrlList: [] };
|
if (response.code == 200) {
|
||||||
// if (this.form.posterPictureUrlLists) {
|
|
||||||
// this.form.posterPictureUrlLists.forEach((e) => {
|
|
||||||
// obj.pictureUrlList.push(e.posterPictureUrl);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// updatePicture({pictureUrlList:this.deletNewImgs}).then((res) => {
|
|
||||||
// this.open = false;
|
|
||||||
// });
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addPoser(this.form).then(response => {
|
addPoser(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -468,15 +468,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateRevenue(this.form).then(response => {
|
updateRevenue(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addRevenue(this.form).then(response => {
|
addRevenue(this.form).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -570,15 +570,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateSettings(this.form).then((response) => {
|
updateSettings(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addSettings(this.form).then((response) => {
|
addSettings(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -490,13 +490,15 @@ export default {
|
|||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {});
|
updatePicture(obj).then((res) => {});
|
||||||
}
|
}
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addStation(this.form).then((response) => {
|
addStation(this.form).then((response) => {
|
||||||
if (response.code) {
|
if (response.code==200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|||||||
@ -25,7 +25,6 @@
|
|||||||
"
|
"
|
||||||
></i>
|
></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="openimg"
|
:visible.sync="openimg"
|
||||||
@ -62,7 +61,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="title"
|
class="title"
|
||||||
v-if="types != 'posterVideoUrl'&&types!='posterPictureUrl'"
|
v-if="
|
||||||
|
types != 'posterVideoUrl' &&
|
||||||
|
types != 'posterPictureUrl' &&
|
||||||
|
types != 'itemDirectoryUrl'
|
||||||
|
"
|
||||||
>请上传图片为800x800px的正方形</div>
|
>请上传图片为800x800px的正方形</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -109,8 +112,9 @@
|
|||||||
@click="rotateRight()"
|
@click="rotateRight()"
|
||||||
></el-button>
|
></el-button>
|
||||||
</el-col>-->
|
</el-col>-->
|
||||||
<el-col :lg="{ span: 2, offset: 20 }" :md="2">
|
<el-col :lg="{ span: 2, offset: 19 }" :md="2">
|
||||||
<el-button type="primary" size="small" @click="uploadImg()">提 交</el-button>
|
<el-button v-if="uploadbtn" type="primary" size="small" @click="uploadImg()">提 交</el-button>
|
||||||
|
<el-button v-else :loading="!uploadbtn" type="primary" size="small">提 交 中...</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -119,19 +123,21 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { VueCropper } from "vue-cropper";
|
import { VueCropper } from "vue-cropper";
|
||||||
import baseurl from "@/api/baseurl.js";
|
|
||||||
import {
|
import {
|
||||||
updateNurseStationHeads,
|
updateNurseStationHeads,
|
||||||
posts,
|
posts,
|
||||||
updatePoserHeads
|
uploadVideoUrl,
|
||||||
|
uploadTrainingCategoryPicture,
|
||||||
|
updatePoserHeads,
|
||||||
|
uploadUrl
|
||||||
} from "@/api/system/stationAvatar.js";
|
} from "@/api/system/stationAvatar.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { VueCropper },
|
components: { VueCropper },
|
||||||
|
|
||||||
props: ["img", "type", "item", "tovideo"],
|
props: ["img", "type", "item", "tovideo"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
uploadbtn: true, //上传中不允许点击
|
||||||
imageUrl: "",
|
imageUrl: "",
|
||||||
types: "",
|
types: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -166,16 +172,16 @@ 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") {
|
if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") {
|
||||||
this.title = "上传视频";
|
this.title = "上传视频";
|
||||||
} else {
|
} else {
|
||||||
this.title = "上传图片";
|
this.title = "上传图片";
|
||||||
@ -183,7 +189,15 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
tovideo: {
|
tovideo: {
|
||||||
handler(newimg, oldimg) {}
|
handler(newimg, oldimg) {
|
||||||
|
if (this.tovideo == null) {
|
||||||
|
this.video.VideoPath = null;
|
||||||
|
} else if (this.tovideo == "") {
|
||||||
|
this.video.VideoPath = null;
|
||||||
|
} else {
|
||||||
|
this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
item: {
|
item: {
|
||||||
handler(newimg, oldimg) {
|
handler(newimg, oldimg) {
|
||||||
@ -197,7 +211,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -233,10 +247,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 上传预处理
|
// 上传预处理
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
if (this.types == "posterVideoUrl") {
|
if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
this.previews.data = file;
|
this.previews.data = file;
|
||||||
this.previews.url = URL.createObjectURL(file);
|
|
||||||
this.videoForm.showVideoPath = URL.createObjectURL(file);
|
this.videoForm.showVideoPath = URL.createObjectURL(file);
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
@ -260,19 +273,74 @@ export default {
|
|||||||
},
|
},
|
||||||
// 上传图片
|
// 上传图片
|
||||||
uploadImg() {
|
uploadImg() {
|
||||||
|
this.uploadbtn = true;
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
if (this.previews.data) {
|
if (this.previews.data) {
|
||||||
formData.append("file", this.previews.data);
|
formData.append("file", this.previews.data);
|
||||||
formData.append("type", this.types);
|
formData.append("type", this.types);
|
||||||
if (this.types == "posterVideoUrl") {
|
if (this.types == "itemDirectoryUrl") {
|
||||||
updatePoserHeads(formData).then(response => {
|
this.$modal.msgSuccess("上传视频中,请耐心等待");
|
||||||
this.video.VideoPath = baseurl + response.imgUrl;
|
this.uploadbtn = false;
|
||||||
|
uploadVideoUrl(formData).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
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));
|
||||||
|
this.openimg = false;
|
||||||
|
} else {
|
||||||
|
setTimeout(e => {
|
||||||
|
this.openimg = false;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
this.uploadbtn = true;
|
||||||
|
});
|
||||||
|
} else if (
|
||||||
|
this.types == "trainingItemCoverUrl" ||
|
||||||
|
this.types == "trainingItemContentUrl" ||
|
||||||
|
this.types == "trainingItemPosterUrl"
|
||||||
|
) {
|
||||||
|
uploadUrl(formData).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
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 {
|
||||||
|
setTimeout(e => {
|
||||||
|
this.openimg = false;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (this.types == "trainingCategoryPictureUrl") {
|
||||||
|
uploadTrainingCategoryPicture(formData).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
|
||||||
|
this.$emit("imgUrl", response.imgUrl);
|
||||||
|
this.openimg = false;
|
||||||
|
} else {
|
||||||
|
setTimeout(e => {
|
||||||
|
this.openimg = false;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (this.types == "posterVideoUrl") {
|
||||||
|
updatePoserHeads(formData).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.video.VideoPath =
|
||||||
|
process.env.VUE_APP_BASE_API + response.imgUrl;
|
||||||
|
this.$emit("imgUrl", response.imgUrl);
|
||||||
|
this.openimg = false;
|
||||||
|
} else {
|
||||||
|
setTimeout(e => {
|
||||||
|
this.openimg = false;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
updateNurseStationHeads(formData).then(response => {
|
updateNurseStationHeads(formData).then(response => {
|
||||||
this.options.img = baseurl + response.imgUrl;
|
if (response.code == 200) {
|
||||||
|
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;
|
||||||
@ -299,11 +367,18 @@ export default {
|
|||||||
this.$emit("item", JSON.stringify(this.items));
|
this.$emit("item", JSON.stringify(this.items));
|
||||||
}
|
}
|
||||||
this.openimg = false;
|
this.openimg = false;
|
||||||
|
} else {
|
||||||
|
setTimeout(e => {
|
||||||
|
this.openimg = false;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.openimg = false;
|
this.openimg = false;
|
||||||
}
|
}
|
||||||
|
// this.videoForm.showVideoPath = null;
|
||||||
|
this.previews.data = null;
|
||||||
},
|
},
|
||||||
// 实时预览
|
// 实时预览
|
||||||
realTime(data) {
|
realTime(data) {
|
||||||
|
|||||||
@ -495,6 +495,7 @@ export default {
|
|||||||
|
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateStationClassify(this.form).then((response) => {
|
updateStationClassify(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
if (this.form.classifyPictureUrl != this.imgone) {
|
if (this.form.classifyPictureUrl != this.imgone) {
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
@ -503,6 +504,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.editopen = false;
|
this.editopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// if(this.form.nurseClassifyInfoList[0].classifySort){
|
// if(this.form.nurseClassifyInfoList[0].classifySort){
|
||||||
@ -510,9 +512,11 @@ export default {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
addStationClassify(this.form).then((response) => {
|
addStationClassify(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -369,19 +369,23 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateStationConsumable(this.form).then((response) => {
|
updateStationConsumable(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.xgopen = false;
|
this.xgopen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.form.nurseStationConsumables.forEach((e) => {
|
this.form.nurseStationConsumables.forEach((e) => {
|
||||||
e.consumablePrice = Number(e.consumablePrice);
|
e.consumablePrice = Number(e.consumablePrice);
|
||||||
});
|
});
|
||||||
addStationConsumable(this.form).then((response) => {
|
addStationConsumable(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.nurseStationName = "请选择所属护理站";
|
this.nurseStationName = "请选择所属护理站";
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -621,19 +621,23 @@ export default {
|
|||||||
e.price = Number(e.price)
|
e.price = Number(e.price)
|
||||||
})
|
})
|
||||||
updateNurseItem(this.form).then((response) => {
|
updateNurseItem(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.form.nurseStationItemPrices.forEach(e => {
|
this.form.nurseStationItemPrices.forEach(e => {
|
||||||
e.price = Number(e.price)
|
e.price = Number(e.price)
|
||||||
})
|
})
|
||||||
addNurseItem(this.form).then((response) => {
|
addNurseItem(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
320
src/views/system/trainingAvatar/index.vue
Normal file
320
src/views/system/trainingAvatar/index.vue
Normal file
@ -0,0 +1,320 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="user-info-head" :class="video.VideoPath ? 'wihi' : ''" @click="editCropper()">
|
||||||
|
<video
|
||||||
|
style="width: 208px; height: 208px"
|
||||||
|
v-bind:src="video.VideoPath"
|
||||||
|
v-if="video.VideoPath"
|
||||||
|
class="avatar video-avatar"
|
||||||
|
controls="controls"
|
||||||
|
>您的浏览器不支持视频播放</video>
|
||||||
|
<i
|
||||||
|
class="el-icon-plus avatar-uploader-icon"
|
||||||
|
style="
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
"
|
||||||
|
></i>
|
||||||
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="openimg"
|
||||||
|
width="950px"
|
||||||
|
append-to-body
|
||||||
|
@opened="modalOpened"
|
||||||
|
@close="closeDialog"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :xs="24" :md="24" :style="{ height: '350px' }">
|
||||||
|
<div class="avatar-upload-preview">
|
||||||
|
<video
|
||||||
|
v-if="openimg"
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
v-bind:src="videoForm.showVideoPath"
|
||||||
|
class="avatar video-avatar"
|
||||||
|
controls="controls"
|
||||||
|
>您的浏览器不支持视频播放</video>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<br />
|
||||||
|
<el-progress
|
||||||
|
v-if="progressFlag"
|
||||||
|
:percentage="loadProgress"
|
||||||
|
style="height:30px;padding-bottom:20px"
|
||||||
|
></el-progress>
|
||||||
|
<el-row style="padding-bottom:0px">
|
||||||
|
<el-col :lg="3" :md="2">
|
||||||
|
<el-upload
|
||||||
|
:show-file-list="false"
|
||||||
|
class="upload-demo"
|
||||||
|
ref="upload"
|
||||||
|
:action="uploadurl"
|
||||||
|
:on-preview="handlePreview"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-change="loadJsonFromFile"
|
||||||
|
:data="filedata"
|
||||||
|
:headers="headers"
|
||||||
|
:on-progress="uploadVideoProcess"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
>
|
||||||
|
<el-button slot="trigger" size="small" type="primary" style="float:left">选取文件</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-col>
|
||||||
|
<el-col :lg="{ span: 2, offset: 18 }" :md="2">
|
||||||
|
<el-button v-if="uploadbtn" type="primary" size="small" @click="submitUpload">提 交</el-button>
|
||||||
|
<el-button v-else :loading="!uploadbtn" type="primary" size="small">提交中...</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { VueCropper } from "vue-cropper";
|
||||||
|
import { uploadVideoUrl } from "@/api/system/stationAvatar.js";
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
|
export default {
|
||||||
|
components: { VueCropper },
|
||||||
|
props: ["img", "type", "item", "tovideo"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fileList: [],
|
||||||
|
loadProgress: 0, // 动态显示进度条
|
||||||
|
progressFlag: false, // 关闭进度条
|
||||||
|
uploadbtn: true, //上传中不允许点击
|
||||||
|
imageUrl: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
openimg: false,
|
||||||
|
// 是否显示cropper
|
||||||
|
visible: false,
|
||||||
|
// 弹出层标题
|
||||||
|
title: "上传图片/视频",
|
||||||
|
filedata: {
|
||||||
|
type: ""
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
Authorization: "Bearer " + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
img: null, //裁剪图片的地址
|
||||||
|
autoCrop: true, // 是否默认生成截图框
|
||||||
|
autoCropWidth: 300, // 默认生成截图框宽度
|
||||||
|
autoCropHeight: 300, // 默认生成截图框高度
|
||||||
|
fixedBox: true // 固定截图框大小 不允许改变
|
||||||
|
},
|
||||||
|
previews: {},
|
||||||
|
items: {},
|
||||||
|
//显示上传按钮
|
||||||
|
videoForm: {
|
||||||
|
showVideoPath: null //回显的变量
|
||||||
|
},
|
||||||
|
video: {
|
||||||
|
VideoPath: null //回显的变量
|
||||||
|
},
|
||||||
|
uploadurl: undefined
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.uploadurl =
|
||||||
|
process.env.VUE_APP_BASE_API + "/system/trainingItem/uploadVideoUrl";
|
||||||
|
this.uploadbtn = true;
|
||||||
|
this.filedata.type = this.type;
|
||||||
|
this.items = this.item;
|
||||||
|
if (this.tovideo == null) {
|
||||||
|
this.video.VideoPath = null;
|
||||||
|
} else if (this.tovideo == "") {
|
||||||
|
this.video.VideoPath = null;
|
||||||
|
} else {
|
||||||
|
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;
|
||||||
|
if (newimg == null) {
|
||||||
|
this.video.VideoPath = null;
|
||||||
|
} else if (newimg == "") {
|
||||||
|
this.video.VideoPath = null;
|
||||||
|
} else {
|
||||||
|
this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + newimg;
|
||||||
|
this.video.VideoPath = process.env.VUE_APP_BASE_API + newimg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
item: {
|
||||||
|
handler(newimg, oldimg) {
|
||||||
|
this.uploadbtn = true;
|
||||||
|
this.items = this.item;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
handler(newimg, oldimg) {
|
||||||
|
this.filedata.type = this.type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
uploadVideoProcess(event, file, fileList) {
|
||||||
|
this.progressFlag = true; // 显示进度条
|
||||||
|
this.loadProgress = parseInt(event.percent); // 动态获取文件上传进度
|
||||||
|
if (this.loadProgress >= 100) {
|
||||||
|
this.loadProgress = 100;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.progressFlag = false;
|
||||||
|
}, 1000); // 一秒后关闭进度条
|
||||||
|
}
|
||||||
|
},
|
||||||
|
loadJsonFromFile(file, fileList) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
this.previews.data = file.raw;
|
||||||
|
this.videoForm.showVideoPath = URL.createObjectURL(file.raw);
|
||||||
|
reader.readAsDataURL(file.raw);
|
||||||
|
reader.onload = () => {
|
||||||
|
// this.options.img = reader.result;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
submitUpload() {
|
||||||
|
this.uploadbtn = false;
|
||||||
|
this.$refs.upload.submit();
|
||||||
|
},
|
||||||
|
handlePreview(file) {},
|
||||||
|
// 编辑头像
|
||||||
|
editCropper() {
|
||||||
|
this.openimg = true;
|
||||||
|
},
|
||||||
|
// 打开弹出层结束时的回调
|
||||||
|
modalOpened() {
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
// 覆盖默认的上传行为
|
||||||
|
requestUpload() {},
|
||||||
|
// 向左旋转
|
||||||
|
rotateLeft() {
|
||||||
|
this.$refs.cropper.rotateLeft();
|
||||||
|
},
|
||||||
|
// 向右旋转
|
||||||
|
rotateRight() {
|
||||||
|
this.$refs.cropper.rotateRight();
|
||||||
|
},
|
||||||
|
// 图片缩放
|
||||||
|
changeScale(num) {
|
||||||
|
num = num || 1;
|
||||||
|
this.$refs.cropper.changeScale(num);
|
||||||
|
},
|
||||||
|
// 上传预处理
|
||||||
|
beforeUpload(file) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
this.previews.data = file;
|
||||||
|
this.videoForm.showVideoPath = URL.createObjectURL(file);
|
||||||
|
reader.readAsDataURL(file);
|
||||||
|
reader.onload = () => {
|
||||||
|
// this.options.img = reader.result;
|
||||||
|
};
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
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("上传视频成功");
|
||||||
|
this.openimg = false;
|
||||||
|
this.uploadbtn = true;
|
||||||
|
},
|
||||||
|
// 上传图片
|
||||||
|
uploadImg() {
|
||||||
|
this.uploadbtn = true;
|
||||||
|
let formData = new FormData();
|
||||||
|
if (this.previews.data) {
|
||||||
|
formData.append("file", this.previews.data);
|
||||||
|
formData.append("type", this.filedata.type);
|
||||||
|
this.$modal.msgSuccess("上传视频中,请耐心等待");
|
||||||
|
this.uploadbtn = false;
|
||||||
|
uploadVideoUrl(formData).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
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;
|
||||||
|
} else {
|
||||||
|
setTimeout(e => {
|
||||||
|
this.openimg = false;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
this.uploadbtn = true;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.openimg = false;
|
||||||
|
}
|
||||||
|
// this.videoForm.showVideoPath = null;
|
||||||
|
this.previews.data = null;
|
||||||
|
},
|
||||||
|
// 实时预览
|
||||||
|
realTime(data) {
|
||||||
|
this.previews = data;
|
||||||
|
},
|
||||||
|
// 关闭窗口
|
||||||
|
closeDialog() {
|
||||||
|
this.visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.title {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 5%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0%);
|
||||||
|
}
|
||||||
|
.avatar-upload-preview {
|
||||||
|
position: absolute;
|
||||||
|
top: 0%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0%);
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
border-radius: 0%;
|
||||||
|
box-shadow: 0 0 4px #ccc;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.user-info-head {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
background: #fafafa;
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-info-head:hover:after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
color: #eee;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
font-size: 24px;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
cursor: pointer;
|
||||||
|
line-height: 110px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.wihi {
|
||||||
|
background-color: #fff;
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
.wihi:hover:after {
|
||||||
|
transform: translate(50%, 50%);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
442
src/views/system/trainingCategory/index.vue
Normal file
442
src/views/system/trainingCategory/index.vue
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<!-- <el-form-item label="父级分类id" prop="parentId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.parentId"
|
||||||
|
placeholder="请输入父级分类id"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="培训分类名称" prop="trainingCategoryName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.trainingCategoryName"
|
||||||
|
placeholder="请输入培训分类名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训分类编码" prop="trainingCategoryCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.trainingCategoryCode"
|
||||||
|
placeholder="请输入培训分类编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训分类排序" prop="trainingCategorySort">
|
||||||
|
<el-input
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
|
maxlength="5"
|
||||||
|
v-model="queryParams.trainingCategorySort"
|
||||||
|
placeholder="请输入培训分类排序"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:trainingCategory:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:trainingCategory:edit']"
|
||||||
|
>修改</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:trainingCategory:remove']"
|
||||||
|
>删除</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:trainingCategory:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="trainingCategoryList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<!-- <el-table-column label="主键id" align="center" prop="id" />
|
||||||
|
<el-table-column label="父级分类id" align="center" prop="parentId" /> -->
|
||||||
|
<el-table-column
|
||||||
|
label="培训分类名称"
|
||||||
|
align="center"
|
||||||
|
prop="trainingCategoryName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="培训分类编码"
|
||||||
|
align="center"
|
||||||
|
prop="trainingCategoryCode"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column label="培训分类图片路径" align="center" prop="trainingCategoryPictureUrl" /> -->
|
||||||
|
<el-table-column
|
||||||
|
label="培训分类排序"
|
||||||
|
align="center"
|
||||||
|
prop="trainingCategorySort"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column label="分类概述" align="center" prop="remark" /> -->
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:trainingCategory:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:trainingCategory:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改学习培训分类对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="110px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<!-- <el-form-item label="父级分类id" prop="parentId">
|
||||||
|
<el-input v-model="form.parentId" placeholder="请输入父级分类id" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="培训分类名称" prop="trainingCategoryName">
|
||||||
|
<el-input
|
||||||
|
v-model="form.trainingCategoryName"
|
||||||
|
maxlength="50"
|
||||||
|
placeholder="请输入培训分类名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="培训分类编码" prop="trainingCategoryCode">
|
||||||
|
<el-input v-model="form.trainingCategoryCode" placeholder="请输入培训分类编码" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="培训分类图片" prop="trainingCategoryPictureUrl">
|
||||||
|
<stationAcatar
|
||||||
|
style="width: 208px"
|
||||||
|
@imgUrl="imgUrl"
|
||||||
|
:img="form.trainingCategoryPictureUrl"
|
||||||
|
:type="'trainingCategoryPictureUrl'"
|
||||||
|
/>
|
||||||
|
<!-- <el-input v-model="form.trainingCategoryPictureUrl" type="textarea" placeholder="请输入内容" /> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训分类排序" prop="trainingCategorySort">
|
||||||
|
<el-input
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
|
v-model.number="form.trainingCategorySort"
|
||||||
|
maxlength="5"
|
||||||
|
placeholder="请输入培训分类排序"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类概述" prop="remark">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="5"
|
||||||
|
style="width: 340px"
|
||||||
|
placeholder="请输入分类概述"
|
||||||
|
v-model="form.remark"
|
||||||
|
></el-input>
|
||||||
|
<!-- <el-input v-model="form.remark" placeholder="请输入分类概述" /> -->
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listTrainingCategory,
|
||||||
|
getTrainingCategory,
|
||||||
|
delTrainingCategory,
|
||||||
|
addTrainingCategory,
|
||||||
|
updateTrainingCategory,
|
||||||
|
} from "@/api/system/trainingCategory";
|
||||||
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
|
import { updatePicture } from "@/api/system/station";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { stationAcatar },
|
||||||
|
name: "TrainingCategory",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
imgsurl: { pictureUrlList: [] },
|
||||||
|
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 学习培训分类表格数据
|
||||||
|
trainingCategoryList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
parentId: null,
|
||||||
|
trainingCategoryName: null,
|
||||||
|
trainingCategoryCode: null,
|
||||||
|
trainingCategoryPictureUrl: null,
|
||||||
|
trainingCategorySort: null,
|
||||||
|
},
|
||||||
|
imgone: "",
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
trainingCategoryName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入培训分类名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入分类概述",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
trainingCategoryPictureUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择培训分类图片",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
trainingCategorySort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择培训分类排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
imgUrl(imgUrl) {
|
||||||
|
this.form.trainingCategoryPictureUrl = imgUrl;
|
||||||
|
},
|
||||||
|
/** 查询学习培训分类列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listTrainingCategory(this.queryParams).then((response) => {
|
||||||
|
this.trainingCategoryList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.imgone != this.form.trainingCategoryPictureUrl) {
|
||||||
|
if (this.form.trainingCategoryPictureUrl) {
|
||||||
|
obj.pictureUrlList.push(this.form.trainingCategoryPictureUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (obj.pictureUrlList.length > 0) {
|
||||||
|
updatePicture(obj).then((res) => {});
|
||||||
|
}
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
parentId: null,
|
||||||
|
trainingCategoryName: null,
|
||||||
|
trainingCategoryCode: null,
|
||||||
|
trainingCategoryPictureUrl: null,
|
||||||
|
trainingCategorySort: null,
|
||||||
|
remark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加学习培训分类";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getTrainingCategory(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.imgone = this.form.trainingCategoryPictureUrl;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改学习培训分类";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateTrainingCategory(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addTrainingCategory(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认删除学习培训分类编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return delTrainingCategory(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
"system/trainingCategory/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`trainingCategory_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
1398
src/views/system/trainingItem/index.vue
Normal file
1398
src/views/system/trainingItem/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
943
src/views/system/trainingOrder/index.vue
Normal file
943
src/views/system/trainingOrder/index.vue
Normal file
@ -0,0 +1,943 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||||
|
<el-button type class="stationbtn" @click="ParamsStation(true)">
|
||||||
|
{{ queryParams.nurseStationName }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="护理员姓名" prop="nursePersonName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.nursePersonName"
|
||||||
|
placeholder="请输入护理员姓名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订单编号" prop="trainingOrderNo">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.trainingOrderNo"
|
||||||
|
placeholder="请输入订单编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="订单金额" prop="trainingOrderAmount">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.trainingOrderAmount"
|
||||||
|
placeholder="请输入订单金额"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="订单状态" prop="trainingOrderStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.trainingOrderStatus"
|
||||||
|
placeholder="请选择订单状态"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in trainingOrderStatusoptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</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-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="trainingOrderList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
]
|
||||||
|
<el-table-column
|
||||||
|
label="所属护理站"
|
||||||
|
align="center"
|
||||||
|
prop="nurseStationName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="护理员姓名"
|
||||||
|
align="center"
|
||||||
|
prop="nursePersonName"
|
||||||
|
/>
|
||||||
|
<el-table-column label="订单编号" align="center" prop="trainingOrderNo" />
|
||||||
|
<el-table-column
|
||||||
|
property="trainingItemTitle"
|
||||||
|
label="培训课程名称"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="订单状态"
|
||||||
|
align="center"
|
||||||
|
prop="trainingOrderStatus"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button v-if="scope.row.trainingOrderStatus == 'WAIT_PAY'"
|
||||||
|
>待付款</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="scope.row.trainingOrderStatus == 'PAY'"
|
||||||
|
>已付款</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
v-if="scope.row.trainingOrderStatus == 'WAIT_REFUND'"
|
||||||
|
>退款中</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
v-if="scope.row.trainingOrderStatus == 'CANCEL'"
|
||||||
|
>已取消</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
v-if="scope.row.trainingOrderStatus == 'REFUNDED'"
|
||||||
|
>已退款</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="订单金额"
|
||||||
|
align="center"
|
||||||
|
prop="trainingOrderAmount"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="下单方式"
|
||||||
|
align="center"
|
||||||
|
prop="trainingOrderChannel"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.trainingOrderChannel == "MOBILE_APP" ? "手机App" : "" }}
|
||||||
|
{{
|
||||||
|
scope.row.trainingOrderChannel == "WECHAT_APPLET"
|
||||||
|
? "微信小程序"
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
scope.row.trainingOrderChannel == "ALI_PAY_APPLET"
|
||||||
|
? "支付宝小程序"
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="下单时间"
|
||||||
|
align="center"
|
||||||
|
prop="trainingOrderTime"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="备注信息" align="center" prop="remark" /> -->
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-zoom-in"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-error"
|
||||||
|
@click="cencel(scope.row)"
|
||||||
|
v-if="scope.row.trainingOrderStatus == 'PAY'"
|
||||||
|
>退款</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<!-- 退款弹框 -->
|
||||||
|
<el-dialog
|
||||||
|
title="退款"
|
||||||
|
:visible.sync="innerrefund"
|
||||||
|
append-to-body
|
||||||
|
width="500px"
|
||||||
|
>
|
||||||
|
<el-form :inline="true" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="订单编号" prop="trainingOrderNo">
|
||||||
|
<el-input
|
||||||
|
style="width: 260px"
|
||||||
|
v-model="query.trainingOrderNo"
|
||||||
|
clearable
|
||||||
|
:disabled="true"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训课程名" prop="trainingItemTitle">
|
||||||
|
<el-input
|
||||||
|
style="width: 260px"
|
||||||
|
v-model="query.trainingItemTitle"
|
||||||
|
clearable
|
||||||
|
:disabled="true"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||||
|
<el-input
|
||||||
|
style="width: 260px"
|
||||||
|
v-model="query.nurseStationName"
|
||||||
|
clearable
|
||||||
|
:disabled="true"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="退款金额" prop="trainingOrderAmount">
|
||||||
|
<el-input
|
||||||
|
v-model="query.trainingOrderAmount"
|
||||||
|
style="width: 260px"
|
||||||
|
clearable
|
||||||
|
:disabled="true"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="护理员姓名" prop="nursePersonName">
|
||||||
|
<el-input
|
||||||
|
v-model="query.nursePersonName"
|
||||||
|
style="width: 260px"
|
||||||
|
clearable
|
||||||
|
:disabled="true"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="退款原因" prop="cancelAppointmentReason">
|
||||||
|
<el-input
|
||||||
|
style="width: 260px"
|
||||||
|
v-model="query.cancelAppointmentReason"
|
||||||
|
placeholder
|
||||||
|
clearable
|
||||||
|
type="textarea"
|
||||||
|
:rows="5"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="cencelbtn">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="ordercacenl">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 查看学习培训订单主对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="1200px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item label="护理员姓名" prop="nursePersonName">
|
||||||
|
<div class="text">{{ form.nursePersonName }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订单编号" prop="trainingOrderNo">
|
||||||
|
<div class="text">{{ form.trainingOrderNo }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订单金额" prop="trainingOrderAmount">
|
||||||
|
<div class="text">{{ form.trainingOrderAmount }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="下单方式" prop="trainingOrderChannel">
|
||||||
|
<div class="text">{{ form.trainingOrderChannel }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="下单时间" prop="trainingOrderTime">
|
||||||
|
<div class="text">{{ form.trainingOrderTime }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-table
|
||||||
|
:data="form.trainingOrderDetailsList"
|
||||||
|
align="center"
|
||||||
|
v-loading="loading"
|
||||||
|
style="margin: 10px 0 20px 0; padding-bottom: 20px"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="trainingItemTitle"
|
||||||
|
label="培训课程名称"
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="trainingItemType"
|
||||||
|
label="课程类型"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
scope.row.trainingItemType == "VIDEO_LEARNING" ? "视频学习" : ""
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
scope.row.trainingItemType == "GRAPHIC_LEARNING"
|
||||||
|
? "图文学习"
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
scope.row.trainingItemType == "LIVE_COURSES" ? "直播课程" : ""
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
scope.row.trainingItemType == "OFFLINE_TRAINING"
|
||||||
|
? "线下培训"
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
scope.row.trainingItemType == "LEARNING_ITEM_GROUP"
|
||||||
|
? "学习培训课程组"
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-zoom-in"
|
||||||
|
@click="handlelook(scope.row)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 查看图文 -->
|
||||||
|
<el-dialog
|
||||||
|
title="查看图文"
|
||||||
|
:visible.sync="innerrefundvideo"
|
||||||
|
append-to-body
|
||||||
|
width="1000px"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="130px"
|
||||||
|
:model="formlist"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="培训课程详情"
|
||||||
|
prop="trainingItemDetails"
|
||||||
|
v-if="
|
||||||
|
formlist.trainingItemType == 'VIDEO_LEARNING' ||
|
||||||
|
formlist.trainingItemType == 'LEARNING_ITEM_GROUP'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div class="textdetails">{{ formlist.trainingItemDetails }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="
|
||||||
|
formlist.trainingItemType == 'GRAPHIC_LEARNING'
|
||||||
|
? '培训课程内容'
|
||||||
|
: formlist.trainingItemType == 'LEARNING_ITEM_GROUP'
|
||||||
|
? '培训课程介绍'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
prop="trainingItemContent"
|
||||||
|
v-if="
|
||||||
|
formlist.trainingItemType == 'GRAPHIC_LEARNING' ||
|
||||||
|
formlist.trainingItemType == 'LEARNING_ITEM_GROUP'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<editor
|
||||||
|
@imgs="imgs"
|
||||||
|
:url="'/common/uploadTrainingItemContentUrl'"
|
||||||
|
v-model="formlist.trainingItemContent"
|
||||||
|
:min-height="150"
|
||||||
|
style="width: 600px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训课程封面图片" prop="trainingItemCoverUrl">
|
||||||
|
<img class="img" :src="baseurl + formlist.trainingItemCoverUrl" alt />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="培训课程海报图片" prop="trainingItemPosterUrl">
|
||||||
|
<img
|
||||||
|
class="img"
|
||||||
|
:src="baseurl + formlist.trainingItemPosterUrl"
|
||||||
|
alt
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-table
|
||||||
|
ref="list"
|
||||||
|
v-if="formlist.trainingItemType == 'VIDEO_LEARNING'"
|
||||||
|
v-loading="loading"
|
||||||
|
style="margin-top: 20px; width: 1250px"
|
||||||
|
:data="formlist.list"
|
||||||
|
>
|
||||||
|
<el-table-column label="章节视频" align="center" width="300">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<video
|
||||||
|
class="img"
|
||||||
|
:src="baseurl + scope.row.itemDirectoryUrl"
|
||||||
|
controls="controls"
|
||||||
|
></video>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="章节名称" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="scope.row.itemDirectoryName"
|
||||||
|
placeholder="请输入章节名称"
|
||||||
|
></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="章节标题" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="scope.row.itemDirectoryTitle"
|
||||||
|
placeholder="请输入章节标题"
|
||||||
|
></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 护理站 -->
|
||||||
|
<el-dialog
|
||||||
|
title="选择护理站"
|
||||||
|
:visible.sync="nurseStationshow"
|
||||||
|
width="1100px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="clicknurseStationshow"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="getListByUserquery"
|
||||||
|
label-width="110px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item label="护理站编码" prop="nurseStationCode">
|
||||||
|
<el-input
|
||||||
|
v-model="getListByUserquery.nurseStationCode"
|
||||||
|
placeholder="请输入护理站编码"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||||
|
<el-input
|
||||||
|
v-model="getListByUserquery.nurseStationName"
|
||||||
|
placeholder="请输入护理站名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="info"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="nurseStationlist"
|
||||||
|
@cell-dblclick="choicestationid"
|
||||||
|
>
|
||||||
|
<el-table-column label="请选择" width="70" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
@click="choicestationid(scope.row)"
|
||||||
|
v-if="queryParams.nurseStationId == scope.row.id"
|
||||||
|
></el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
v-else
|
||||||
|
@click="choicestationid(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="nurseStationCode"
|
||||||
|
label="护理站编码"
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="nurseStationName"
|
||||||
|
label="护理站名称"
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="phone"
|
||||||
|
label="联系电话"
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="address"
|
||||||
|
label="护理站地址"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="stationtotal > 0"
|
||||||
|
:total="stationtotal"
|
||||||
|
:page.sync="getListByUserquery.pageNum"
|
||||||
|
:limit.sync="getListByUserquery.pageSize"
|
||||||
|
@pagination="info"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listTrainingOrder,
|
||||||
|
getTrainingOrder,
|
||||||
|
orderItemDirectory,
|
||||||
|
refundInformation,
|
||||||
|
delTrainingOrder,
|
||||||
|
xylWeChatRefundNotify,
|
||||||
|
addTrainingOrder,
|
||||||
|
updateTrainingOrder,
|
||||||
|
} from "@/api/system/trainingOrder";
|
||||||
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
|
import editor from "@/components/Editor";
|
||||||
|
import { getListByUser } from "@/api/system/userlist.js";
|
||||||
|
export default {
|
||||||
|
name: "TrainingOrder",
|
||||||
|
components: { stationAcatar, editor },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
baseurl: process.env.VUE_APP_BASE_API,
|
||||||
|
trainingOrderStatusoptions: [
|
||||||
|
{
|
||||||
|
value: "WAIT_PAY",
|
||||||
|
label: "待付款",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "PAY",
|
||||||
|
label: "已付款",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "WAIT_REFUND",
|
||||||
|
label: "退款中",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "REFUNDED",
|
||||||
|
label: "已退款",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "CANCEL",
|
||||||
|
label: "已取消",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
nurseStationshow: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
innerrefund: false,
|
||||||
|
innerrefundvideo: false,
|
||||||
|
query: {},
|
||||||
|
formlist: {},
|
||||||
|
trainingItemTypeoptions: [
|
||||||
|
{
|
||||||
|
value: "GRAPHIC_LEARNING",
|
||||||
|
label: "图文学习",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "LEARNING_ITEM_GROUP",
|
||||||
|
label: "学习培训项目组",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "VIDEO_LEARNING",
|
||||||
|
label: "视频学习",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
optiondeflag: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: "否",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: "是",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: "MOBILE_APP",
|
||||||
|
label: "手机App",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "WECHAT_APPLET",
|
||||||
|
label: "微信小程序",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "ALI_PAY_APPLET",
|
||||||
|
label: "支付宝小程序",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
getListByUserquery: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
stationtotal: 0,
|
||||||
|
// 学习培训订单主表格数据
|
||||||
|
trainingOrderList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
nurseStationId: null,
|
||||||
|
nurseStationPersonId: null,
|
||||||
|
nursePersonName: null,
|
||||||
|
trainingOrderNo: null,
|
||||||
|
trainingOrderStatus: null,
|
||||||
|
trainingOrderAmount: null,
|
||||||
|
trainingOrderChannel: null,
|
||||||
|
trainingOrderTime: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
list: [],
|
||||||
|
nurseStationlist: [],
|
||||||
|
trainingOrderDetailsList: [],
|
||||||
|
// 表单校验
|
||||||
|
rules: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//页面所属护理站
|
||||||
|
ParamsStation(item) {
|
||||||
|
this.info();
|
||||||
|
this.nurseStationshow = true;
|
||||||
|
},
|
||||||
|
//护理站list
|
||||||
|
info() {
|
||||||
|
getListByUser(this.getListByUserquery).then((res) => {
|
||||||
|
this.nurseStationlist = res.rows;
|
||||||
|
this.stationtotal = res.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
clicknurseStationshow() {
|
||||||
|
this.nurseStationshow = false;
|
||||||
|
},
|
||||||
|
//护理站重置
|
||||||
|
stationcancel() {
|
||||||
|
this.getListByUserquery = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
this.info();
|
||||||
|
},
|
||||||
|
//护理站页面选择护理站
|
||||||
|
choicestationid(item) {
|
||||||
|
this.queryParams.nurseStationName = item.nurseStationName;
|
||||||
|
this.queryParams.nurseStationId = item.id;
|
||||||
|
this.nurseStationshow = false;
|
||||||
|
},
|
||||||
|
// 章节视频
|
||||||
|
itemDirectoryUrl(item) {
|
||||||
|
let items = JSON.parse(item);
|
||||||
|
console.log(items);
|
||||||
|
if (items.idd && !items.trainingItemDirectoryId) {
|
||||||
|
this.form.trainingItemDirectoryList.forEach((e) => {
|
||||||
|
if (e.idd == items.idd) {
|
||||||
|
e.itemDirectoryUrl = items.itemDirectoryUrl;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (!items.idd && items.attributeDetailsId) {
|
||||||
|
this.form.trainingItemDirectoryList.forEach((e) => {
|
||||||
|
if (e.attributeDetailsId == items.attributeDetailsId) {
|
||||||
|
e.itemDirectoryUrl = items.itemDirectoryUrl;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
imgUrl4(imgUrl) {},
|
||||||
|
// 取消按钮
|
||||||
|
cencelbtn() {
|
||||||
|
this.innerrefund = false;
|
||||||
|
},
|
||||||
|
// // 确认退款
|
||||||
|
cencel(row) {
|
||||||
|
console.log(row);
|
||||||
|
refundInformation(row.id).then((response) => {
|
||||||
|
this.query = response.data;
|
||||||
|
this.innerrefund = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
imgs(item) {
|
||||||
|
console.log(item);
|
||||||
|
this.imgsurl.pictureUrlList.push(item);
|
||||||
|
},
|
||||||
|
//退款确定按钮
|
||||||
|
ordercacenl() {
|
||||||
|
var obj = {
|
||||||
|
orderNo: this.query.trainingOrderNo,
|
||||||
|
refundPrice: this.query.trainingOrderAmount,
|
||||||
|
trainingOrderFlag: "TRAINING",
|
||||||
|
};
|
||||||
|
xylWeChatRefundNotify(obj).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$modal.msgSuccess("退款有延迟,请耐心等待");
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
this.innerrefund = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询学习培训订单主列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listTrainingOrder(this.queryParams).then((response) => {
|
||||||
|
this.trainingOrderList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 查看视频
|
||||||
|
handlelook(row) {
|
||||||
|
this.loading = true;
|
||||||
|
this.innerrefundvideo = true;
|
||||||
|
console.log(row);
|
||||||
|
this.formlist.trainingItemCoverUrl = row.trainingItemCoverUrl;
|
||||||
|
this.formlist.trainingItemPosterUrl = row.trainingItemPosterUrl;
|
||||||
|
this.formlist.trainingItemDetails = row.trainingItemDetails;
|
||||||
|
this.formlist.trainingItemContent = row.trainingItemContent;
|
||||||
|
this.formlist.trainingItemType = row.trainingItemType;
|
||||||
|
orderItemDirectory(row.trainingOrderDetailsId).then((response) => {
|
||||||
|
this.formlist.list = response.rows;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
nurseStationId: null,
|
||||||
|
nurseStationPersonId: null,
|
||||||
|
nursePersonName: null,
|
||||||
|
trainingOrderNo: null,
|
||||||
|
trainingOrderStatus: null,
|
||||||
|
trainingOrderAmount: null,
|
||||||
|
trainingOrderChannel: null,
|
||||||
|
trainingOrderTime: null,
|
||||||
|
remark: null,
|
||||||
|
delFlag: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加学习培训订单主";
|
||||||
|
},
|
||||||
|
/** 查看按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getTrainingOrder(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.form.trainingOrderDetailsList =
|
||||||
|
response.data.trainingOrderDetailsList;
|
||||||
|
response.data.trainingOrderChannel == "WECHAT_APPLET"
|
||||||
|
? (response.data.trainingOrderChannel = "微信小程序")
|
||||||
|
: "";
|
||||||
|
response.data.trainingOrderChannel == "MOBILE_APP"
|
||||||
|
? (response.data.trainingOrderChannel = "手机App")
|
||||||
|
: "";
|
||||||
|
response.data.trainingOrderChannel == "ALI_PAY_APPLET"
|
||||||
|
? (response.data.trainingOrderChannel = "支付宝小程序")
|
||||||
|
: "";
|
||||||
|
|
||||||
|
this.open = true;
|
||||||
|
this.title = "查看学习培训订单";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateTrainingOrder(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addTrainingOrder(this.form).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认删除学习培训订单主编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return delTrainingOrder(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
"system/trainingOrder/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`trainingOrder_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.img {
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
width: 250px;
|
||||||
|
height: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
padding-left: 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0 15px;
|
||||||
|
border: 1px solid #e6ebf5;
|
||||||
|
}
|
||||||
|
.textdetail {
|
||||||
|
width: 550px;
|
||||||
|
// height: 600px;
|
||||||
|
line-height: 36px;
|
||||||
|
padding-left: 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0 15px;
|
||||||
|
border: 1px solid #e6ebf5;
|
||||||
|
}
|
||||||
|
.stationbtn {
|
||||||
|
width: 208px;
|
||||||
|
text-align: left;
|
||||||
|
height: 32px;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.textdetails {
|
||||||
|
width: 600px;
|
||||||
|
// height: 300px;
|
||||||
|
line-height: 36px;
|
||||||
|
padding-left: 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0 15px;
|
||||||
|
border: 1px solid #e6ebf5;
|
||||||
|
}
|
||||||
|
::v-deep .wihi {
|
||||||
|
text-align: left !important;
|
||||||
|
// width: 208px !important;
|
||||||
|
// height: 208px !important;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
::v-deep .video-avatar {
|
||||||
|
transform: translateX(-25%);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user