修改
This commit is contained in:
parent
0355d018b6
commit
728ad279f9
@ -37,7 +37,7 @@ export function addCertificate(data) {
|
||||
export function updateCertificate(data) {
|
||||
return request({
|
||||
url: '/system/certificate/edit',
|
||||
method: 'put',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
637
src/views/system/certificate/index.vue
Normal file
637
src/views/system/certificate/index.vue
Normal file
@ -0,0 +1,637 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<!-- <el-form-item label="科室人员表id" prop="hospitalPersonId">
|
||||
<el-input
|
||||
v-model="queryParams.hospitalPersonId"
|
||||
placeholder="请输入科室人员表id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="证书名称" prop="certificateName">
|
||||
<el-input
|
||||
v-model="queryParams.certificateName"
|
||||
placeholder="请输入证书名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书编号" prop="certificateCode">
|
||||
<el-input
|
||||
v-model="queryParams.certificateCode"
|
||||
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:certificate: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:certificate: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:certificate: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:certificate:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="certificateList"
|
||||
@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="hospitalPersonId" /> -->
|
||||
<el-table-column label="证书名称" align="center" prop="certificateName" />
|
||||
<el-table-column label="证书编号" align="center" prop="certificateCode" />
|
||||
<!-- <el-table-column label="证书图片存放路径" align="center" prop="certificateUrl" /> -->
|
||||
<el-table-column
|
||||
label="证书显示顺序"
|
||||
align="center"
|
||||
prop="certificateSort"
|
||||
/>
|
||||
<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:certificate:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:certificate: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="所属人员" prop="hospitalPersonId">
|
||||
<el-button
|
||||
type=""
|
||||
v-if="form.personName == '请选择所属人员'"
|
||||
@click="clickinnerVisible()"
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
color: #c0c4cc;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ form.personName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ form.personName }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书名称" prop="certificateName">
|
||||
<el-input
|
||||
v-model="form.certificateName"
|
||||
style="width: 250px"
|
||||
placeholder="请输入证书名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书显示顺序" prop="certificateSort">
|
||||
<el-input
|
||||
v-model.number="form.certificateSort"
|
||||
style="width: 250px"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
placeholder="请输入证书显示顺序"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div
|
||||
v-for="(item, index) in form.certificateUrlList"
|
||||
:key="index"
|
||||
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
|
||||
>
|
||||
<el-form-item
|
||||
label="证书图片"
|
||||
:rules="rules.certificateUrlList.certificateUrl"
|
||||
:prop="`certificateUrlList.${index}.certificateUrl`"
|
||||
>
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
@item="imgclassifyItem"
|
||||
:img="item.certificateUrl"
|
||||
:item="item"
|
||||
:type="'certificateUrl'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
style="margin-top: 50px;"
|
||||
type="primary"
|
||||
circle
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
></el-button>
|
||||
<el-button
|
||||
style="margin-top: 50px; "
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
plain
|
||||
@click="deldisease(index)"
|
||||
v-if="index != 0"
|
||||
></el-button>
|
||||
</div>
|
||||
</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>
|
||||
<!-- 选择人员 -->
|
||||
<el-dialog
|
||||
title="选择人员"
|
||||
:visible.sync="innerVisible"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="innerVisiblecancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
:model="hospitalqueryParams"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="人员编码" prop="personCode" label-width="120">
|
||||
<el-input
|
||||
v-model="hospitalqueryParams.personCode"
|
||||
placeholder="请输入人员编码"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员名称" prop="personName" label-width="120">
|
||||
<el-input
|
||||
v-model="hospitalqueryParams.personName"
|
||||
placeholder="请输入人员名称"
|
||||
clearable
|
||||
/>
|
||||
</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="addresetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="hospitalPersonList"
|
||||
@cell-dblclick="nurseclick"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
v-if="form.hospitalPersonId == scope.row.id"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
v-else
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="personCode" label="人员编码" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="personName"
|
||||
label="人员名称"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
property="personPhone"
|
||||
label="人员联系电话"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="personAddress"
|
||||
label="人员地址"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column property="cardNo" label="身份证号" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="hospitalqueryParams.pageNum"
|
||||
:limit.sync="hospitalqueryParams.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listCertificate,
|
||||
getCertificate,
|
||||
delCertificate,
|
||||
addCertificate,
|
||||
listHospitalPerson,
|
||||
updateCertificate,
|
||||
} from "@/api/system/certificate";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
export default {
|
||||
components: { stationAcatar },
|
||||
name: "Certificate",
|
||||
data() {
|
||||
return {
|
||||
idd: 0,
|
||||
hospitalqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
personCode: "",
|
||||
personName: "",
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 健康咨询-科室人员资质证书信息表格数据
|
||||
certificateList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
innerVisible: false,
|
||||
hospitalPersonList: [],
|
||||
total2: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
hospitalPersonId: null,
|
||||
certificateName: null,
|
||||
certificateCode: null,
|
||||
certificateUrl: null,
|
||||
certificateSort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
certificateUrlList: {
|
||||
certificateUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传图片",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
certificateSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入顺序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
certificateName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入证书名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
hospitalPersonId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择所属人员",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.certificateUrlList.splice(index, 1);
|
||||
},
|
||||
adddisease() {
|
||||
this.idd++;
|
||||
var obj = {
|
||||
certificateUrl: "",
|
||||
idd: this.idd
|
||||
};
|
||||
if (this.form.certificateUrlList.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.form.certificateUrlList.push(obj);
|
||||
}
|
||||
},
|
||||
//接收图片所属的item
|
||||
imgclassifyItem(item) {
|
||||
console.log(item,'接受图片item')
|
||||
let items = JSON.parse(item);
|
||||
if (items.idd && !items.id) {
|
||||
this.form.certificateUrlList.forEach(e => {
|
||||
if (e.idd == items.idd) {
|
||||
e.certificateUrl = items.certificateUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.idd && items.id) {
|
||||
this.form.certificateUrl = items.certificateUrl;
|
||||
}
|
||||
},
|
||||
imgUrl(e) {},
|
||||
innerVisiblecancel() {
|
||||
this.innerVisible = false;
|
||||
},
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.form.personName = row.personName;
|
||||
this.form.hospitalPersonId = row.id;
|
||||
this.innerVisible = false;
|
||||
},
|
||||
/** 查询健康咨询-科室人员信息列表 */
|
||||
info() {
|
||||
this.loading = true;
|
||||
listHospitalPerson(this.hospitalqueryParams).then((response) => {
|
||||
this.hospitalPersonList = response.rows;
|
||||
this.total2 = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
addresetQuery() {
|
||||
this.hospitalqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
personCode: "",
|
||||
personName: "",
|
||||
};
|
||||
this.info();
|
||||
},
|
||||
clickinnerVisible() {
|
||||
this.addresetQuery();
|
||||
this.innerVisible = true;
|
||||
},
|
||||
/** 查询健康咨询-科室人员资质证书信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCertificate(this.queryParams).then((response) => {
|
||||
this.certificateList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
certificateUrlList: [
|
||||
{
|
||||
certificateUrl: null,
|
||||
},
|
||||
],
|
||||
id: null,
|
||||
hospitalPersonId: null,
|
||||
certificateName: null,
|
||||
certificateCode: null,
|
||||
certificateUrl: null,
|
||||
certificateSort: null,
|
||||
createBy: null,
|
||||
personName: "请选择所属人员",
|
||||
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.form = {
|
||||
certificateUrlList: [
|
||||
{
|
||||
certificateUrl:"",
|
||||
idd: this.idd
|
||||
}
|
||||
]
|
||||
};
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加健康咨询-科室人员资质证书信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
console.log(row)
|
||||
this.reset();
|
||||
const hospitalPersonId = row.hospitalPersonId || this.hospitalPersonIds;
|
||||
// const id = row.id || this.ids;
|
||||
getCertificate(hospitalPersonId).then((response) => {
|
||||
console.log(response,'打印返回的值')
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改健康咨询-科室人员资质证书信息";
|
||||
});
|
||||
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateCertificate(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCertificate(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row)
|
||||
const hospitalPersonIds = row.hospitalPersonId || this.hospitalPersonIds;
|
||||
this.$modal
|
||||
.confirm(
|
||||
'是否确认删除人员id为"' +
|
||||
hospitalPersonIds +
|
||||
'"的数据项?'
|
||||
)
|
||||
.then(function () {
|
||||
return delCertificate(hospitalPersonIds);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/certificate/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`certificate_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -24,24 +24,21 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="客服类型"
|
||||
prop="customerServiceType"
|
||||
<el-form-item label="客服类型" prop="customerServiceType">
|
||||
<el-select
|
||||
clearable
|
||||
v-model="queryParams.customerServiceType"
|
||||
placeholder="请选择客服类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in option"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-select
|
||||
clearable
|
||||
v-model="queryParams.customerServiceType"
|
||||
placeholder="请选择客服类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in option"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -136,11 +133,7 @@
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="展示顺序"
|
||||
align="center"
|
||||
prop="groupSort"
|
||||
/>
|
||||
<el-table-column label="展示顺序" align="center" prop="groupSort" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
@ -180,12 +173,11 @@
|
||||
:visible.sync="editopen"
|
||||
width="500px"
|
||||
append-to-body
|
||||
:before-close="editcancel"
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="群名称" prop="groupName">
|
||||
<el-input
|
||||
|
||||
maxLength="50"
|
||||
style="width: 225px"
|
||||
v-model="form.groupName"
|
||||
@ -194,7 +186,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="群二维码" prop="groupQrCodeUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
@imgUrl="setUpdateImgUrl"
|
||||
:img="form.groupQrCodeUrl"
|
||||
:type="'groupQrCodeUrl'"
|
||||
/>
|
||||
@ -222,6 +214,7 @@
|
||||
<template>
|
||||
<el-button
|
||||
type
|
||||
|
||||
@click="ParamsStation(false)"
|
||||
style="
|
||||
width: 225px;
|
||||
@ -265,7 +258,7 @@
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="editcancel">取 消</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 添加在线客服对话框 -->
|
||||
@ -282,7 +275,7 @@
|
||||
prop="groupQrCodeInfoDTOList[0].groupName"
|
||||
>
|
||||
<el-input
|
||||
maxLength="50"
|
||||
maxLength="50"
|
||||
style="width: 225px"
|
||||
v-model="item.groupName"
|
||||
placeholder="请输入群名称"
|
||||
@ -483,6 +476,7 @@ import {
|
||||
updateGroupQrCodeInfo,
|
||||
} from "@/api/system/groupQrCodeInfo";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import { updatePicture } from "@/api/system/station";
|
||||
export default {
|
||||
components: { stationAcatar },
|
||||
name: "GroupQrCodeInfo",
|
||||
@ -537,6 +531,8 @@ export default {
|
||||
nurseStationshow: false,
|
||||
stationid: "",
|
||||
editopen: false,
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
imgone: "",
|
||||
// 表单参数
|
||||
form: {
|
||||
groupQrCodeInfoDTOList: [],
|
||||
@ -544,6 +540,8 @@ export default {
|
||||
nurseStationName: "请选择所属护理站",
|
||||
},
|
||||
homenumber: false,
|
||||
// deletNewImgs: [],
|
||||
objitem: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
groupQrCodeInfoDTOList: {
|
||||
@ -661,10 +659,18 @@ export default {
|
||||
this.total4 = res.total;
|
||||
});
|
||||
},
|
||||
// 设置修改的图片地址
|
||||
setUpdateImgUrl(e){
|
||||
this.form.groupQrCodeUrl= e;
|
||||
console.log(this.form);
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
console.log(this.form)
|
||||
this.$set(this.form,"groupQrCodeInfoDTOList",[])
|
||||
this.form.groupQrCodeInfoDTOList.forEach((e) => {
|
||||
this.$set(e, "groupQrCodeUrl", imgUrl);
|
||||
});
|
||||
|
||||
},
|
||||
/** 查询在线客服列表 */
|
||||
getList() {
|
||||
@ -677,11 +683,29 @@ export default {
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
editcancel() {
|
||||
this.editopen = false;
|
||||
if (this.editopen) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.groupQrCodeUrl != this.imgone) {
|
||||
obj.pictureUrlList.push(this.form.groupQrCodeUrl);
|
||||
}
|
||||
console.log(obj);
|
||||
updatePicture(obj).then((res) => {
|
||||
this.editopen = false;
|
||||
});
|
||||
}
|
||||
if (this.open) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.groupQrCodeInfoDTOList) {
|
||||
this.form.groupQrCodeInfoDTOList.forEach((e) => {
|
||||
obj.pictureUrlList.push(e.groupQrCodeUrl);
|
||||
});
|
||||
}
|
||||
updatePicture(obj).then((res) => {
|
||||
this.open = false;
|
||||
});
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
}
|
||||
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
@ -742,7 +766,9 @@ export default {
|
||||
const id = row.id || this.ids;
|
||||
getGroupQrCodeInfo(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.imgone = this.form.groupQrCodeUrl;
|
||||
this.form.nurseStationId = response.data.nurseStationId;
|
||||
|
||||
this.editopen = true;
|
||||
this.title = "修改在线客服";
|
||||
});
|
||||
@ -753,6 +779,12 @@ export default {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateGroupQrCodeInfo(this.form).then((response) => {
|
||||
if (this.form.groupQrCodeUrl != this.imgone) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.editopen = false;
|
||||
this.getList();
|
||||
|
||||
@ -304,6 +304,10 @@ export default {
|
||||
this.items.posterPictureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
if(this.types == "certificateUrl"){
|
||||
this.items.certificateUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
this.openimg = false;
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user