微信库
This commit is contained in:
parent
c95b2349b3
commit
acd8a36587
60
src/api/manage/template.js
Normal file
60
src/api/manage/template.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询微信模板信息列表
|
||||||
|
export function listTemplate(query) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询微信模板信息详细
|
||||||
|
export function getTemplate(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增微信模板信息
|
||||||
|
export function addTemplate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改微信模板信息
|
||||||
|
export function updateTemplate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/edit',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除微信模板信息
|
||||||
|
export function delTemplate(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/remove/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 左侧微信列表
|
||||||
|
export function listWechatTemplateNum(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/department/listWechatTemplateNum',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 适用任务类型
|
||||||
|
|
||||||
|
export function typelist(dictType) {
|
||||||
|
return request({
|
||||||
|
url: '/system/dict/data/type/'+dictType,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -12,7 +12,7 @@ export function listOperationInfo(query) {
|
|||||||
// 查询手术信息详细
|
// 查询手术信息详细
|
||||||
export function getOperationInfo(id) {
|
export function getOperationInfo(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/operationInfo/operationInfo/' + id,
|
url: '/manage/operationInfo/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ export function getOperationInfo(id) {
|
|||||||
// 新增手术信息
|
// 新增手术信息
|
||||||
export function addOperationInfo(data) {
|
export function addOperationInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/operationInfo/operationInfo/add',
|
url: '/manage/operationInfo/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -29,7 +29,7 @@ export function addOperationInfo(data) {
|
|||||||
// 修改手术信息
|
// 修改手术信息
|
||||||
export function updateOperationInfo(data) {
|
export function updateOperationInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/operationInfo/operationInfo/edit',
|
url: '/manage/operationInfo/edit',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -38,7 +38,7 @@ export function updateOperationInfo(data) {
|
|||||||
// 删除手术信息
|
// 删除手术信息
|
||||||
export function delOperationInfo(id) {
|
export function delOperationInfo(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/operationInfo/operationInfo/remove/' + id,
|
url: '/manage/operationInfo/remove/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -839,11 +839,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
console.log(this.departmentName, '00000')
|
console.log(this.departmentName, '00000')
|
||||||
this.diseaseshowst = true;
|
this.diseaseshowst = true;
|
||||||
// if(this.itemname){
|
|
||||||
// this.querydisease.departmentId=this.itemname
|
|
||||||
// }else{
|
|
||||||
this.querydisease.departmentId = this.form.departmentId
|
this.querydisease.departmentId = this.form.departmentId
|
||||||
// }
|
|
||||||
this.infodisease()
|
this.infodisease()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1036,9 +1032,6 @@ export default {
|
|||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
this.form.diseaseTypeName = this.diseaseTypeName
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
|
|
||||||
console.log(this.form)
|
|
||||||
|
|
||||||
updateScript(this.form).then(response => {
|
updateScript(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -1052,16 +1045,13 @@ export default {
|
|||||||
this.form.diseaseTypeName = this.diseaseTypeName
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
}
|
}
|
||||||
if(this.itemname){
|
if(this.itemname){
|
||||||
console.log('000000000000')
|
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
this.form.departmentId=this.itemname
|
this.form.departmentId=this.itemname
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
console.log('222222222')
|
|
||||||
|
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
addScript(this.form).then(response => {
|
addScript(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
@ -1070,8 +1060,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1098,6 +1086,16 @@ export default {
|
|||||||
return delScript(ids);
|
return delScript(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
|
var quer={
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
}
|
||||||
|
listScript(quer).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
|
||||||
|
});
|
||||||
|
this.Departmentlist();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
|||||||
876
src/views/manage/template/index.vue
Normal file
876
src/views/manage/template/index.vue
Normal file
@ -0,0 +1,876 @@
|
|||||||
|
<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="微信模版名称"
|
||||||
|
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-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="['manage:template:add']"
|
||||||
|
>新增微信模版</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
<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>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="19">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="templateList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
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"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="病种名称"
|
||||||
|
align="center"
|
||||||
|
prop="templateSort"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<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
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</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="80px">
|
||||||
|
|
||||||
|
<el-form-item label="微信模板名称" prop="wechatTemplateName">
|
||||||
|
<el-input v-model="form.wechatTemplateName" placeholder="请输入微信模板名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="模板ID" prop="templateId">
|
||||||
|
<el-input v-model="form.templateId" placeholder="请输入模板ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="模板内容" prop="templateContent">
|
||||||
|
<el-input v-model="form.templateContent" placeholder="请输入模板ID" />
|
||||||
|
|
||||||
|
<!-- <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:380px">
|
||||||
|
<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.suitTaskTypeId " placeholder="请选择" style="width:380px" @change="change">
|
||||||
|
<el-option
|
||||||
|
v-for="item in type"
|
||||||
|
:key="item.id"
|
||||||
|
: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: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ departmentName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickinnerVisible()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ departmentName }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="病种名称" prop="diseaseTypeName">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
v-if="diseaseTypeName == '请选择病种'"
|
||||||
|
@click="clickdisease()"
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ diseaseTypeName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickdisease()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ diseaseTypeName }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 科室弹框 -->
|
||||||
|
<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-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">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
v-if="form.departmentId == scope.row.departmentCode"
|
||||||
|
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>
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
<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-form-item label="病种名称" prop="departmentName" label-width="120">
|
||||||
|
<el-input
|
||||||
|
v-model="querydisease.departmentName"
|
||||||
|
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">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
v-if="form.diseaseTypeId == scope.row.diseaseTypeCode"
|
||||||
|
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>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="diseasetotal > 0"
|
||||||
|
:total="diseasetotal"
|
||||||
|
:page.sync="querydisease.pageNum"
|
||||||
|
:limit.sync="querydisease.pageSize"
|
||||||
|
@pagination="infodisease"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listTemplate, getTemplate, delTemplate, addTemplate, updateTemplate, listWechatTemplateNum ,typelist} from "@/api/manage/template";
|
||||||
|
import {department, listDisease } from "@/api/manage/script";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Template",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
itemname: null,
|
||||||
|
departmentName: null,
|
||||||
|
diseaseTypeName: null,
|
||||||
|
name: '',
|
||||||
|
departmentId: null,
|
||||||
|
count:'',//全部
|
||||||
|
DepartmentoList: [],//左侧数组
|
||||||
|
// 左侧传值
|
||||||
|
querydepartmen: {
|
||||||
|
departmentName: "",
|
||||||
|
// pageNum: 1,
|
||||||
|
// pageSize: 10,
|
||||||
|
|
||||||
|
},
|
||||||
|
options: [{
|
||||||
|
value: 'WE_CHAT_APPLET',
|
||||||
|
label: '小程序'
|
||||||
|
}, {
|
||||||
|
value: 'WE_CHAT_OFFICIAL_ACCOUNT',
|
||||||
|
label: '公众号'
|
||||||
|
},],
|
||||||
|
type:[],//类型
|
||||||
|
|
||||||
|
|
||||||
|
innerVisibleshow: false, //科室弹框
|
||||||
|
// 科室
|
||||||
|
informationqueryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
departmentName: null,
|
||||||
|
},
|
||||||
|
infolist: [],
|
||||||
|
totaldepartment: 0,
|
||||||
|
|
||||||
|
diseaseshowst: false,//病种弹框
|
||||||
|
querydisease: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
listdisease: [],
|
||||||
|
diseasetotal: 0,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
optionsDisease: [],
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 微信模板信息表格数据
|
||||||
|
templateList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
wechatTemplateName:null,
|
||||||
|
departmentId: null,
|
||||||
|
departmentName: null,
|
||||||
|
diseaseTypeId: null,
|
||||||
|
diseaseTypeName: null,
|
||||||
|
templateId: null,
|
||||||
|
templateContent: null,
|
||||||
|
templateSource: null,
|
||||||
|
templateSort: null,
|
||||||
|
templateRemark: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
wechatTemplateName: [
|
||||||
|
{ required: true, message: "微信模板名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
templateId: [
|
||||||
|
{ required: true, message: "模板ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
templateSource: [
|
||||||
|
{ required: true, message: "模板来源不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dictCode: [
|
||||||
|
{ required: true, message: "适用数据类型不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
departmentId: [
|
||||||
|
{ required: true, message: "所属科室名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
name(val) {
|
||||||
|
this.querydepartmen.departmentName = val
|
||||||
|
this.Departmentlist();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.Departmentlist();
|
||||||
|
this.typelistdata();
|
||||||
|
listTemplate(this.queryParams).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询微信模板信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listTemplate(this.queryParams).then(response => {
|
||||||
|
this.templateList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 适用任务类型
|
||||||
|
typelistdata(){
|
||||||
|
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;
|
||||||
|
listWechatTemplateNum(this.querydepartmen).then(response => {
|
||||||
|
this.DepartmentoList = response.data;
|
||||||
|
// this.count=this.DepartmentoList.length
|
||||||
|
console.log(this.DepartmentoList)
|
||||||
|
|
||||||
|
// this.total = response.total;
|
||||||
|
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();
|
||||||
|
},
|
||||||
|
// 科室列表
|
||||||
|
informationInfoinfo() {
|
||||||
|
department(this.informationqueryParams).then((response) => {
|
||||||
|
this.infolist = response.rows;
|
||||||
|
this.totaldepartment = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
// this.informationqueryParams.page = 1;
|
||||||
|
},
|
||||||
|
// 科室名称重置
|
||||||
|
addresetQuerylist() {
|
||||||
|
this.informationqueryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
this.informationInfoinfo();
|
||||||
|
},
|
||||||
|
innerVisiblecancel() {
|
||||||
|
this.innerVisibleshow = false;
|
||||||
|
},
|
||||||
|
// 科室名称圆点按钮
|
||||||
|
nurseclick(row) {
|
||||||
|
this.form.departmentId = row.departmentCode;
|
||||||
|
this.departmentName = row.departmentName;
|
||||||
|
console.log(this.departmentName, '0000')
|
||||||
|
this.innerVisibleshow = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 病种列表
|
||||||
|
infodisease() {
|
||||||
|
listDisease(this.querydisease).then((response) => {
|
||||||
|
this.listdisease = response.rows;
|
||||||
|
this.diseasetotal = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 点击病种
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 病种名称圆点按钮
|
||||||
|
nurseclickdisease(row) {
|
||||||
|
this.form.diseaseTypeId = row.diseaseTypeCode;
|
||||||
|
this.diseaseTypeName = row.diseaseTypeName;
|
||||||
|
this.diseaseshowst = false;
|
||||||
|
console.log(this.diseaseTypeName, '1121000')
|
||||||
|
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
resetdisease() {
|
||||||
|
querydisease = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
this.infodisease()
|
||||||
|
},
|
||||||
|
|
||||||
|
canceldiseases() {
|
||||||
|
this.diseaseshowst = false;
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
departmentId: null,
|
||||||
|
dictCode:null,
|
||||||
|
departmentName: null,
|
||||||
|
diseaseTypeId: null,
|
||||||
|
diseaseTypeName: null,
|
||||||
|
templateId: null,
|
||||||
|
templateContent: null,
|
||||||
|
templateSource: null,
|
||||||
|
templateSort: null,
|
||||||
|
templateRemark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams.departmentId = null;
|
||||||
|
this.itemname = null;
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
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.title = "新增微信模板";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getTemplate(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改微信模板信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
console.log(this.form)
|
||||||
|
console.log(this.diseaseTypeName)
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
this.form.departmentName = this.departmentName
|
||||||
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
|
updateTemplate(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} 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();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除微信模板信息?').then(function () {
|
||||||
|
return delTemplate(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
var quer={
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
|
||||||
|
}
|
||||||
|
listTemplate(quer).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
});
|
||||||
|
this.Departmentlist();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('manage/template/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `template_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.left {
|
||||||
|
height: 530px;
|
||||||
|
overflow: auto;
|
||||||
|
.name {
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.listitem {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
.count {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
// right: -172px;
|
||||||
|
left: 210px;
|
||||||
|
color: #a4a6aa;
|
||||||
|
top: -35px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.all {
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
padding-left: 13px;
|
||||||
|
}
|
||||||
|
.allactive {
|
||||||
|
background: #e8f4ff;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
padding-left: 13px;
|
||||||
|
border-left: 3px solid #4d9de7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
left: 20px;
|
||||||
|
top: -11px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -186,43 +186,7 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 用户导入对话框 -->
|
|
||||||
<el-dialog
|
|
||||||
:title="upload.title"
|
|
||||||
:visible.sync="upload.open"
|
|
||||||
width="400px"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<el-upload
|
|
||||||
ref="upload"
|
|
||||||
:limit="1"
|
|
||||||
accept=".xlsx, .xls"
|
|
||||||
:headers="upload.headers"
|
|
||||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
||||||
:disabled="upload.isUploading"
|
|
||||||
:on-progress="handleFileUploadProgress"
|
|
||||||
:on-success="handleFileSuccess"
|
|
||||||
:auto-upload="false"
|
|
||||||
drag
|
|
||||||
>
|
|
||||||
<i class="el-icon-upload"></i>
|
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
||||||
<div class="el-upload__tip text-center" slot="tip">
|
|
||||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
||||||
<el-link
|
|
||||||
type="primary"
|
|
||||||
:underline="false"
|
|
||||||
style="font-size: 12px; vertical-align: baseline"
|
|
||||||
@click="importTemplate"
|
|
||||||
>下载模板</el-link
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-upload>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -341,7 +305,6 @@ export default {
|
|||||||
// 左侧科室
|
// 左侧科室
|
||||||
itemdata(item) {
|
itemdata(item) {
|
||||||
if (item) {
|
if (item) {
|
||||||
console.log(item, '9999')
|
|
||||||
this.itemname = item.id
|
this.itemname = item.id
|
||||||
this.form.departmentId = this.itemname
|
this.form.departmentId = this.itemname
|
||||||
this.form.departmentName = item.departmentName
|
this.form.departmentName = item.departmentName
|
||||||
@ -355,41 +318,6 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 导入按钮操作 */
|
|
||||||
handleImport() {
|
|
||||||
this.upload.title = "导入手术名称";
|
|
||||||
this.upload.open = true;
|
|
||||||
},
|
|
||||||
/** 下载模板操作 */
|
|
||||||
importTemplate() {
|
|
||||||
this.download(
|
|
||||||
"system/user/importTemplate",
|
|
||||||
{},
|
|
||||||
`user_template_${new Date().getTime()}.xlsx`
|
|
||||||
);
|
|
||||||
},
|
|
||||||
// 文件上传中处理
|
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
|
||||||
this.upload.isUploading = true;
|
|
||||||
},
|
|
||||||
// 文件上传成功处理
|
|
||||||
handleFileSuccess(response, file, fileList) {
|
|
||||||
this.upload.open = false;
|
|
||||||
this.upload.isUploading = false;
|
|
||||||
this.$refs.upload.clearFiles();
|
|
||||||
this.$alert(
|
|
||||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
||||||
response.msg +
|
|
||||||
"</div>",
|
|
||||||
"导入结果",
|
|
||||||
{ dangerouslyUseHTMLString: true }
|
|
||||||
);
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
// 提交上传文件
|
|
||||||
submitFileForm() {
|
|
||||||
this.$refs.upload.submit();
|
|
||||||
},
|
|
||||||
// 左侧科室
|
// 左侧科室
|
||||||
Departmentlist() {
|
Departmentlist() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -533,6 +461,15 @@ export default {
|
|||||||
return delOperationInfo(ids);
|
return delOperationInfo(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
var quer={
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
}
|
||||||
|
listOperationInfo(quer).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
this.Departmentlist();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user