Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
闫晓茹 2024-07-08 11:05:23 +08:00
commit 2aa010c4e8
5 changed files with 217 additions and 816 deletions

View File

@ -57,7 +57,11 @@
<script>
import { listOperationNum } from "@/api/operationInfo/operationInfo";
import {
listWechatTemplateNum,
} from "@/api/manage/template";
import { listScriptNum } from "@/api/manage/script";
import { listMessageNum } from "@/api/manage/message";
export default {
props: ['methods'],
name: "DepartmentList",
@ -174,6 +178,10 @@ export default {
method = listOperationNum(this.querydepartmen)
} else if (this.methods == 'listScriptNum') {
method = listScriptNum(this.querydepartmen)
} else if (this.methods == 'listWechatTemplateNum') {
method = listWechatTemplateNum(this.querydepartmen)
} else if (this.methods == 'listMessageNum') {
method = listMessageNum(this.querydepartmen)
}
method.then(response => {
this.DepartmentoList = response.data.deptNumList;

View File

@ -2,24 +2,8 @@
<div class="app-container" ref="layout">
<el-row :gutter="20">
<el-col :span="5">
<div class="leftmessage" ref="box">
<div class="name">科室名称</div>
<div>
<el-input v-model="name" placeholder="请输入科室名称" clearable @keyup.enter.native="handleQuery" />
</div>
<div class="listitem">
<div :class="itemname == null ? 'allactive' : 'all'" @click="itemdata()">
全部
</div>
<span class="count">{{ count }}</span>
</div>
<div class="listitem" v-for="(item, index) in DepartmentoList" :key="index" @click="itemdata(item)">
<div :class="itemname == item.id ? 'allactive' : 'all'">
{{ item.departmentName }}
</div>
<span class="count">{{ item.countNum }}</span>
</div>
</div>
<DepartmentList ref="DepartmentList" @clickdepartment="clickdepartment" :methods="'listMessageNum'">
</DepartmentList>
</el-col>
<el-col :span="19" :xs="24">
<div ref="topform" class="form">
@ -29,7 +13,6 @@
<el-input v-model="queryParams.textMessageName" placeholder="请输入微信模版名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="模板ID" prop="textMessageId">
<el-input v-model="queryParams.textMessageId" placeholder="请输入模板ID" clearable
@keyup.enter.native="handleQuery" />
@ -40,7 +23,6 @@
</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>
@ -53,7 +35,6 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['manage:template:add']">新增短信模版</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</div>
@ -62,49 +43,30 @@
@selection-change="handleSelectionChange">
<el-table-column type="index" width="55" align="center" label="序号" />
<el-table-column label="短信模板名称" align="center" prop="textMessageName" :show-overflow-tooltip="true" />
<el-table-column label="短信ID" align="center" prop="textMessageId" :show-overflow-tooltip="true" />
<el-table-column label="短信内容" align="center" prop="textMessageContent" :show-overflow-tooltip="true" />
<el-table-column :show-overflow-tooltip="true" label="适用任务类型" align="center" prop="suitTaskTypeName">
<template slot-scope="scope">
{{
scope.row.suitTaskTypeName != "null"
? scope.row.suitTaskTypeName
: ""
}}
{{ scope.row.suitTaskTypeName != "null" ? scope.row.suitTaskTypeName : "" }}
</template>
</el-table-column>
<el-table-column label="短信通道" align="center" prop="textMessageChannel">
<template slot-scope="scope">
{{
scope.row.textMessageChannel == "WATER_DROPLET_PLATFORM"
? "水滴平台"
: ""
}}
{{ scope.row.textMessageChannel == "WATER_DROPLET_PLATFORM" ? "水滴平台" : "" }}
</template>
</el-table-column>
<el-table-column label="短信状态" align="right" prop="textMessageStatus" width="90px">
<!-- <template slot-scope="scope">
{{ scope.row.textMessageStatus == "GROUNDING" ? "上架" : "" }}
{{ scope.row.textMessageStatus == "OFF_SHELF" ? "下架" : "" }}
</template> -->
<template slot-scope="scope">
<span slot="reference" v-if="scope.row.textMessageStatus == 'GROUNDING'">
<i class="dotClass" style="background-color: springgreen"></i>上架
</span>
<span slot="reference" v-if="scope.row.textMessageStatus == 'OFF_SHELF'">
<i class="dotClass" style="background-color: red"></i>下架
</span>
<el-tag v-if="scope.row.textMessageStatus == 'GROUNDING'" type="success"> 上架 </el-tag>
<el-tag v-if="scope.row.textMessageStatus == 'OFF_SHELF'" type="danger"> 下架 </el-tag>
</template>
</el-table-column>
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" />
<!-- <el-table-column
label="短信排序"
align="center"
prop="textMessageSort"
/> -->
<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)"
@ -135,9 +97,9 @@
<el-input-number v-model="form.textMessageSort" controls-position="right" :min="0" placeholder="请输入短信排序"
style="width: 350px" />
</el-form-item>
<el-form-item label="短信内容" prop="textMessageContent">
<el-input v-model="form.textMessageContent" placeholder="请输入短信内容" type="textarea" maxlength="300" :rows="10" />
<el-input v-model="form.textMessageContent" placeholder="请输入短信内容" type="textarea" maxlength="300"
:rows="10" />
</el-form-item>
<el-form-item label="适用任务类型" prop="suitTaskTypeIds">
<el-select v-model="form.suitTaskTypeIds" placeholder="请选择适用任务类型" style="width: 350px" multiple>
@ -158,36 +120,22 @@
</el-select>
</el-form-item>
<el-form-item label="科室名称" prop="departmentId">
<el-button type="" v-if="departmentName == '请选择科室'" @click="clickinnerVisible()" style="
width: 350px;
<el-button type="" @click="clickinnerVisible()"
:style="form.departmentName == '请选择科室' ? 'color: #c0c4cc;' : ''" style="
width: 206px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
">{{ departmentName }}</el-button>
<el-button @click="clickinnerVisible()" type="" v-else style="
width: 350px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
">{{ departmentName }}</el-button>
">{{ form.departmentName }}</el-button>
</el-form-item>
<el-form-item label="病种名称" prop="diseaseTypeName">
<el-button type="" v-if="diseaseTypeName == '请选择病种'" @click="clickdisease()" style="
width: 350px;
<el-button type="" @click="clickdisease()" :style="form.diseaseTypeName == '请选择病种' ? 'color: #c0c4cc;' : ''"
style="
width: 206px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
">{{ diseaseTypeName }}</el-button>
<el-button @click="clickdisease()" type="" v-else style="
width: 350px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
">{{ diseaseTypeName }}</el-button>
">{{ form.diseaseTypeName }}</el-button>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -202,13 +150,11 @@
<el-form-item label="科室名称" prop="departmentName" label-width="120">
<el-input v-model="informationqueryParams.departmentName" placeholder="请输入科室名称" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="informationInfoinfo">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="addresetQuerylist">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="infolist" @cell-dblclick="nurseclick" v-loading="loading">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
@ -231,13 +177,11 @@
<el-form-item label="病种名称" prop="diseaseTypeName" label-width="120">
<el-input v-model="querydisease.diseaseTypeName" placeholder="请输入病种名称" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="infodisease">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetdisease">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="listdisease" @cell-dblclick="nurseclickdisease" v-loading="loading">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
@ -257,49 +201,31 @@
</el-dialog>
</div>
</template>
<script>
import { listMessage, getMessage, delMessage, addMessage, updateMessage, listMessageNum } from "@/api/manage/message";
import { typelist } from "@/api/manage/template";
import { department, listDisease } from "@/api/manage/script";
import DepartmentList from '../../components/DepartmentList.vue'
export default {
components: { DepartmentList },
name: "Template",
data() {
return {
obj: null,
itemname: null,
departmentName: null,
diseaseTypeName: null,
name: '',
departmentId: null,
count: '',//
DepartmentoList: [],//
//
querydepartmen: {
departmentName: "",
// pageNum: 1,
// pageSize: 10,
},
optionstext: [{
value: 'GROUNDING',
label: '上架'
},
{
value: 'OFF_SHELF',
label: '下架'
}],
options: [{
value: 'WATER_DROPLET_PLATFORM',
label: '水滴平台'
},],
type: [],//
innerVisibleshow: false, //
//
informationqueryParams: {
@ -309,7 +235,6 @@ export default {
},
infolist: [],
totaldepartment: 0,
diseaseshowst: false,//
querydisease: {
pageNum: 1,
@ -371,19 +296,15 @@ export default {
textMessageContent: [
{ required: true, message: "短信内容不能为空", trigger: "blur" }
],
textMessageChannel: [
{ required: true, message: "短信通道不能为空", trigger: "blur" }
],
textMessageStatus: [
{ required: true, message: "短信状态不能为空", trigger: "blur" }
],
departmentId: [
{ required: true, message: "所属科室名称不能为空", trigger: "blur" }
],
}
};
},
@ -392,10 +313,6 @@ export default {
this.screenChange()
},
watch: {
name(val) {
this.querydepartmen.departmentName = val
this.Departmentlist();
},
'form.textMessageSort'(val) {
if (val) {
var name = ''
@ -409,14 +326,22 @@ export default {
// }
}
}
},
created() {
this.getList();
this.Departmentlist();
this.typelistdata();
},
methods: {
//
clickdepartment(item) {
this.queryParams.hospitalAgencyId = item.hospitalAgencyId
this.queryParams.departmentId = item.itemid
this.departmentName = item.itemName
this.informationqueryParams.hospitalAgencyId = item.hospitalAgencyId
if (item.hospitalAgencyId) {
this.getList();
}
},
/** 查询微信模板信息列表 */
getList() {
this.loading = true;
@ -431,57 +356,15 @@ export default {
var dictType = "suit_task_type"
typelist(dictType).then(response => {
this.type = response.data
})
},
//
change(e) {
// this.form.suitTaskTypeName = this.type.find(f => f.dictCode == e).dictLabel
},
//
Departmentlist() {
this.loading = true;
listMessageNum(this.querydepartmen).then(response => {
this.DepartmentoList = response.data;
let sum = 0;
this.DepartmentoList.forEach((item) => {
if (item.countNum != null) {
console.log(item.countNum)
sum += item.countNum;
}
this.count = sum;
});
this.loading = false;
});
},
//
itemdata(item) {
if (item) {
console.log(item, '9999')
this.itemname = item.id
this.departmentName = item.departmentName
this.loading = true;
this.queryParams.departmentId = item.id
this.getList()
} else {
this.queryParams.departmentId = ''
this.itemname = null
this.getList()
}
},
//
clickinnerVisible() {
this.innerVisibleshow = true;
if (this.itemname) {
this.informationqueryParams.departmentId = this.itemname
} else {
this.informationqueryParams.departmentId = null
}
this.informationInfoinfo();
},
//
@ -508,14 +391,11 @@ export default {
nurseclick(row) {
this.form.departmentId = row.id;
this.departmentName = row.departmentName;
this.form.departmentName = row.departmentName;
this.form.diseaseTypeId = '';
this.diseaseTypeName = '请选择病种';
console.log(this.departmentName, '0000')
this.form.diseaseTypeName = '请选择病种';
this.innerVisibleshow = false;
},
//
infodisease() {
listDisease(this.querydisease).then((response) => {
@ -526,12 +406,9 @@ export default {
},
//
clickdisease() {
console.log(this.form)
if (this.departmentName == '请选择科室') {
this.$modal.msgError("请先选择科室");
} else {
console.log(this.departmentName, '00000')
this.diseaseshowst = true;
this.querydisease.departmentId = this.form.departmentId
this.infodisease()
@ -540,10 +417,8 @@ export default {
//
nurseclickdisease(row) {
this.form.diseaseTypeId = row.id;
this.diseaseTypeName = row.diseaseTypeName;
this.form.diseaseTypeName = row.diseaseTypeName;
this.diseaseshowst = false;
console.log(this.diseaseTypeName, '1121000')
},
//
resetdisease() {
@ -553,7 +428,6 @@ export default {
};
this.infodisease()
},
canceldiseases() {
this.diseaseshowst = false;
},
@ -593,7 +467,9 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.queryParams.departmentId = null;
this.itemname = null;
this.informationqueryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
this.queryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
this.$refs.DepartmentList.resetQuery()
this.resetForm("queryForm");
this.handleQuery();
},
@ -606,47 +482,27 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
console.log(this.form)
if (this.itemname) {
this.form.departmentName = this.departmentName
this.form.departmentId = this.itemname
} else if (this.itemname == null) {
this.departmentName = "请选择科室"
}
else {
this.departmentName = "请选择科室"
}
this.diseaseTypeName = "请选择病种"
this.open = true;
this.form.diseaseTypeName = "请选择病种"
this.title = "新增短信模版";
this.open = true;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
// this.getDisease();
getMessage(id).then(response => {
this.form = response.data;
if (!response.data.diseaseTypeName || response.data.diseaseTypeName == "") {
this.diseaseTypeName = "请选择病种"
} else {
this.diseaseTypeName = response.data.diseaseTypeName
}
this.departmentName = response.data.departmentName
this.form.suitTaskTypeIds = response.data.suitTaskTypeIds
if (!this.form.textMessageSort) {
this.form.textMessageSort = undefined
}
this.open = true;
this.title = "修改短信模板信息";
});
},
/** 提交按钮 */
submitForm() {
console.log(this.form)
this.form.hospitalAgencyId = this.queryParams.hospitalAgencyId
this.$refs["form"].validate(valid => {
if (valid) {
if (this.obj.length > 10) {
@ -655,43 +511,25 @@ export default {
message: "短信排序最大长度为十位,请正确输入!"
});
} else {
if (!this.form.diseaseTypeId) {
this.form.diseaseTypeName = ''
}
if (this.form.id != null) {
this.form.departmentName = this.departmentName
if (this.diseaseTypeName == "请选择病种") {
this.form.diseaseTypeName = null
} else {
this.form.diseaseTypeName = this.diseaseTypeName
}
updateMessage(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.$refs.DepartmentList.Departmentlist()
});
} else {
if (this.diseaseTypeName == "请选择病种") {
this.form.diseaseTypeName = null
} else {
this.form.diseaseTypeName = this.diseaseTypeName
}
if (this.itemname) {
this.form.departmentName = this.departmentName
this.form.departmentId = this.itemname
} else {
this.form.departmentName = this.departmentName
}
addMessage(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.Departmentlist();
this.$refs.DepartmentList.Departmentlist()
});
}
}
}
});
},
@ -702,8 +540,8 @@ export default {
return delMessage(ids);
}).then(() => {
this.getList();
this.Departmentlist();
this.$modal.msgSuccess("删除成功");
this.$refs.DepartmentList.Departmentlist()
}).catch(() => { });
},
/** 导出按钮操作 */

View File

@ -31,7 +31,6 @@
</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>
@ -51,16 +50,15 @@
<el-table :max-height="maxTableHeight" v-loading="loading" :data="scriptList"
@selection-change="handleSelectionChange">
<el-table-column label="序号" align="center" prop="sort" type="index" />
<el-table-column label="通用话术名称" align="center" prop="commonScriptName" :show-overflow-tooltip="true" />
<el-table-column label="话术名称" align="center" prop="scriptName" :show-overflow-tooltip="true" />
<el-table-column label="话术ID" align="center" prop="scriptId" :show-overflow-tooltip="true" />
<el-table-column label="平台ID" align="center" prop="platformId" :show-overflow-tooltip="true" />
<el-table-column label="话术状态" align="center" prop="scriptStatus">
<template slot-scope="scope">
{{ scope.row.scriptStatus == "NORMAL" ? "正常" : "" }}
{{ scope.row.scriptStatus == "OFF_SHELF" ? "下架" : "" }}
{{ scope.row.scriptStatus == "SUSPEND" ? "暂停" : "" }}
<el-tag v-if="scope.row.scriptStatus == 'NORMAL'" type="success"> 正常 </el-tag>
<el-tag v-if="scope.row.scriptStatus == 'OFF_SHELF'" type="danger"> 下架 </el-tag>
<el-tag v-if="scope.row.scriptStatus == 'SUSPEND'" type="info"> 暂停 </el-tag>
</template>
</el-table-column>
<el-table-column label="话术简介" align="center" prop="scriptIntroduction" :show-overflow-tooltip="true" />
@ -111,41 +109,27 @@
</el-form-item>
<el-form-item label="话术状态" prop="platformId" v-if="title == '修改话术信息'">
<el-select v-model="form.scriptStatus" placeholder="请选择" style="width: 206px">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
<el-option v-for=" item in options " :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="科室名称" prop="departmentId">
<el-button type="" v-if="departmentName == '请选择科室'" @click="clickinnerVisible()" style="
<el-button type="" @click="clickinnerVisible()"
:style="form.departmentName == '请选择科室' ? 'color: #c0c4cc;' : ''" style="
width: 206px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
">{{ departmentName }}</el-button>
<el-button @click="clickinnerVisible()" type="" v-else style="
width: 206px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
">{{ departmentName }}</el-button>
">{{ form.departmentName }}</el-button>
</el-form-item>
<el-form-item label="病种名称" prop="diseaseTypeName">
<el-button type="" v-if="diseaseTypeName == '请选择病种'" @click="clickdisease()" style="
<el-button type="" @click="clickdisease()" :style="form.diseaseTypeName == '请选择病种' ? 'color: #c0c4cc;' : ''"
style="
width: 206px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
">{{ diseaseTypeName }}</el-button>
<el-button @click="clickdisease()" type="" v-else style="
width: 206px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
">{{ diseaseTypeName }}</el-button>
">{{ form.diseaseTypeName }}</el-button>
</el-form-item>
<el-form-item label="话术简介" prop="scriptIntroduction">
<el-input maxlength="200" v-model="form.scriptIntroduction" placeholder="请输入话术简介" type="textarea" />
@ -236,13 +220,8 @@ export default {
data() {
return {
obj: null,
itemname: null,
departmentName: null,
diseaseTypeName: null,
name: '',
departmentId: null,
count: '',//
sumcount: '',
innerVisibleshow: false, //
//
informationqueryParams: {
@ -293,12 +272,8 @@ export default {
DepartmentoList: [],
//
title: "",
//
titlemanagement: '',
//
open: false,
//
openmanagement: false,
//
queryParams: {
pageNum: 1,
@ -316,11 +291,6 @@ export default {
scriptSort: null,
scriptRemark: null,
},
querydepartmen: {
departmentName: "",
// pageNum: 1,
// pageSize: 10,
},
//
form: {
id: null,
@ -342,12 +312,6 @@ export default {
updateBy: null,
updateTime: null
},
formmanagement: {
departmentId: '',
departmentName: '',
diseaseTypeId: '',
diseaseTypeName: '',
},
//
rules: {
scriptSort: [
@ -477,11 +441,6 @@ export default {
//
clickinnerVisible() {
this.innerVisibleshow = true;
if (this.itemname) {
this.informationqueryParams.departmentId = this.itemname
} else {
this.informationqueryParams.departmentId = null
}
this.informationInfoinfo();
},
//
@ -501,13 +460,13 @@ export default {
this.totaldepartment = response.total;
this.loading = false;
});
// this.informationqueryParams.page = 1;
},
//
addresetQuerylist() {
this.informationqueryParams = {
pageNum: 1,
pageSize: 10,
hospitalAgencyId: this.queryParams.hospitalAgencyId
};
this.informationInfoinfo();
},
@ -517,9 +476,10 @@ export default {
//
nurseclick(row) {
this.form.departmentId = row.id;
this.form.departmentName = row.departmentName;
this.departmentName = row.departmentName;
this.form.diseaseTypeId = '';
this.diseaseTypeName = '请选择病种';
this.form.diseaseTypeName = '请选择病种';
this.innerVisibleshow = false;
},
//
@ -532,24 +492,23 @@ export default {
},
//
clickdisease() {
if (this.departmentName == '请选择科室') {
if (this.form.departmentName == '请选择科室') {
this.$modal.msgError("请先选择科室");
} else {
this.diseaseshowst = true;
this.querydisease.departmentId = this.form.departmentId
this.infodisease()
this.diseaseshowst = true;
}
},
//
nurseclickdisease(row) {
// this.diseaseshowst = false;
this.form.diseaseTypeId = row.id;
this.diseaseTypeName = row.diseaseTypeName;
this.form.diseaseTypeName = row.diseaseTypeName;
this.diseaseshowst = false;
},
//
resetdisease() {
querydisease = {
this.querydisease = {
pageNum: 1,
pageSize: 10,
};
@ -572,10 +531,6 @@ export default {
this.open = false;
this.reset();
},
//
cancelmanagement() {
this.openmanagement = false;
},
//
reset() {
this.form = {
@ -608,8 +563,6 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.departmentId = null;
this.itemname = null;
this.queryParams = {
pageNum: 1,
pageSize: 10,
@ -625,9 +578,12 @@ export default {
scriptIntroduction: null,
scriptSort: null,
scriptRemark: null,
hospitalAgencyId: JSON.parse(localStorage.getItem('user')).hospitalAgencyId
}
this.informationqueryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
this.$refs.DepartmentList.resetQuery()
this.resetForm("queryForm");
this.getList();
this.handleQuery();
},
//
handleSelectionChange(selection) {
@ -638,31 +594,22 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
if (this.itemname) {
if (this.queryParams.departmentId) {
this.form.departmentName = this.departmentName
this.form.departmentId = this.itemname
} else if (this.itemname == null) {
this.departmentName = "请选择科室"
this.form.departmentId = this.queryParams.departmentId
} else {
this.form.departmentName = '请选择科室'
}
else {
this.departmentName = "请选择科室"
}
this.diseaseTypeName = "请选择病种"
this.open = true;
this.form.diseaseTypeName = "请选择病种";
this.title = "添加话术信息";
// this.getDisease();
// }
this.open = true;
},
//
getDisease() {
departmentDisease(this.queryDisease).then(response => {
this.optionsDisease = response.rows
})
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -671,21 +618,17 @@ export default {
// this.getDisease();
getScript(id).then(response => {
this.form = response.data;
if (!response.data.diseaseTypeName || response.data.diseaseTypeName == "") {
this.diseaseTypeName = "请选择病种"
} else {
this.diseaseTypeName = response.data.diseaseTypeName
}
this.departmentName = response.data.departmentName
if (!this.form.scriptSort) {
this.form.scriptSort = undefined
}
this.open = true;
this.title = "修改话术信息";
this.open = true;
});
},
/** 提交按钮 */
submitForm() {
this.form.hospitalAgencyId = this.queryParams.hospitalAgencyId
this.$refs["form"].validate(valid => {
if (valid) {
if (this.obj.length > 10) {
@ -694,15 +637,10 @@ export default {
message: "话术排序最大长度为十位,请正确输入!"
});
} else {
if (!this.form.diseaseTypeId) {
this.form.diseaseTypeName = ''
}
if (this.form.id != null) {
this.form.departmentName = this.departmentName
// this.form.diseaseTypeName = this.diseaseTypeName
if (this.diseaseTypeName == "请选择病种") {
this.form.diseaseTypeName = null
} else {
this.form.diseaseTypeName = this.diseaseTypeName
}
updateScript(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
@ -710,20 +648,6 @@ export default {
this.$refs.DepartmentList.Departmentlist()
});
} else {
if (this.diseaseTypeName == "请选择病种") {
this.form.diseaseTypeName = null
} else {
this.form.diseaseTypeName = this.diseaseTypeName
}
if (this.itemname) {
this.form.departmentName = this.departmentName
this.form.departmentId = this.itemname
} else {
this.form.departmentName = this.departmentName
}
// console.log(this.form,'this.form')
// return
addScript(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
@ -743,6 +667,7 @@ export default {
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$refs.DepartmentList.Departmentlist()
}).catch(() => { });
},
/** 导出按钮操作 */

View File

@ -2,321 +2,115 @@
<div class="app-container" ref="layout">
<el-row :gutter="20">
<el-col :span="5">
<div class="left" ref="box">
<div class="name">科室名称</div>
<div>
<el-input
v-model="name"
placeholder="请输入科室名称"
clearable
@keyup.enter.native="handleQuery"
/>
</div>
<div class="listitem">
<div
:class="itemname == null ? 'allactive' : 'all'"
@click="itemdata()"
>
全部
</div>
<span class="count">{{ count }}</span>
</div>
<div
class="listitem"
v-for="(item, index) in DepartmentoList"
:key="index"
@click="itemdata(item)"
>
<div :class="itemname == item.id ? 'allactive' : 'all'">
{{ item.departmentName }}
</div>
<span class="count">{{ item.countNum }}</span>
</div>
</div>
<DepartmentList ref="DepartmentList" @clickdepartment="clickdepartment" :methods="'listWechatTemplateNum'">
</DepartmentList>
</el-col>
<el-col :span="19" :xs="24">
<div ref="topform" class="form">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item
label="微信模版名称"
prop="wechatTemplateName"
label-width="100px"
>
<el-input
v-model="queryParams.wechatTemplateName"
placeholder="请输入微信模版名称"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="微信模版名称" prop="wechatTemplateName" label-width="100px">
<el-input v-model="queryParams.wechatTemplateName" placeholder="请输入微信模版名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="模板ID" prop="templateId">
<el-input
v-model="queryParams.templateId"
placeholder="请输入模板ID"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.templateId" placeholder="请输入模板ID" 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-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>
</div>
<div ref="mb8" class="mb8">
<el-row :gutter="10" class="">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['manage:template:add']"
>新增微信模版</el-button
>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['manage:template:add']">新增微信模版</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</div>
<div ref="table">
<el-table
:max-height="maxTableHeight"
v-loading="loading"
:data="templateList"
@selection-change="handleSelectionChange"
>
<el-table-column
type="index"
width="52"
align="center"
label="序号"
/>
<el-table-column
label="微信模版名称"
align="center"
prop="wechatTemplateName"
/>
<el-table :max-height="maxTableHeight" v-loading="loading" :data="templateList"
@selection-change="handleSelectionChange">
<el-table-column type="index" width="52" align="center" label="序号" />
<el-table-column label="微信模版名称" align="center" prop="wechatTemplateName" />
<el-table-column label="模板ID" align="center" prop="templateId" />
<el-table-column
label="模板来源"
align="center"
prop="templateSource"
>
<el-table-column label="模板来源" align="center" prop="templateSource">
<template slot-scope="scope">
{{
scope.row.templateSource == "WE_CHAT_APPLET" ? "小程序" : ""
}}
{{
scope.row.templateSource == "WE_CHAT_OFFICIAL_ACCOUNT"
? "公众号"
: ""
}}
{{ scope.row.templateSource == "WE_CHAT_APPLET" ? "小程序" : "" }}
{{ scope.row.templateSource == "WE_CHAT_OFFICIAL_ACCOUNT" ? "公众号" : "" }}
</template>
</el-table-column>
<el-table-column
label="适用任务类型"
align="center"
prop="suitTaskTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="病种名称"
align="center"
prop="diseaseTypeName"
/>
<el-table-column
prop="templateContent"
label="模板内容"
align="center"
:show-overflow-tooltip="true"
>
<el-table-column label="适用任务类型" align="center" prop="suitTaskTypeName" :show-overflow-tooltip="true" />
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" />
<el-table-column prop="templateContent" label="模板内容" align="center" :show-overflow-tooltip="true">
</el-table-column>
<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"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['manage:template:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['manage:template:remove']"
>删除</el-button
>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:template:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:template:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" /> -->
<myPagination
v-show="total > 0"
:total="total"
:pageSize="queryParams.pageSize"
:indexFromWrap="queryParams.pageNum"
@updateCPage="updateCPage"
></myPagination>
<myPagination v-show="total > 0" :total="total" :pageSize="queryParams.pageSize"
:indexFromWrap="queryParams.pageNum" @updateCPage="updateCPage"></myPagination>
</el-col>
</el-row>
<!-- 添加或修改微信模板信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="微信模板名称" prop="wechatTemplateName">
<el-input
v-model="form.wechatTemplateName"
placeholder="请输入微信模板名称"
/>
<el-input v-model="form.wechatTemplateName" placeholder="请输入微信模板名称" />
</el-form-item>
<el-form-item
label="模板ID"
prop="templateId"
v-if="title == '修改微信模板'"
>
<el-input
v-model="form.templateId"
placeholder="请输入模板ID"
onKeyUp="value=value.replace(/[\W]/g,'')"
disabled
/>
<el-form-item label="模板ID" prop="templateId" v-if="title == '修改微信模板'">
<el-input v-model="form.templateId" placeholder="请输入模板ID" onKeyUp="value=value.replace(/[\W]/g,'')"
disabled />
</el-form-item>
<el-form-item label="微信排序" prop="templateSort">
<el-input-number
v-model="form.templateSort"
controls-position="right"
:min="0"
placeholder="请输入微信排序"
style="width: 350px"
/>
<el-input-number v-model="form.templateSort" controls-position="right" :min="0" placeholder="请输入微信排序"
style="width: 350px" />
</el-form-item>
<el-form-item label="模板内容" prop="templateContent">
<el-input
v-model="form.templateContent"
placeholder="请输入模板内容"
type="textarea"
maxlength="300"
:rows="10"
/>
<el-input v-model="form.templateContent" placeholder="请输入模板内容" type="textarea" maxlength="300" :rows="10" />
<!-- <editor v-model="form.templateContent" :min-height="192"/> -->
</el-form-item>
<el-form-item label="模板来源" prop="templateSource">
<el-select
v-model="form.templateSource"
placeholder="请选择"
style="width: 350px"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
<el-select v-model="form.templateSource" placeholder="请选择" style="width: 350px">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="适用数据类型" prop="suitTaskTypeId">
<el-select
v-model="form.suitTaskTypeIds"
placeholder="请选择"
style="width: 350px"
multiple
>
<el-option
v-for="item in type"
:key="item.dictCode"
:label="item.dictLabel"
:value="item.dictCode"
>
<el-select v-model="form.suitTaskTypeIds" placeholder="请选择" style="width: 350px" multiple>
<el-option v-for="item in type" :key="item.dictCode" :label="item.dictLabel" :value="item.dictCode">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="科室名称" prop="departmentId">
<el-button
type=""
v-if="departmentName == '请选择科室'"
@click="clickinnerVisible()"
style="
width: 350px;
<el-button type="" @click="clickinnerVisible()"
:style="form.departmentName == '请选择科室' ? 'color: #c0c4cc;' : ''" style="
width: 206px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ departmentName }}</el-button
>
<el-button
@click="clickinnerVisible()"
type=""
v-else
style="
width: 350px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ departmentName }}</el-button
>
">{{ form.departmentName }}</el-button>
</el-form-item>
<el-form-item label="病种名称" prop="diseaseTypeName">
<el-button
type=""
v-if="diseaseTypeName == '请选择病种'"
@click="clickdisease()"
<el-button type="" @click="clickdisease()" :style="form.diseaseTypeName == '请选择病种' ? 'color: #c0c4cc;' : ''"
style="
width: 350px;
width: 206px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ diseaseTypeName }}</el-button
>
<el-button
@click="clickdisease()"
type=""
v-else
style="
width: 350px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ diseaseTypeName }}</el-button
>
">{{ form.diseaseTypeName }}</el-button>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -325,161 +119,60 @@
</div>
</el-dialog>
<!-- 科室弹框 -->
<el-dialog
title=""
:visible.sync="innerVisibleshow"
width="1000px"
append-to-body
:before-close="innerVisiblecancel"
>
<el-form
ref="queryForm"
:model="informationqueryParams"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-dialog title="" :visible.sync="innerVisibleshow" width="1000px" append-to-body
:before-close="innerVisiblecancel">
<el-form ref="queryForm" :model="informationqueryParams" :rules="rules" label-width="80px" :inline="true">
<el-form-item label="科室名称" prop="departmentName" label-width="120">
<el-input
v-model="informationqueryParams.departmentName"
placeholder="请输入科室名称"
clearable
/>
<el-input v-model="informationqueryParams.departmentName" placeholder="请输入科室名称" clearable />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="informationInfoinfo"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="addresetQuerylist"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="informationInfoinfo">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="addresetQuerylist">重置</el-button>
</el-form-item>
</el-form>
<el-table
:data="infolist"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table :data="infolist" @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.departmentId == 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>
<el-button type="primary" style="width: 15px; height: 15px" v-if="form.departmentId == 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="departmentName"
label="科室名称"
align="center"
:show-overflow-tooltip="true"
>
<el-table-column property="departmentName" label="科室名称" align="center" :show-overflow-tooltip="true">
</el-table-column>
</el-table>
<myPagination
v-show="totaldepartment > 0"
:total="totaldepartment"
:pageSize="informationqueryParams.pageSize"
:indexFromWrap="informationqueryParams.pageNum"
@updateCPage="updateCPagetwo"
></myPagination>
<myPagination v-show="totaldepartment > 0" :total="totaldepartment" :pageSize="informationqueryParams.pageSize"
:indexFromWrap="informationqueryParams.pageNum" @updateCPage="updateCPagetwo"></myPagination>
<!-- <pagination v-show="totaldepartment > 0" :total="totaldepartment" :page.sync="informationqueryParams.pageNum"
:limit.sync="informationqueryParams.pageSize" @pagination="informationInfoinfo" /> -->
</el-dialog>
<!-- 病种弹框 -->
<el-dialog
title=""
:visible.sync="diseaseshowst"
width="1000px"
append-to-body
:before-close="canceldiseases"
>
<el-form
ref="queryForm"
:model="querydisease"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-dialog title="" :visible.sync="diseaseshowst" width="1000px" append-to-body :before-close="canceldiseases">
<el-form ref="queryForm" :model="querydisease" :rules="rules" label-width="80px" :inline="true">
<el-form-item label="病种名称" prop="diseaseTypeName" label-width="120">
<el-input
v-model="querydisease.diseaseTypeName"
placeholder="请输入病种名称"
clearable
/>
<el-input v-model="querydisease.diseaseTypeName" placeholder="请输入病种名称" clearable />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="infodisease"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetdisease"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="infodisease">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetdisease">重置</el-button>
</el-form-item>
</el-form>
<el-table
:data="listdisease"
@cell-dblclick="nurseclickdisease"
v-loading="loading"
>
<el-table :data="listdisease" @cell-dblclick="nurseclickdisease" 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.diseaseTypeId == scope.row.id"
circle
@click="nurseclickdisease(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclickdisease(scope.row)"
></el-button>
<el-button type="primary" style="width: 15px; height: 15px" v-if="form.diseaseTypeId == scope.row.id" circle
@click="nurseclickdisease(scope.row)"></el-button>
<el-button v-else style="width: 15px; height: 15px" circle
@click="nurseclickdisease(scope.row)"></el-button>
</template>
</el-table-column>
<el-table-column
property="diseaseTypeName"
label="病种名称"
align="center"
:show-overflow-tooltip="true"
>
<el-table-column property="diseaseTypeName" label="病种名称" align="center" :show-overflow-tooltip="true">
</el-table-column>
</el-table>
<!-- <pagination v-show="diseasetotal > 0" :total="diseasetotal" :page.sync="querydisease.pageNum"
:limit.sync="querydisease.pageSize" @pagination="infodisease" /> -->
<myPagination
v-show="diseasetotal > 0"
:total="diseasetotal"
:pageSize="querydisease.pageSize"
:indexFromWrap="querydisease.pageNum"
@updateCPage="updateCPagethree"
></myPagination>
<myPagination v-show="diseasetotal > 0" :total="diseasetotal" :pageSize="querydisease.pageSize"
:indexFromWrap="querydisease.pageNum" @updateCPage="updateCPagethree"></myPagination>
</el-dialog>
</div>
</template>
@ -491,12 +184,12 @@ import {
delTemplate,
addTemplate,
updateTemplate,
listWechatTemplateNum,
typelist,
} from "@/api/manage/template";
import { department, listDisease } from "@/api/manage/script";
import DepartmentList from '../../components/DepartmentList.vue'
export default {
components: { DepartmentList },
name: "Template",
data() {
//
@ -521,20 +214,9 @@ export default {
};
return {
obj: null,
count: "", //
maxTableHeight: undefined,
itemname: null,
departmentName: null,
diseaseTypeName: null,
name: "",
departmentId: null,
DepartmentoList: [], //
//
querydepartmen: {
departmentName: "",
// pageNum: 1,
// pageSize: 10,
},
options: [
{
value: "WE_CHAT_APPLET",
@ -564,7 +246,6 @@ export default {
},
listdisease: [],
diseasetotal: 0,
optionsDisease: [],
//
loading: false,
//
@ -603,7 +284,7 @@ export default {
//
rules: {
templateSort: [
{ required: true, message: "111111111111", trigger: "blur" },
{ required: true, message: "微信排序不能为空", trigger: "blur" },
],
wechatTemplateName: [
{ required: true, message: "微信模板名称不能为空", trigger: "blur" },
@ -624,10 +305,6 @@ export default {
};
},
watch: {
name(val) {
this.querydepartmen.departmentName = val;
this.Departmentlist();
},
"form.templateSort"(val) {
if (val) {
var name = "";
@ -644,7 +321,6 @@ export default {
},
created() {
this.getList();
this.Departmentlist();
this.typelistdata();
},
mounted() {
@ -652,6 +328,16 @@ export default {
this.screenChange();
},
methods: {
//
clickdepartment(item) {
this.queryParams.hospitalAgencyId = item.hospitalAgencyId
this.queryParams.departmentId = item.itemid
this.departmentName = item.itemName
this.informationqueryParams.hospitalAgencyId = item.hospitalAgencyId
if (item.hospitalAgencyId) {
this.getList();
}
},
/** 查询微信模板信息列表 */
getList() {
this.loading = true;
@ -672,47 +358,9 @@ export default {
change(e) {
// this.form.suitTaskTypeName=this.type.find(f=> f.dictCode==e).dictLabel
},
//
Departmentlist() {
this.loading = true;
listWechatTemplateNum(this.querydepartmen).then((response) => {
this.DepartmentoList = response.data;
let sum = 0;
this.DepartmentoList.forEach((item) => {
if (item.countNum != null) {
console.log(item.countNum);
sum += item.countNum;
}
this.count = sum;
});
this.loading = false;
});
},
//
itemdata(item) {
if (item) {
this.itemname = item.id;
this.departmentName = item.departmentName;
this.loading = true;
this.queryParams.departmentId = this.itemname;
this.getList();
} else {
this.queryParams.departmentId = "";
this.itemname = null;
this.getList();
}
},
//
clickinnerVisible() {
this.innerVisibleshow = true;
if (this.itemname) {
this.informationqueryParams.departmentId = this.itemname;
} else {
this.informationqueryParams.departmentId = null;
}
this.informationInfoinfo();
},
//
@ -729,6 +377,7 @@ export default {
this.informationqueryParams = {
pageNum: 1,
pageSize: 10,
hospitalAgencyId: this.queryParams.hospitalAgencyId
};
this.informationInfoinfo();
},
@ -738,9 +387,10 @@ export default {
//
nurseclick(row) {
this.form.departmentId = row.id;
this.form.departmentName = row.departmentName;
this.departmentName = row.departmentName;
this.form.diseaseTypeId = "";
this.diseaseTypeName = "请选择病种";
this.form.diseaseTypeId = '';
this.form.diseaseTypeName = '请选择病种';
this.innerVisibleshow = false;
},
//
@ -753,29 +403,28 @@ export default {
},
//
clickdisease() {
if (this.departmentName == "请选择科室") {
if (this.form.departmentName == "请选择科室") {
this.$modal.msgError("请先选择科室");
} else {
this.diseaseshowst = true;
this.querydisease.departmentId = this.form.departmentId;
this.infodisease();
this.diseaseshowst = true;
}
},
//
nurseclickdisease(row) {
this.form.diseaseTypeId = row.id;
this.diseaseTypeName = row.diseaseTypeName;
this.form.diseaseTypeName = row.diseaseTypeName;
this.diseaseshowst = false;
},
//
resetdisease() {
querydisease = {
this.querydisease = {
pageNum: 1,
pageSize: 10,
};
this.infodisease();
},
canceldiseases() {
this.diseaseshowst = false;
},
@ -804,7 +453,6 @@ export default {
updateTime: null,
suitTaskTypeIds: [],
};
this.resetForm("form");
},
/** 搜索按钮操作 */
@ -815,7 +463,9 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.queryParams.departmentId = null;
this.itemname = null;
this.informationqueryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
this.queryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
this.$refs.DepartmentList.resetQuery()
this.resetForm("queryForm");
this.handleQuery();
},
@ -828,18 +478,15 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
if (this.itemname) {
this.form.departmentName = this.departmentName;
this.form.departmentId = this.itemname;
} else if (this.itemname == null) {
this.departmentName = "请选择科室";
if (this.queryParams.departmentId) {
this.form.departmentName = this.departmentName
this.form.departmentId = this.queryParams.departmentId
} else {
this.departmentName = "请选择科室";
this.form.departmentName = '请选择科室'
}
this.diseaseTypeName = "请选择病种";
this.open = true;
this.form.diseaseTypeName = "请选择病种";
this.title = "新增微信模板";
this.open = true;
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -850,15 +497,7 @@ export default {
getTemplate(id).then((response) => {
this.form = response.data;
this.form.suitTaskTypeIds = response.data.suitTaskTypeIds;
if (
!response.data.diseaseTypeName ||
response.data.diseaseTypeName == ""
) {
this.diseaseTypeName = "请选择病种";
} else {
this.diseaseTypeName = response.data.diseaseTypeName;
}
this.departmentName = response.data.departmentName;
this.departmentName = response.data.departmentName
if (!this.form.templateSort) {
this.form.templateSort = undefined;
}
@ -883,8 +522,7 @@ export default {
},
/** 提交按钮 */
submitForm() {
console.log(this.form);
// return
this.form.hospitalAgencyId = this.queryParams.hospitalAgencyId
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.obj.length > 10) {
@ -893,39 +531,22 @@ export default {
message: "微信排序最大长度为十位,请正确输入!",
});
} else {
if (!this.form.diseaseTypeId) {
this.form.diseaseTypeName = ''
}
if (this.form.id != null) {
this.form.departmentName = this.departmentName;
this.form.diseaseTypeName = this.diseaseTypeName;
if (this.diseaseTypeName == "请选择病种") {
this.form.diseaseTypeName = null;
} else {
this.form.diseaseTypeName = this.diseaseTypeName;
}
console.log(this.form, "this.form");
// return
updateTemplate(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.Departmentlist();
this.$refs.DepartmentList.Departmentlist()
});
} else {
if (this.diseaseTypeName == "请选择病种") {
this.form.diseaseTypeName = null;
} else {
this.form.diseaseTypeName = this.diseaseTypeName;
}
if (this.itemname) {
this.form.departmentName = this.departmentName;
this.form.departmentId = this.itemname;
} else {
this.form.departmentName = this.departmentName;
}
addTemplate(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.Departmentlist();
this.$refs.DepartmentList.Departmentlist()
});
}
}
@ -942,10 +563,10 @@ export default {
})
.then(() => {
this.getList();
this.Departmentlist();
this.$modal.msgSuccess("删除成功");
this.$refs.DepartmentList.Departmentlist()
})
.catch(() => {});
.catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
@ -986,19 +607,20 @@ export default {
</script>
<style lang="scss" scoped>
::v-deep.el-table td.el-table__cell div {
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
::v-deeep.el-textarea__inner {
height: 200px;
height: 200px;
}
}
::v-deep .el-input-number .el-input__inner {
text-align: left;
}

View File

@ -215,12 +215,12 @@ export default {
mounted() {
this.getMaxTableHeight()
this.screenChange()
this.informationInfoinfo();
},
methods: {
//
clickinnerVisible() {
this.innerVisibleshow = true;
this.informationInfoinfo();
},
//
informationInfoinfo() {
@ -235,6 +235,7 @@ export default {
this.informationqueryParams = {
pageNum: 1,
pageSize: 10,
hospitalAgencyId: this.queryParams.hospitalAgencyId
};
this.informationInfoinfo();
},
@ -245,7 +246,9 @@ export default {
nurseclick(row) {
this.form.departmentId = row.id;
this.form.departmentName = row.departmentName;
this.departmentName = row.departmentName;
this.form.diseaseTypeId = '';
this.diseaseTypeName = '请选择病种';
this.innerVisibleshow = false;
},
/** 查询手术信息列表 */
@ -342,6 +345,7 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.form.hospitalAgencyId = this.queryParams.hospitalAgencyId
this.$refs["form"].validate(valid => {
if (valid) {
if (this.obj.length > 10) {
@ -350,10 +354,14 @@ export default {
message: "手术排序最大长度为十位,请正确输入!"
});
} else {
if (!this.form.diseaseTypeId) {
this.form.diseaseTypeName = ''
}
if (this.form.id != null) {
updateOperationInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.$refs.DepartmentList.Departmentlist()
this.getList();
});
} else {