This commit is contained in:
曹辉 2023-03-06 10:28:08 +08:00
parent 5d28818c39
commit 5b38b79616

View File

@ -25,31 +25,18 @@
/>
</el-form-item>
<el-form-item label="客服类型" prop="customerServiceType">
<el-select
clearable
v-model="queryParams.customerServiceType"
placeholder="请选择客服类型"
>
<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-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-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>
@ -62,8 +49,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['system:groupQrCodeInfo:add']"
>新增</el-button
>
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -74,8 +60,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:groupQrCodeInfo:edit']"
>修改</el-button
>
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -86,8 +71,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:groupQrCodeInfo:remove']"
>删除</el-button
>
>删除</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
@ -99,11 +83,8 @@
v-hasPermi="['system:groupQrCodeInfo:export']"
>导出</el-button
>
</el-col> -->
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
@ -117,28 +98,20 @@
<el-table-column label="群名称" align="center" prop="groupName" />
<el-table-column label="群编号" align="center" prop="groupCode" />
<!-- <el-table-column label="群二维码存放路径" align="center" prop="groupQrCodeUrl" /> -->
<el-table-column
label="客服类型"
align="center"
prop="customerServiceType"
>
<el-table-column label="客服类型" align="center" prop="customerServiceType">
<template slot-scope="scope">
{{
scope.row.customerServiceType == "NURSE_AGENCY_CUSTOMER"
? "护理机构客服"
: ""
scope.row.customerServiceType == "NURSE_AGENCY_CUSTOMER"
? "护理机构客服"
: ""
}}
{{
scope.row.customerServiceType == "SYSTEM_CUSTOMER" ? "系统客服" : ""
scope.row.customerServiceType == "SYSTEM_CUSTOMER" ? "系统客服" : ""
}}
</template>
</el-table-column>
<el-table-column label="展示顺序" align="center" prop="groupSort" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -146,16 +119,14 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:groupQrCodeInfo:edit']"
>修改</el-button
>
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:groupQrCodeInfo:remove']"
>删除</el-button
>
>删除</el-button>
</template>
</el-table-column>
</el-table>
@ -178,7 +149,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="群名称" prop="groupName">
<el-input
maxLength="50"
maxlength="50"
style="width: 225px"
v-model="form.groupName"
placeholder="请输入群名称"
@ -192,18 +163,13 @@
/>
</el-form-item>
<el-form-item label="客服类型" prop="customerServiceType">
<el-select
style="width: 225px"
v-model="form.customerServiceType"
placeholder="请选择客服类型"
>
<el-select style="width: 225px" v-model="form.customerServiceType" placeholder="请选择客服类型">
<el-option
v-for="item in option"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
></el-option>
</el-select>
</el-form-item>
<el-form-item
@ -224,8 +190,7 @@
color: #c0c4cc;
"
v-if="form.nurseStationName == '请选择所属护理站'"
>{{ form.nurseStationName }}</el-button
>
>{{ form.nurseStationName }}</el-button>
<el-button
type
style="
@ -238,8 +203,7 @@
"
@click="ParamsStation(false)"
v-else
>{{ form.nurseStationName }}</el-button
>
>{{ form.nurseStationName }}</el-button>
</template>
</el-form-item>
<el-form-item label="展示顺序" prop="groupSort">
@ -248,7 +212,7 @@
v-model.number="form.groupSort"
placeholder="请输入群二维码展示顺序"
oninput="value=value.replace(/[^\d]/g,'')"
maxLength="5"
maxlength="5"
/>
</el-form-item>
<!-- </div> -->
@ -273,7 +237,7 @@
prop="groupQrCodeInfoDTOList[0].groupName"
>
<el-input
maxLength="50"
maxlength="50"
style="width: 225px"
v-model="item.groupName"
placeholder="请输入群名称"
@ -284,11 +248,7 @@
prop="groupQrCodeInfoDTOList[0].groupQrCodeUrl"
:rules="rules.groupQrCodeInfoDTOList.groupQrCodeUrl"
>
<stationAcatar
@imgUrl="imgUrl"
:img="item.groupQrCodeUrl"
:type="'groupQrCodeUrl'"
/>
<stationAcatar @imgUrl="imgUrl" :img="item.groupQrCodeUrl" :type="'groupQrCodeUrl'" />
</el-form-item>
<el-form-item
label="客服类型"
@ -305,8 +265,7 @@
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
></el-option>
</el-select>
</el-form-item>
<el-form-item
@ -329,8 +288,7 @@
color: #c0c4cc;
"
v-if="item.nurseStationName == '请选择所属护理站'"
>{{ item.nurseStationName }}</el-button
>
>{{ item.nurseStationName }}</el-button>
<el-button
type
style="
@ -343,8 +301,7 @@
"
@click="ParamsStation(true)"
v-else
>{{ item.nurseStationName }}</el-button
>
>{{ item.nurseStationName }}</el-button>
</template>
</el-form-item>
<el-form-item
@ -355,7 +312,7 @@
<el-input
style="width: 225px"
oninput="value=value.replace(/[^\d]/g,'')"
maxLength="5"
maxlength="5"
v-model.number="item.groupSort"
placeholder="请输入群二维码展示顺序"
/>
@ -376,42 +333,19 @@
append-to-body
:before-close="clicknurseStationshow"
>
<el-form
ref="form"
:model="getListByUserquery"
label-width="110px"
:inline="true"
>
<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-input v-model="getListByUserquery.nurseStationCode" placeholder="请输入护理站编码" />
</el-form-item>
<el-form-item label="护理站名称" prop="nurseStationName">
<el-input
v-model="getListByUserquery.nurseStationName"
placeholder="请输入护理站名称"
/>
<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-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 v-loading="loading" :data="nurseStationlist" @cell-dblclick="choicestationid">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
@ -430,21 +364,9 @@
></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="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="护理站地址"
@ -471,7 +393,7 @@ import {
getGroupQrCodeInfo,
delGroupQrCodeInfo,
addGroupQrCodeInfo,
updateGroupQrCodeInfo,
updateGroupQrCodeInfo
} from "@/api/system/groupQrCodeInfo";
import stationAcatar from "../stationAvatar/index.vue";
import { updatePicture } from "@/api/system/station";
@ -486,18 +408,18 @@ export default {
ids: [],
getListByUserquery: {
pageNum: 1,
pageSize: 10,
pageSize: 10
},
nurseStationlist: [],
option: [
{
value: "NURSE_AGENCY_CUSTOMER",
label: "护理机构客服",
label: "护理机构客服"
},
{
value: "SYSTEM_CUSTOMER",
label: "系统客服",
},
label: "系统客服"
}
],
value: "",
//
@ -524,7 +446,7 @@ export default {
groupCode: null,
groupQrCodeUrl: null,
customerServiceType: null,
groupSort: null,
groupSort: null
},
nurseStationshow: false,
stationidIndex: "",
@ -535,7 +457,7 @@ export default {
form: {
groupQrCodeInfoDTOList: [],
nurseStationId: null,
nurseStationName: "请选择所属护理站",
nurseStationName: "请选择所属护理站"
},
homenumber: false,
// deletNewImgs: [],
@ -547,66 +469,66 @@ export default {
{
required: true,
message: "请输入名称",
trigger: "blur",
},
trigger: "blur"
}
],
groupSort: [
{
required: true,
message: "请输入排序",
trigger: "blur",
},
trigger: "blur"
}
],
groupQrCodeUrl: [
{
required: true,
message: "请选择上传图片",
trigger: "blur",
},
trigger: "blur"
}
],
customerServiceType: [
{
required: true,
message: "请选择客服类型",
trigger: "blur",
},
trigger: "blur"
}
],
nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
{ required: true, message: "请选择所属护理站", trigger: "blur" }
]
},
groupName: [
{
required: true,
message: "请输入名称",
trigger: "blur",
},
trigger: "blur"
}
],
groupSort: [
{
required: true,
message: "请输入排序",
trigger: "blur",
},
trigger: "blur"
}
],
groupQrCodeUrl: [
{
required: true,
message: "请选择上传图片",
trigger: "blur",
},
trigger: "blur"
}
],
customerServiceType: [
{
required: true,
message: "请选择客服类型",
trigger: "blur",
},
trigger: "blur"
}
],
nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
},
{ required: true, message: "请选择所属护理站", trigger: "blur" }
]
}
};
},
created() {
@ -623,10 +545,8 @@ export default {
// this.form.groupQrCodeInfoDTOList[0].nurseStationId = item.id;
this.form.groupQrCodeInfoDTOList[0].nurseStationName =
item.nurseStationName;
this.form.nurseStationId = item.id;
this.form.groupQrCodeInfoDTOList[0].nurseStationId = item.id;
}
this.nurseStationshow = false;
this.stationcancel();
},
@ -634,7 +554,7 @@ export default {
stationcancel() {
this.getListByUserquery = {
pageNum: 1,
pageSize: 10,
pageSize: 10
};
this.info();
},
@ -644,14 +564,18 @@ export default {
},
//
ParamsStation(item) {
console.log(item,this.form.nurseStationId,'打印this.queryParams.nurseStationId')
console.log(
item,
this.form.nurseStationId,
"打印this.queryParams.nurseStationId"
);
this.info();
this.stationidIndex = this.form.nurseStationId ;
this.stationidIndex = this.form.nurseStationId;
this.nurseStationshow = true;
},
//list
info() {
getListByUser(this.getListByUserquery).then((res) => {
getListByUser(this.getListByUserquery).then(res => {
this.nurseStationlist = res.rows;
this.total4 = res.total;
});
@ -664,14 +588,14 @@ export default {
imgUrl(imgUrl) {
console.log(this.form);
// this.$set(this.form,"groupQrCodeInfoDTOList",[])
this.form.groupQrCodeInfoDTOList.forEach((e) => {
this.form.groupQrCodeInfoDTOList.forEach(e => {
this.$set(e, "groupQrCodeUrl", imgUrl);
});
},
/** 查询在线客服列表 */
getList() {
this.loading = true;
listGroupQrCodeInfo(this.queryParams).then((response) => {
listGroupQrCodeInfo(this.queryParams).then(response => {
this.groupQrCodeInfoList = response.rows;
this.total = response.total;
this.loading = false;
@ -685,18 +609,18 @@ export default {
obj.pictureUrlList.push(this.form.groupQrCodeUrl);
}
console.log(obj);
updatePicture(obj).then((res) => {
updatePicture(obj).then(res => {
this.editopen = false;
});
}
if (this.open) {
var obj = { pictureUrlList: [] };
if (this.form.groupQrCodeInfoDTOList) {
this.form.groupQrCodeInfoDTOList.forEach((e) => {
this.form.groupQrCodeInfoDTOList.forEach(e => {
obj.pictureUrlList.push(e.groupQrCodeUrl);
});
}
updatePicture(obj).then((res) => {
updatePicture(obj).then(res => {
this.open = false;
});
this.imgsurl = { pictureUrlList: [] };
@ -715,9 +639,9 @@ export default {
groupQrCodeUrl: null,
customerServiceType: null,
groupSort: null,
nurseStationName: "请选择所属护理站",
},
],
nurseStationName: "请选择所属护理站"
}
]
};
this.resetForm("form");
},
@ -733,7 +657,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.ids = selection.map(item => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@ -748,9 +672,9 @@ export default {
groupSort: null,
customerServiceType: null,
nurseStationName: "请选择所属护理站",
groupQrCodeUrl: null,
},
],
groupQrCodeUrl: null
}
]
};
this.open = true;
@ -761,7 +685,7 @@ export default {
// this.form.nurseStationId = response.data.nurseStationId;
this.reset();
const id = row.id || this.ids;
getGroupQrCodeInfo(id).then((response) => {
getGroupQrCodeInfo(id).then(response => {
console.log(response.data);
this.form = response.data;
@ -775,14 +699,14 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateGroupQrCodeInfo(this.form).then((response) => {
updateGroupQrCodeInfo(this.form).then(response => {
if (this.form.groupQrCodeUrl != this.imgone) {
var obj = { pictureUrlList: [] };
obj.pictureUrlList.push(this.imgone);
updatePicture(obj).then((res) => {});
updatePicture(obj).then(res => {});
}
this.$modal.msgSuccess("修改成功");
@ -790,7 +714,7 @@ export default {
this.getList();
});
} else {
addGroupQrCodeInfo(this.form).then((response) => {
addGroupQrCodeInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -804,7 +728,7 @@ export default {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除在线客服编号为"' + ids + '"的数据项?')
.then(function () {
.then(function() {
return delGroupQrCodeInfo(ids);
})
.then(() => {
@ -818,11 +742,11 @@ export default {
this.download(
"system/groupQrCodeInfo/export",
{
...this.queryParams,
...this.queryParams
},
`groupQrCodeInfo_${new Date().getTime()}.xlsx`
);
},
},
}
}
};
</script>