316 lines
9.7 KiB
Vue
316 lines
9.7 KiB
Vue
<template>
|
|
<div class="app-container">
|
|
<el-button size="small" @click="classificationOpen = true" style="
|
|
width: 200px;
|
|
font-size: 14px;
|
|
text-align: left;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
" :style="handleselectName ? 'color:black' : 'color:#C0C4CC'">{{ handleselectName ? handleselectName : "请选择"
|
|
}}</el-button>
|
|
<el-dialog title="话术库模板选择" :visible.sync="classificationOpen" width="70%" :before-close="classificationOpenfalse">
|
|
<el-row :gutter="20">
|
|
<!--部门数据-->
|
|
<el-col :span="6" :xs="24">
|
|
<DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
|
|
:methods="'listScriptNumtwo'">
|
|
</DepartmentList>
|
|
</el-col>
|
|
<!--用户数据-->
|
|
<el-col :span="18" :xs="24">
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
|
label-width="100px">
|
|
<el-form-item label="通用话术名称" prop="commonScriptName">
|
|
<el-input v-model="queryParams.commonScriptName" placeholder="请输入通用话术名称" clearable
|
|
@keyup.enter.native="handleQuery" />
|
|
</el-form-item>
|
|
<el-form-item label="话术名称" prop="scriptName">
|
|
<el-input v-model="queryParams.scriptName" placeholder="请输入话术名称" clearable
|
|
@keyup.enter.native="handleQuery" />
|
|
</el-form-item>
|
|
<el-form-item label="话术ID" prop="scriptId">
|
|
<el-input v-model="queryParams.scriptId" placeholder="请输入话术ID" clearable
|
|
@keyup.enter.native="handleQuery" />
|
|
</el-form-item>
|
|
<el-form-item label="平台ID" prop="platformId">
|
|
<el-input v-model="queryParams.platformId" 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-table v-loading="loading" :data="scriptList" @row-dblclick="handleselect">
|
|
<el-table-column label="序号" align="center" prop="sort" type="index" width="48"/>
|
|
<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="scriptIntroduction" :show-overflow-tooltip="true" />
|
|
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" :show-overflow-tooltip="true" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button size="mini" type="text" @click="handlesee(scope.row)">预览</el-button>
|
|
<el-button size="mini" type="text" @click="handleselect(scope.row)"
|
|
v-if="handleselectId != scope.row.id">选择</el-button>
|
|
<el-button size="mini" type="text" @click="nohandleselect(scope.row)"
|
|
v-if="handleselectId == scope.row.id">取消选择</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-col>
|
|
</el-row>
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
@pagination="getList" />
|
|
</el-dialog>
|
|
<el-dialog title="话术预览" :visible.sync="lookshow" width="90%">
|
|
<Scriptpreview :phoneNodeContent="phoneNodeContent" v-if="lookshow"></Scriptpreview>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="lookshow = false">确 定</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Scriptpreview from ".././components/Scriptpreviewopen.vue";
|
|
import {
|
|
listScript,
|
|
getScript,
|
|
delScript,
|
|
addScript,
|
|
updateScript,
|
|
departmentDisease,
|
|
department,
|
|
listDisease,
|
|
listScriptNum,
|
|
} from "@/api/manage/script";
|
|
import stationAcatar from "../../system/stationAvatar/index.vue";
|
|
import DepartmentList from '../../components/DepartmentList.vue'
|
|
export default {
|
|
props: ["templateId", "templateName"],
|
|
components: { stationAcatar, Scriptpreview, DepartmentList },
|
|
name: "Script",
|
|
data() {
|
|
return {
|
|
lookshow: false,
|
|
phoneNodeContent: {
|
|
scriptInfoId: null,
|
|
flowScheme: null,
|
|
nodes: [],
|
|
edges: [],
|
|
},
|
|
handleselectName: "",
|
|
handleselectId: "",
|
|
classificationOpen: false,
|
|
// 遮罩层
|
|
loading: true,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 总条数
|
|
total: 0,
|
|
// 话术信息表格数据
|
|
scriptList: [],
|
|
// 弹出层标题
|
|
title: "",
|
|
// 是否显示弹出层
|
|
open: false,
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
departmentId: null,
|
|
departmentName: null,
|
|
diseaseTypeId: null,
|
|
diseaseTypeName: null,
|
|
commonScriptName: null,
|
|
scriptName: null,
|
|
scriptId: null,
|
|
platformId: null,
|
|
scriptStatus: "NORMAL",
|
|
scriptIntroduction: null,
|
|
scriptSort: null,
|
|
scriptRemark: null,
|
|
},
|
|
};
|
|
},
|
|
created() {
|
|
// this.getList();
|
|
},
|
|
mounted() {
|
|
this.handleselectId = this.templateId;
|
|
this.handleselectName = this.templateName;
|
|
},
|
|
watch: {
|
|
templateName(newValue, oldValue) {
|
|
this.handleselectName = newValue;
|
|
},
|
|
templateId(newValue, oldValue) {
|
|
this.handleselectId = newValue;
|
|
},
|
|
},
|
|
methods: {
|
|
//接收科室列表传值
|
|
clickdepartment(item) {
|
|
this.queryParams.hospitalAgencyId = item.hospitalAgencyId
|
|
this.queryParams.hospitalAgencyName = item.hospitalAgencyName
|
|
this.queryParams.departmentId = item.itemid
|
|
this.queryParams.departmentName = item.itemName
|
|
if (item.hospitalAgencyId) {
|
|
this.handleQuery();
|
|
}
|
|
this.$forceUpdate()
|
|
},
|
|
handlesee(row) {
|
|
if (row.flowScheme == null || row.flowScheme == "") {
|
|
this.$message.error("暂无话术图");
|
|
} else {
|
|
this.phoneNodeContent = row.flowScheme;
|
|
this.lookshow = true;
|
|
}
|
|
},
|
|
nohandleselect() {
|
|
this.handleselectId = "";
|
|
this.handleselectName = "";
|
|
this.$emit("on-template", {
|
|
templateId: "",
|
|
templateName: "",
|
|
templateContent: "",
|
|
scriptInfoId:'',
|
|
phoneTemplateId:'',
|
|
});
|
|
},
|
|
handleselect(item) {
|
|
this.handleselectId = item.id;
|
|
this.handleselectName = item.commonScriptName;
|
|
this.$emit("on-template", {
|
|
templateId: item.id,
|
|
templateName: item.commonScriptName,
|
|
templateContent: item.scriptIntroduction,
|
|
phoneNodeContent: item.flowScheme,
|
|
scriptInfoId:item.id,
|
|
phoneTemplateId:item.scriptId,
|
|
});
|
|
this.classificationOpen = false;
|
|
},
|
|
classificationOpenfalse() {
|
|
this.classificationOpen = false;
|
|
},
|
|
/** 查询话术信息列表 */
|
|
getList() {
|
|
this.loading = true;
|
|
this.queryParams.scriptStatus = "NORMAL";
|
|
listScript(this.queryParams).then((response) => {
|
|
this.scriptList = response.rows;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
});
|
|
},
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1;
|
|
this.getList();
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.queryParams.departmentId = null;
|
|
this.queryParams = {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
departmentId: null,
|
|
departmentName: null,
|
|
diseaseTypeId: null,
|
|
diseaseTypeName: null,
|
|
commonScriptName: null,
|
|
scriptName: null,
|
|
scriptId: null,
|
|
platformId: null,
|
|
scriptStatus: "NORMAL",
|
|
scriptIntroduction: null,
|
|
scriptSort: null,
|
|
scriptRemark: null,
|
|
};
|
|
this.resetForm("queryForm");
|
|
this.$refs.DepartmentList.resetQuery()
|
|
// this.getList();
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
::v-deep .el-input-number .el-input__inner {
|
|
text-align: left;
|
|
}
|
|
|
|
::v-deep .el-dialog__body {
|
|
padding-bottom: 60px;
|
|
}
|
|
|
|
.app-container {
|
|
display: inline-block;
|
|
padding: 0 !important;
|
|
// background: red;
|
|
height: 42px;
|
|
}
|
|
|
|
::v-deep .el-textarea__inner {
|
|
width: 206px;
|
|
}
|
|
|
|
.leftscript {
|
|
// width: 30%;
|
|
height: 650px;
|
|
overflow: auto;
|
|
|
|
.name {
|
|
font-weight: 700;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.listitem {
|
|
width: 100%;
|
|
height: 50px;
|
|
border-bottom: 1px solid #dcdfe6;
|
|
position: relative;
|
|
|
|
.count {
|
|
display: inline-block;
|
|
position: absolute;
|
|
left: 210px;
|
|
color: #a4a6aa;
|
|
top: 10px;
|
|
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>
|