修改
This commit is contained in:
parent
5114554e4d
commit
9ba32ef0f8
@ -283,41 +283,84 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="海报图片" :required="true">
|
<!-- <el-form-item label="海报图片" prop="posterPictureUrl"> -->
|
||||||
<el-table label-width="50px" style="margin-top: 20px" :data="form.posterPictureUrlLists">
|
<el-table
|
||||||
<el-table-column label="图片" align="center" width="300">
|
label-width="50px"
|
||||||
<template slot-scope="scope">
|
style="margin-top: 20px"
|
||||||
|
:data="form.posterPictureUrlLists"
|
||||||
|
>
|
||||||
|
<el-table-column label="图片" align="center" width="300">
|
||||||
|
<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"
|
||||||
/>
|
/>
|
||||||
</template>
|
</el-form-item>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column label="图片跳转标识" align="center" width="300">
|
</el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column label="图片跳转标识" align="center" width="300">
|
||||||
|
<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="请选择"
|
||||||
clearable
|
|
||||||
style="width: 208px"
|
style="width: 208px"
|
||||||
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in jumpTypes"
|
v-for="item in jumpTypes"
|
||||||
:key="item.dictValue"
|
:key="item.dictValue"
|
||||||
:label="item.dictLabel"
|
:label="item.dictLabel"
|
||||||
:value="item.dictValue"
|
:value="item.dictValue"
|
||||||
@click.native="taptypes(scope.row,item)"
|
@click.native="taptypes(scope.row, item)"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</el-form-item>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column label="图片跳转链接" align="center" width="300">
|
</el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column label="图片跳转链接" align="center" width="300">
|
||||||
<el-input v-model="scope.row.jumpLink" placeholder="请输入跳转链接" style="widt h:250px"></el-input>
|
<template slot-scope="scope">
|
||||||
</template>
|
<el-form-item
|
||||||
</el-table-column>
|
: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-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="250">
|
<el-table-column label="操作" align="center" width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" @click="addPictureUrl">新增</el-button>
|
<el-button size="mini" type="text" @click="addPictureUrl">新增</el-button>
|
||||||
@ -485,7 +528,7 @@ import {
|
|||||||
getListBy,
|
getListBy,
|
||||||
updatePoser,
|
updatePoser,
|
||||||
updatePicture,
|
updatePicture,
|
||||||
selectPosterImageJump
|
selectPosterImageJump,
|
||||||
} from "@/api/system/poser";
|
} from "@/api/system/poser";
|
||||||
import { list } from "@/api/system/nurseItem";
|
import { list } from "@/api/system/nurseItem";
|
||||||
import stationAcatar from "../stationAvatar/index.vue";
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
@ -499,7 +542,7 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
getListByUserquery: {
|
getListByUserquery: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
nurseStationlist: [],
|
nurseStationlist: [],
|
||||||
nurseStationshow: false,
|
nurseStationshow: false,
|
||||||
@ -541,7 +584,7 @@ export default {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
nurseItemCode: null,
|
nurseItemCode: null,
|
||||||
nurseItemName: null
|
nurseItemName: null,
|
||||||
},
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -558,7 +601,7 @@ export default {
|
|||||||
moduleType: null,
|
moduleType: null,
|
||||||
poserSort: null,
|
poserSort: null,
|
||||||
jumpLink: null,
|
jumpLink: null,
|
||||||
jumpType: null
|
jumpType: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
@ -570,42 +613,42 @@ export default {
|
|||||||
nurseStationId: null,
|
nurseStationId: null,
|
||||||
nurseStationName: "请选择所属护理站",
|
nurseStationName: "请选择所属护理站",
|
||||||
nurseItemName: "请选择所属护理项目",
|
nurseItemName: "请选择所属护理项目",
|
||||||
nurseItemId: null
|
nurseItemId: null,
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
moduleType: [
|
moduleType: [
|
||||||
{ required: true, message: "请选择海报所属模块", trigger: "blur" }
|
{ required: true, message: "请选择海报所属模块", trigger: "blur" },
|
||||||
],
|
],
|
||||||
poserName: [
|
poserName: [
|
||||||
{ required: true, message: "请输入海报名称", trigger: "blur" }
|
{ required: true, message: "请输入海报名称", trigger: "blur" },
|
||||||
],
|
],
|
||||||
nurseStationId: [
|
nurseStationId: [
|
||||||
{ required: true, message: "请选择所属护理站", trigger: "blur" }
|
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||||
],
|
],
|
||||||
posterIntroduce: [
|
posterIntroduce: [
|
||||||
{ required: true, message: "请输入海报简介", trigger: "blur" }
|
{ required: true, message: "请输入海报简介", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
|
||||||
posterVideoUrl: [
|
posterVideoUrl: [
|
||||||
{ required: true, message: "请选择海报视频", trigger: "blur" }
|
{ required: true, message: "请选择海报视频", trigger: "blur" },
|
||||||
],
|
],
|
||||||
poserSort: [
|
poserSort: [
|
||||||
{ required: true, message: "请输入海报顺序", trigger: "blur" }
|
{ required: true, message: "请输入海报顺序", trigger: "blur" },
|
||||||
],
|
],
|
||||||
nurseItemId: [
|
nurseItemId: [
|
||||||
{ required: true, message: "请选择所属护理项目", trigger: "blur" }
|
{ required: true, message: "请选择所属护理项目", trigger: "blur" },
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
value: "NURSE_AGENCY_MODULE",
|
value: "NURSE_AGENCY_MODULE",
|
||||||
label: "护理机构模块"
|
label: "护理机构模块",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "NURSE_ITEM_MODULE",
|
value: "NURSE_ITEM_MODULE",
|
||||||
label: "护理项目模块"
|
label: "护理项目模块",
|
||||||
}
|
},
|
||||||
// {
|
// {
|
||||||
// value: "HEALTH_CONSUTION_MODULE",
|
// value: "HEALTH_CONSUTION_MODULE",
|
||||||
// label: "健康咨询模块",
|
// label: "健康咨询模块",
|
||||||
@ -633,8 +676,8 @@ export default {
|
|||||||
isShowUploadVideo: false,
|
isShowUploadVideo: false,
|
||||||
//显示上传按钮
|
//显示上传按钮
|
||||||
videoForm: {
|
videoForm: {
|
||||||
showVideoPath: "" //回显的变量
|
showVideoPath: "", //回显的变量
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -648,7 +691,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//类型字典
|
//类型字典
|
||||||
PosterImageJump() {
|
PosterImageJump() {
|
||||||
selectPosterImageJump().then(res => {
|
selectPosterImageJump().then((res) => {
|
||||||
this.jumpTypes = res.data;
|
this.jumpTypes = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -664,17 +707,15 @@ export default {
|
|||||||
if (this.form.posterPictureUrlLists.length == 1) {
|
if (this.form.posterPictureUrlLists.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
|
this.form.posterPictureUrlLists =
|
||||||
e => e.idd != item.idd
|
this.form.posterPictureUrlLists.filter((e) => e.idd != item.idd);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else if (!item.idd && item.id) {
|
} else if (!item.idd && item.id) {
|
||||||
if (this.form.posterPictureUrlLists.length == 1) {
|
if (this.form.posterPictureUrlLists.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
|
this.form.posterPictureUrlLists =
|
||||||
e => e.id != item.id
|
this.form.posterPictureUrlLists.filter((e) => e.id != item.id);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -686,7 +727,7 @@ export default {
|
|||||||
jumpType: null,
|
jumpType: null,
|
||||||
idd: this.idd,
|
idd: this.idd,
|
||||||
jumpLink: null,
|
jumpLink: null,
|
||||||
jumpDictId: null
|
jumpDictId: null,
|
||||||
};
|
};
|
||||||
if (this.form.posterPictureUrlLists.length >= 5) {
|
if (this.form.posterPictureUrlLists.length >= 5) {
|
||||||
this.$message.error("最多新增5条");
|
this.$message.error("最多新增5条");
|
||||||
@ -727,7 +768,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//搜索
|
//搜索
|
||||||
nurseItemlistInfo() {
|
nurseItemlistInfo() {
|
||||||
list(this.nurseItemquery).then(res => {
|
list(this.nurseItemquery).then((res) => {
|
||||||
this.nurseItemlist = res.rows;
|
this.nurseItemlist = res.rows;
|
||||||
this.nurseItemtotal = res.total;
|
this.nurseItemtotal = res.total;
|
||||||
});
|
});
|
||||||
@ -768,12 +809,12 @@ export default {
|
|||||||
},
|
},
|
||||||
//护理站list
|
//护理站list
|
||||||
getlistinfo() {
|
getlistinfo() {
|
||||||
getListBy(this.queryParams).then(res => {
|
getListBy(this.queryParams).then((res) => {
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
info() {
|
info() {
|
||||||
getListBy(this.queryParams).then(res => {
|
getListBy(this.queryParams).then((res) => {
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
this.queryParams.nurseStationId = res.rows[0].id;
|
this.queryParams.nurseStationId = res.rows[0].id;
|
||||||
this.nurseItemquery.nurseStationId = res.rows[0].id;
|
this.nurseItemquery.nurseStationId = res.rows[0].id;
|
||||||
@ -790,7 +831,7 @@ export default {
|
|||||||
stationcancel() {
|
stationcancel() {
|
||||||
this.getListByUserquery = {
|
this.getListByUserquery = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 10,
|
||||||
};
|
};
|
||||||
this.info();
|
this.info();
|
||||||
},
|
},
|
||||||
@ -832,7 +873,7 @@ export default {
|
|||||||
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
|
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listPoser(this.queryParams).then(response => {
|
listPoser(this.queryParams).then((response) => {
|
||||||
this.poserList = response.rows;
|
this.poserList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -842,12 +883,12 @@ export default {
|
|||||||
cancel() {
|
cancel() {
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
if (this.form.posterPictureUrlLists) {
|
if (this.form.posterPictureUrlLists) {
|
||||||
this.form.posterPictureUrlLists.forEach(e => {
|
this.form.posterPictureUrlLists.forEach((e) => {
|
||||||
obj.pictureUrlList.push(e.posterPictureUrl);
|
obj.pictureUrlList.push(e.posterPictureUrl);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture({ pictureUrlList: this.deletNewImgs }).then(res => {
|
updatePicture({ pictureUrlList: this.deletNewImgs }).then((res) => {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -866,8 +907,8 @@ export default {
|
|||||||
jumpType: null,
|
jumpType: null,
|
||||||
idd: this.idd,
|
idd: this.idd,
|
||||||
jumpLink: null,
|
jumpLink: null,
|
||||||
jumpDictId: null
|
jumpDictId: null,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
moduleType: null,
|
moduleType: null,
|
||||||
id: null,
|
id: null,
|
||||||
@ -878,7 +919,7 @@ export default {
|
|||||||
nurseStationName: "请选择所属护理站",
|
nurseStationName: "请选择所属护理站",
|
||||||
nurseStationId: null,
|
nurseStationId: null,
|
||||||
nurseItemName: "请选择所属护理项目",
|
nurseItemName: "请选择所属护理项目",
|
||||||
nurseItemId: null
|
nurseItemId: null,
|
||||||
};
|
};
|
||||||
this.deletNewImgs = [];
|
this.deletNewImgs = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
@ -903,9 +944,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.nurseStationId);
|
this.ids = selection.map((item) => item.nurseStationId);
|
||||||
this.itemids = selection.map(item => item.nurseItemId);
|
this.itemids = selection.map((item) => item.nurseItemId);
|
||||||
this.Types = selection.map(item => item.moduleType);
|
this.Types = selection.map((item) => item.moduleType);
|
||||||
this.single = selection.length !== 1;
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
@ -921,7 +962,7 @@ export default {
|
|||||||
const id = row.nurseStationId || this.ids;
|
const id = row.nurseStationId || this.ids;
|
||||||
const itemid = row.nurseItemId || this.itemids;
|
const itemid = row.nurseItemId || this.itemids;
|
||||||
const type = row.moduleType || this.Types;
|
const type = row.moduleType || this.Types;
|
||||||
getPoser(type, id, itemid).then(response => {
|
getPoser(type, id, itemid).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
if (response.data.goodAttributeDetailsLists) {
|
if (response.data.goodAttributeDetailsLists) {
|
||||||
this.goodDetailsLists = response.data.goodAttributeDetailsLists;
|
this.goodDetailsLists = response.data.goodAttributeDetailsLists;
|
||||||
@ -933,22 +974,22 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.form.posterPictureUrlLists.forEach(e => {
|
this.form.posterPictureUrlLists.forEach((e) => {
|
||||||
if (!e.jumpType || e.jumpType == "") {
|
if (!e.jumpType || e.jumpType == "") {
|
||||||
e.jumpDictId = null;
|
e.jumpDictId = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate((valid) => {
|
||||||
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: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
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) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -971,7 +1012,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除?")
|
.confirm("是否确认删除?")
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return delPoser(nurseStationIds, moduleTypes, nurseItemIds);
|
return delPoser(nurseStationIds, moduleTypes, nurseItemIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -985,12 +1026,12 @@ export default {
|
|||||||
this.download(
|
this.download(
|
||||||
"system/poser/export",
|
"system/poser/export",
|
||||||
{
|
{
|
||||||
...this.queryParams
|
...this.queryParams,
|
||||||
},
|
},
|
||||||
`poser_${new Date().getTime()}.xlsx`
|
`poser_${new Date().getTime()}.xlsx`
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user