This commit is contained in:
2024-07-08 09:28:15 +08:00
parent 4caff8614e
commit 3e2918b1d3
3 changed files with 32 additions and 136 deletions

View File

@ -57,7 +57,9 @@
<script>
import { listOperationNum } from "@/api/operationInfo/operationInfo";
import { listScriptNum } from "@/api/manage/script";
export default {
props: ['methods'],
name: "DepartmentList",
data() {
return {
@ -167,7 +169,13 @@ export default {
},
//
Departmentlist() {
listOperationNum(this.querydepartmen).then(response => {
let method = undefined
if (this.methods == 'listOperationNum') {
method = listOperationNum(this.querydepartmen)
} else if (this.methods == 'listScriptNum') {
method = listScriptNum(this.querydepartmen)
}
method.then(response => {
this.DepartmentoList = response.data.deptNumList;
this.hospitalAgencyName = response.data.hospitalAgencyName
this.count = 0;

View File

@ -1,25 +1,9 @@
<template>
<div class="app-container" ref="layout">
<el-row :gutter="20">
<el-col :span="5">
<div class="leftscript" 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 :span="5" :xs="24">
<DepartmentList ref="DepartmentList" @clickdepartment="clickdepartment" :methods="'listScriptNum'">
</DepartmentList>
</el-col>
<el-col :span="19" :xs="24">
<div ref="topform" class="form">
@ -127,11 +111,10 @@
</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 optionsadd" :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="
width: 206px;
@ -167,7 +150,6 @@
<el-form-item label="话术简介" prop="scriptIntroduction">
<el-input maxlength="200" v-model="form.scriptIntroduction" placeholder="请输入话术简介" type="textarea" />
</el-form-item>
<!-- <el-form-item label="图片" prop="scriptFilePath">
<stationAcatar @imgUrl="imgUrl" :img="form.scriptFilePath" :type="'scriptUrl'" />
</el-form-item> -->
@ -247,9 +229,9 @@
<script>
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 {
components: { stationAcatar },
components: { stationAcatar, DepartmentList },
name: "Script",
data() {
return {
@ -270,9 +252,6 @@ export default {
},
infolist: [],
totaldepartment: 0,
diseaseshowst: false,//
querydisease: {
pageNum: 1,
@ -282,58 +261,19 @@ export default {
},
listdisease: [],
diseasetotal: 0,
options: [{
value: 'NORMAL',
label: '正常'
}, {
value: 'OFF_SHELF',
label: '下架'
}, {
value: 'SUSPEND',
label: '暂停'
},],
optionsadd: [{
value: 'NORMAL',
label: '正常'
}, {
value: 'OFF_SHELF',
label: '下架'
}, {
value: 'SUSPEND',
label: '暂停'
},],
optionsDisease: [],
maxTableHeight: undefined,
optionsadd: [{
value: 'NORMAL',
label: '正常'
}, {
value: 'OFF_SHELF',
label: '下架'
}, {
value: 'SUSPEND',
label: '暂停'
},],
baseUrl: process.env.VUE_APP_BASE_API,
//
dialogsee: false,
//
@ -368,7 +308,6 @@ export default {
diseaseTypeId: null,
diseaseTypeName: null,
commonScriptName: null,
scriptName: null,
scriptId: null,
platformId: null,
@ -377,12 +316,10 @@ export default {
scriptSort: null,
scriptRemark: null,
},
querydepartmen: {
departmentName: "",
// pageNum: 1,
// pageSize: 10,
},
//
form: {
@ -436,27 +373,18 @@ export default {
],
departmentId: [
{ required: true, message: "科室名称不能为空", trigger: "blur" }
],
},
};
},
created() {
this.getList();
this.Departmentlist();
},
mounted() {
this.getMaxTableHeight()
this.screenChange()
},
watch: {
name(val) {
this.querydepartmen.departmentName = val
this.Departmentlist();
},
'form.scriptSort'(val) {
if (val) {
var name = ''
@ -498,19 +426,15 @@ export default {
},
//
handlesee(row) {
if (row.scriptFilePath) {
const id = row.id
getScript(id).then(response => {
this.form = response.data;
this.dialogsee = true;
});
} else {
this.$modal.msgError("暂无预览信息");
}
},
// //
// release(item) {
@ -546,7 +470,6 @@ export default {
// });
// })
// },
//
seeClose() {
this.dialogsee = false;
@ -556,12 +479,21 @@ export default {
this.innerVisibleshow = true;
if (this.itemname) {
this.informationqueryParams.departmentId = this.itemname
} else {
this.informationqueryParams.departmentId = null
}
this.informationInfoinfo();
},
//
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();
}
},
//
informationInfoinfo() {
department(this.informationqueryParams).then((response) => {
@ -590,8 +522,6 @@ export default {
this.diseaseTypeName = '请选择病种';
this.innerVisibleshow = false;
},
//
infodisease() {
listDisease(this.querydisease).then((response) => {
@ -604,7 +534,6 @@ export default {
clickdisease() {
if (this.departmentName == '请选择科室') {
this.$modal.msgError("请先选择科室");
} else {
this.diseaseshowst = true;
this.querydisease.departmentId = this.form.departmentId
@ -625,50 +554,10 @@ export default {
pageSize: 10,
};
this.infodisease()
},
canceldiseases() {
this.diseaseshowst = false;
},
//
Departmentlist() {
this.loading = true;
listScriptNum(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.form.departmentId = item.id
this.departmentName = item.departmentName
// this.queryDisease.departmentId = this.itemname
this.loading = true;
this.queryParams.departmentId = item.id
this.getList()
} else {
this.queryParams.departmentId = ''
this.itemname = null
this.getList()
}
},
/** 查询话术信息列表 */
getList() {
this.loading = true;
@ -818,6 +707,7 @@ export default {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.$refs.DepartmentList.Departmentlist()
});
} else {
if (this.diseaseTypeName == "请选择病种") {
@ -829,10 +719,8 @@ export default {
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
@ -840,13 +728,10 @@ export default {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.Departmentlist();
this.$refs.DepartmentList.Departmentlist()
});
}
}
}
});
},
@ -857,7 +742,6 @@ export default {
return delScript(ids);
}).then(() => {
this.getList();
this.Departmentlist();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},

View File

@ -2,7 +2,8 @@
<div class="app-container" ref="layout">
<el-row :gutter="20">
<el-col :span="5" :xs="24">
<DepartmentList ref="DepartmentList" @clickdepartment="clickdepartment"></DepartmentList>
<DepartmentList ref="DepartmentList" @clickdepartment="clickdepartment" :methods="'listOperationNum'">
</DepartmentList>
</el-col>
<el-col :span="19" :xs="24">
<div ref="topform" class="form">
@ -288,6 +289,8 @@ export default {
resetQuery() {
this.queryParams.departmentId = null;
this.queryParams.operationName = 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();
@ -303,6 +306,7 @@ export default {
this.queryParams.hospitalAgencyId = item.hospitalAgencyId
this.queryParams.departmentId = item.itemid
this.departmentName = item.itemName
this.informationqueryParams.hospitalAgencyId = item.hospitalAgencyId
if (item.hospitalAgencyId) {
this.getList();
}