|
@@ -2,10 +2,10 @@
|
|
|
<div class="problemInfo" >
|
|
|
<el-row>
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="全部问题" name="1" ></el-tab-pane>
|
|
|
- <el-tab-pane label="待解决" name="2" ></el-tab-pane>
|
|
|
- <el-tab-pane label="转工单" name="3" ></el-tab-pane>
|
|
|
- <el-tab-pane label="已解决" name="4" ></el-tab-pane>
|
|
|
+ <el-tab-pane :label="num1" name="1" ></el-tab-pane>
|
|
|
+ <el-tab-pane :label="num2" name="2" ></el-tab-pane>
|
|
|
+ <el-tab-pane :label="num3" name="3" ></el-tab-pane>
|
|
|
+ <el-tab-pane :label="num4" name="4" ></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-row>
|
|
|
<el-form ref="form" :model="queryParams" size="small" :inline="true" label-width="100px">
|
|
@@ -21,6 +21,16 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="问题来源">
|
|
|
+ <el-select v-model="queryParams.isAuto" filterable placeholder="请选择" clearable @change="changeBtn">
|
|
|
+ <el-option
|
|
|
+ v-for="item in isAutoOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="问题描述">
|
|
|
<el-input v-model="queryParams.problemDescription" clearable placeholder="请输入内容"></el-input>
|
|
|
</el-form-item>
|
|
@@ -181,7 +191,11 @@
|
|
|
align="center">
|
|
|
<template #default="scope">
|
|
|
<div v-for="v in scope.row.problemPicture" :key="v.id">
|
|
|
- <el-image :src="v.filepath" style="width: 100px"></el-image>
|
|
|
+ <el-image
|
|
|
+ :src="v.filepath"
|
|
|
+ style="width: 100px"
|
|
|
+ >
|
|
|
+ </el-image>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -257,14 +271,21 @@
|
|
|
width="200"
|
|
|
align="center">
|
|
|
<template scope="scope">
|
|
|
- <span v-if="scope.row.problemStateSolve == 1 && scope.row.problemStateConvert == 1 "
|
|
|
- >待解决</span>
|
|
|
- <span v-if="scope.row.problemStateSolve == 1 && scope.row.problemStateConvert == 0 "
|
|
|
- >转工单-待解决</span>
|
|
|
- <span v-if="scope.row.problemStateSolve == 0 && scope.row.problemStateConvert == 1"
|
|
|
- >已解决</span>
|
|
|
- <span v-if="scope.row.problemStateSolve == 0 && scope.row.problemStateConvert == 0"
|
|
|
- >转工单-已解决</span>
|
|
|
+ <el-tag
|
|
|
+ size="mini"
|
|
|
+ style="margin-right: 8px"
|
|
|
+ :type="
|
|
|
+ scope.row.problemStateSolve == '0'
|
|
|
+ ? 'success'
|
|
|
+ : 'danger'
|
|
|
+ "
|
|
|
+ >{{
|
|
|
+ handleStatus(
|
|
|
+ scope.row.problemStateConvert,
|
|
|
+ scope.row.problemStateSolve
|
|
|
+ )
|
|
|
+ }}</el-tag
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -315,7 +336,15 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="提问人" prop="questioner">
|
|
|
- <el-input v-model="form.questioner" clearable></el-input>
|
|
|
+<!-- <el-input v-model="form.questioner" clearable></el-input>-->
|
|
|
+ <el-select v-model="form.questioner" placeholder="请选择" clearable @change="changeBtn3">
|
|
|
+ <el-option
|
|
|
+ v-for="item in QuestionerOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.userName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
@@ -408,7 +437,7 @@
|
|
|
:visible.sync="dialogSolve"
|
|
|
width="30%"
|
|
|
:before-close="handleClose">
|
|
|
- <el-form ref="form1" :model="form" :rules="rules1" label-width="100px">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules1" label-width="100px">
|
|
|
<el-row>
|
|
|
<el-col :span="15">
|
|
|
<el-form-item label="描述" prop="processingFeedback">
|
|
@@ -453,10 +482,10 @@
|
|
|
:visible.sync="dialogWorkOrder"
|
|
|
width="30%"
|
|
|
:before-close="handleClose">
|
|
|
- <el-form ref="form" :model="form" >
|
|
|
+ <el-form ref="form" :model="form" :rules="rules2">
|
|
|
<el-row>
|
|
|
<el-col :span="15">
|
|
|
- <el-form-item >
|
|
|
+ <el-form-item label="工单处理人" prop="workOrderProcessor">
|
|
|
<el-select v-model="form.workOrderProcessor" filterable placeholder="请选择工单处理人" clearable>
|
|
|
<el-option
|
|
|
v-for="item in workOrderProcessorOptions"
|
|
@@ -470,7 +499,7 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="15">
|
|
|
- <el-form-item>
|
|
|
+ <el-form-item label="处理截至时间" prop="processorEndTime">
|
|
|
<el-date-picker
|
|
|
v-model="form.processorEndTime"
|
|
|
value-format="yyyy-MM-dd"
|
|
@@ -501,6 +530,7 @@ import {
|
|
|
addProblem,
|
|
|
getProjectSourceOptions,
|
|
|
getAllProcessorDataList,
|
|
|
+ getQuestionerOptions,
|
|
|
fileImport
|
|
|
} from "@/api/business/as/problemInfo"
|
|
|
import {getToken} from "@/utils/auth";
|
|
@@ -517,6 +547,23 @@ export default {
|
|
|
this.getQuestionerDataList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 处理状态
|
|
|
+ handleStatus(convert, solve) {
|
|
|
+ // problemStateConvert 是否转工单 0 转工单 1 未转工单
|
|
|
+ // problemStateSolve 是否解决 0 已解决 1 未解决
|
|
|
+ if (convert == "0") {
|
|
|
+ return solve == "0" ? "转工单-已解决" : "转工单-待解决";
|
|
|
+ } else {
|
|
|
+ return solve == "0" ? "已解决" : "待解决";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getPreviewList(val){
|
|
|
+ console.log("val.problemPicture",val.problemPicture)
|
|
|
+ val.problemPicture.forEach(item =>{
|
|
|
+ this.previewSrcList.push(item.filepath)
|
|
|
+ })
|
|
|
+ return this.previewSrcList
|
|
|
+ },
|
|
|
changeBtn2(param){
|
|
|
console.log(param)
|
|
|
if(param==true){
|
|
@@ -540,6 +587,13 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ changeBtn3(param){
|
|
|
+ this.QuestionerOptions.forEach((item) =>{
|
|
|
+ if(param==item.id){
|
|
|
+ this.form.questionerWay=item.userPhone
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//计算table高度(动态设置table高度)
|
|
|
getTableHeight() {
|
|
|
let tableH = 275; //距离页面下方的高度
|
|
@@ -609,17 +663,35 @@ export default {
|
|
|
let resolve = this.$router.push({path:'/business/as/problemInfo/detail',query:{id:row.id}});
|
|
|
},
|
|
|
btnDownload(){
|
|
|
- this.download("/mk/as/problem/download", {}, `SPD售后问题.xlsx`);
|
|
|
+ if(this.problemInfos!=null&&this.problemInfos.length>0){
|
|
|
+ const idList=[]
|
|
|
+ this.problemInfos.forEach(item =>{
|
|
|
+ idList.push(item.id)
|
|
|
+ })
|
|
|
+ this.download("/mk/as/problem/download?idList="+idList,{}, `SPD售后问题.xlsx`);
|
|
|
+ }else {
|
|
|
+ this.$confirm("是否导出全部问题", "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(()=> {
|
|
|
+ this.download("/mk/as/problem/download",{}, `SPD售后问题.xlsx`);
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
handleWorkOrder(data){
|
|
|
getProcessorOptions(data.hospitalId).then(res =>{
|
|
|
if(res.code == 200){
|
|
|
this.workOrderProcessorOptions=res.data
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
- this.dialogWorkOrder=true
|
|
|
- this.form=data
|
|
|
+ this.form = data
|
|
|
+ if(this.form.questioner==null||this.form.questionerWay==null||this.form.problemType==null||this.form.processorName==null||this.form.processorWay==null||this.form.roomInformation==null){
|
|
|
+ this.$message.error("请补充问题维度")
|
|
|
+ }else {
|
|
|
+ this.dialogWorkOrder=true
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
handleSolve(data){
|
|
|
this.dialogSolve=true
|
|
@@ -638,6 +710,11 @@ export default {
|
|
|
this.projectSourceOptions=res.data
|
|
|
}
|
|
|
})
|
|
|
+ getQuestionerOptions(data.hospitalId).then(res =>{
|
|
|
+ if(res.code == 200){
|
|
|
+ this.QuestionerOptions=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
if(data.hospitalId!=null&&data.hospitalId!=''){
|
|
|
getProcessorOptions(data.hospitalId).then(res =>{
|
|
|
if(res.code ==200){
|
|
@@ -676,6 +753,7 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
+ console.log(selection)
|
|
|
this.problemInfos = selection// 需要根据数据情况调整id名称
|
|
|
this.single = selection.length != 1;
|
|
|
this.multiple = !selection.length;
|
|
@@ -712,6 +790,10 @@ export default {
|
|
|
if(res.code == 200){
|
|
|
this.dataList=res.rows
|
|
|
this.total=res.total
|
|
|
+ this.num1="全部问题 ("+res.total+")"
|
|
|
+ this.num2="待解决 "
|
|
|
+ this.num3="转工单 "
|
|
|
+ this.num4="已解决 "
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -721,6 +803,10 @@ export default {
|
|
|
if(res.code == 200){
|
|
|
this.dataList=res.rows
|
|
|
this.total=res.total
|
|
|
+ this.num1="全部问题 "
|
|
|
+ this.num2="待解决 ("+res.total+")"
|
|
|
+ this.num3="转工单 "
|
|
|
+ this.num4="已解决 "
|
|
|
}
|
|
|
})
|
|
|
this.queryParams.problemStateSolve=''
|
|
@@ -731,6 +817,10 @@ export default {
|
|
|
if(res.code == 200){
|
|
|
this.dataList=res.rows
|
|
|
this.total=res.total
|
|
|
+ this.num1="全部问题 "
|
|
|
+ this.num2="待解决 "
|
|
|
+ this.num3="转工单 ("+res.total+")"
|
|
|
+ this.num4="已解决 "
|
|
|
}
|
|
|
})
|
|
|
this.queryParams.problemStateConvert=''
|
|
@@ -741,6 +831,10 @@ export default {
|
|
|
if(res.code == 200){
|
|
|
this.dataList=res.rows
|
|
|
this.total=res.total
|
|
|
+ this.num1="全部问题 "
|
|
|
+ this.num2="待解决 "
|
|
|
+ this.num3="转工单 "
|
|
|
+ this.num4="已解决 ("+res.total+")"
|
|
|
}
|
|
|
})
|
|
|
this.queryParams.problemStateSolve=''
|
|
@@ -818,24 +912,28 @@ export default {
|
|
|
this.pictureList=[]
|
|
|
},
|
|
|
submitFormWorkOrder(){
|
|
|
- this.loading=true
|
|
|
- pushWorkOrder(this.form).then(res =>{
|
|
|
- if(200 == res.code){
|
|
|
- this.$message.success('转工单成功')
|
|
|
- list(this.queryParams).then(res => {
|
|
|
- if(res.code == 200){
|
|
|
- this.dataList=res.rows
|
|
|
- this.total=res.total
|
|
|
- this.queryParams.creatStart=''
|
|
|
- this.queryParams.creatEnd=''
|
|
|
-
|
|
|
+ this.$refs["form"].validate(valid =>{
|
|
|
+ if(valid){
|
|
|
+ this.loading=true
|
|
|
+ pushWorkOrder(this.form).then(res =>{
|
|
|
+ if(200 == res.code){
|
|
|
+ this.$message.success('转工单成功')
|
|
|
+ list(this.queryParams).then(res => {
|
|
|
+ if(res.code == 200){
|
|
|
+ this.dataList=res.rows
|
|
|
+ this.total=res.total
|
|
|
+ this.queryParams.creatStart=''
|
|
|
+ this.queryParams.creatEnd=''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.loading=false
|
|
|
+ }else {
|
|
|
+ this.loading=false
|
|
|
}
|
|
|
})
|
|
|
- this.loading=false
|
|
|
+ this.dialogWorkOrder=false
|
|
|
}
|
|
|
})
|
|
|
- this.dialogWorkOrder=false
|
|
|
-
|
|
|
},
|
|
|
getProjectSourceDataList(){
|
|
|
getProjectSourceOptions().then(res =>{
|
|
@@ -884,6 +982,12 @@ export default {
|
|
|
this.form.processorName=item.nickName
|
|
|
}
|
|
|
})
|
|
|
+ this.QuestionerOptions.forEach((item) =>{
|
|
|
+ if(item.id == this.form.questioner){
|
|
|
+ this.form.userId=item.id
|
|
|
+ this.form.questioner=item.userName
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
return await addProblem(formData,this.form).then(res =>{
|
|
|
if(res.code == 200){
|
|
@@ -909,6 +1013,12 @@ export default {
|
|
|
this.form.processorName=item.nickName
|
|
|
}
|
|
|
})
|
|
|
+ this.QuestionerOptions.forEach((item) =>{
|
|
|
+ if(item.id == this.form.questioner){
|
|
|
+ this.form.userId=item.id
|
|
|
+ this.form.questioner=item.userName
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
let formData = new FormData();
|
|
|
formData.append("problemInfo",new Blob([JSON.stringify(this.form)], {type: "application/json"}))
|
|
@@ -943,7 +1053,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
async submitFormSolve(){
|
|
|
- this.$refs["form1"].validate(async valid => {
|
|
|
+ this.$refs["form"].validate(async valid => {
|
|
|
+ console.log("valid",valid)
|
|
|
if(valid){
|
|
|
if(this.form.id != undefined){
|
|
|
let formData = new FormData();
|
|
@@ -1013,6 +1124,11 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ num1:'',
|
|
|
+ num2:'',
|
|
|
+ num3:'',
|
|
|
+ num4:'',
|
|
|
+ previewSrcList:[],
|
|
|
loading:false,
|
|
|
tableHeight:'', //表格高度
|
|
|
projectSourceOptions:[],
|
|
@@ -1075,6 +1191,14 @@ export default {
|
|
|
{ required: true, message: '请输入处理反馈', trigger: 'blur' },
|
|
|
],
|
|
|
},
|
|
|
+ rules2: {
|
|
|
+ workOrderProcessor:[
|
|
|
+ { required: true, message: '请选择工单处理人', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ processorEndTime:[
|
|
|
+ { required: true, message: '请选择工单处理时间', trigger: 'change' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
projectSource:'',
|
|
|
stateOne: '',
|
|
|
timeout: null,
|
|
@@ -1108,7 +1232,22 @@ export default {
|
|
|
label:'转工单-已解决'
|
|
|
}
|
|
|
],
|
|
|
+ QuestionerOptions:[],
|
|
|
processorOptions:[],
|
|
|
+ isAutoOptions:[
|
|
|
+ {
|
|
|
+ value: '',
|
|
|
+ label: '全部'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '0',
|
|
|
+ label: '群自动收集'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '1',
|
|
|
+ label: '客户提交'
|
|
|
+ },
|
|
|
+ ],
|
|
|
problemTypeOptions:[
|
|
|
{
|
|
|
value: '1',
|
|
@@ -1135,6 +1274,7 @@ export default {
|
|
|
projectSourceAndHospitalId:'',
|
|
|
projectSourceAndHospitalId1:'',
|
|
|
queryParams: {
|
|
|
+ isAuto:'',
|
|
|
hospitalId:'',
|
|
|
creatStart:'',
|
|
|
creatEnd:'',
|