|
@@ -12,12 +12,12 @@
|
|
|
<el-row>
|
|
|
<el-col :span="5">
|
|
|
<el-form-item label="项目/医院">
|
|
|
- <el-select v-model="queryParams.projectSource" filterable placeholder="请选择" clearable>
|
|
|
+ <el-select v-model="queryParams.hospitalId" filterable placeholder="请选择" clearable @change="changeBtn">
|
|
|
<el-option
|
|
|
- v-for="item in restaurants"
|
|
|
- :key="item.projectSource"
|
|
|
+ v-for="item in projectSourceOptions"
|
|
|
+ :key="item.id"
|
|
|
:label="item.projectSource"
|
|
|
- :value="item.projectSource">
|
|
|
+ :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -246,7 +246,7 @@
|
|
|
align="center">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="processor"
|
|
|
+ prop="processorName"
|
|
|
label="负责处理人"
|
|
|
width="120"
|
|
|
align="center">
|
|
@@ -314,7 +314,6 @@
|
|
|
:title="dialogTitle"
|
|
|
:visible.sync="dialogVisible"
|
|
|
width="90%"
|
|
|
-
|
|
|
:before-close="handleClose">
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -322,13 +321,13 @@
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="170px">
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="项目来源/医院" prop="projectSource">
|
|
|
- <el-select v-model="form.projectSource" filterable placeholder="请选择" clearable>
|
|
|
+ <el-form-item label="项目来源/医院" prop="hospitalId">
|
|
|
+ <el-select v-model="form.hospitalId" filterable placeholder="请选择" clearable @change="changeBtn">
|
|
|
<el-option
|
|
|
- v-for="item in restaurants"
|
|
|
- :key="item.projectSource"
|
|
|
+ v-for="item in projectSourceOptions"
|
|
|
+ :key="item.id"
|
|
|
:label="item.projectSource"
|
|
|
- :value="item.projectSource">
|
|
|
+ :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -401,7 +400,7 @@
|
|
|
multiple
|
|
|
list-type="picture-card"
|
|
|
:file-list="form.problemPicture"
|
|
|
- action="#"
|
|
|
+ :action="upload.url"
|
|
|
:on-change="handleChange"
|
|
|
:on-remove="handleRemove"
|
|
|
:on-preview="handlePictureCardPreview"
|
|
@@ -428,10 +427,10 @@
|
|
|
:visible.sync="dialogSolve"
|
|
|
width="30%"
|
|
|
:before-close="handleClose">
|
|
|
- <el-form ref="form" :model="form" label-width="100px">
|
|
|
+ <el-form ref="form1" :model="form" :rules="rules1" label-width="100px">
|
|
|
<el-row>
|
|
|
<el-col :span="15">
|
|
|
- <el-form-item label="描述">
|
|
|
+ <el-form-item label="描述" prop="processingFeedback">
|
|
|
<el-input
|
|
|
v-model="form.processingFeedback"
|
|
|
type="textarea"
|
|
@@ -449,6 +448,7 @@
|
|
|
ref="upload"
|
|
|
list-type="picture-card"
|
|
|
:file-list="form.processorPicture"
|
|
|
+ :action="upload.url"
|
|
|
:on-change="handleChange"
|
|
|
:on-remove="handleRemove"
|
|
|
:auto-upload="false"
|
|
@@ -519,19 +519,21 @@ import {
|
|
|
getQuestionerList,
|
|
|
updateStageProblem,
|
|
|
getWorkOrderProcessorList,
|
|
|
- getProcessorList,
|
|
|
- addProblem
|
|
|
+ getProcessorOptions,
|
|
|
+ addProblem,
|
|
|
+ getProjectSourceOptions
|
|
|
} from "@/api/business/as/problemInfo"
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
import axios from 'axios'
|
|
|
export default {
|
|
|
created() {
|
|
|
this.handleClick()
|
|
|
- getHospitalAndProcessor().then(res =>{
|
|
|
+ getProjectSourceOptions().then(res =>{
|
|
|
if(res.code == 200){
|
|
|
- this.restaurants = res.data
|
|
|
+ this.projectSourceOptions=res.data
|
|
|
+ console.log("this.projectSourceOptions",this.projectSourceOptions)
|
|
|
}
|
|
|
- })
|
|
|
+ }),
|
|
|
getRoomInformation().then(res => {
|
|
|
if(res.code == 200){
|
|
|
this.roomInformationList=res.data
|
|
@@ -542,13 +544,21 @@ export default {
|
|
|
this.questionerList=res.data
|
|
|
}
|
|
|
})
|
|
|
- getProcessorList().then(res =>{
|
|
|
- if(200 == res.code){
|
|
|
- this.processorOptions=res.data
|
|
|
- }
|
|
|
- })
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeBtn(param){
|
|
|
+ console.log("param",param)
|
|
|
+ this.form.processor=''
|
|
|
+ if(param){
|
|
|
+ getProcessorOptions(param).then(res =>{
|
|
|
+ if(res.code == 200){
|
|
|
+ this.processorOptions=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.processorOptions=[]
|
|
|
+ }
|
|
|
+ },
|
|
|
handleUpdateProblem(){
|
|
|
this.$confirm("是否确认修改选中的数据项?", "警告", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -592,13 +602,19 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleWorkOrder(data){
|
|
|
- getWorkOrderProcessorList().then(res =>{
|
|
|
- if(200 == res.code){
|
|
|
+ getProcessorOptions(data.hospitalId).then(res =>{
|
|
|
+ if(res.code == 200){
|
|
|
this.workOrderProcessorOptions=res.data
|
|
|
}
|
|
|
})
|
|
|
+ // getWorkOrderProcessorList().then(res =>{
|
|
|
+ // if(200 == res.code){
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ // })
|
|
|
this.dialogWorkOrder=true
|
|
|
this.form=data
|
|
|
+ console.log(this.form)
|
|
|
},
|
|
|
handleSolve(data){
|
|
|
this.dialogSolve=true
|
|
@@ -607,7 +623,25 @@ export default {
|
|
|
handleEdit(data){
|
|
|
this.dialogTitle='编辑'
|
|
|
this.dialogVisible = true
|
|
|
+ console.log('data',data)
|
|
|
this.form=data
|
|
|
+ this.form.problemPicture.map((item) =>{
|
|
|
+ console.log("item",item)
|
|
|
+ item.name=item.id
|
|
|
+ item.url=item.filepath
|
|
|
+ })
|
|
|
+ console.log('this.form',this.form)
|
|
|
+ getProjectSourceOptions().then(res =>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.projectSourceOptions=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ getProcessorOptions(data.hospitalId).then(res =>{
|
|
|
+ if(res.code ==200){
|
|
|
+ this.processorOptions=res.data
|
|
|
+ console.log("this.processorOptions",this.processorOptions)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 删除
|
|
|
handleDelete() {
|
|
@@ -656,6 +690,9 @@ export default {
|
|
|
const stateList= this.state.split(',')
|
|
|
this.queryParams.problemStateSolve=stateList[0]
|
|
|
this.queryParams.problemStateConvert=stateList[1]
|
|
|
+ }else {
|
|
|
+ this.queryParams.problemStateSolve=''
|
|
|
+ this.queryParams.problemStateConvert=''
|
|
|
}
|
|
|
if(this.dateRange.length >0){
|
|
|
console.log(this.dateRange.length)
|
|
@@ -713,11 +750,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
btnReset(){
|
|
|
+ this.dateRange=[],
|
|
|
this.queryParams={
|
|
|
+ hospitalId:'',
|
|
|
creatStart:'',
|
|
|
creatEnd:'',
|
|
|
problemDescription:'',
|
|
|
- isProblem: '',
|
|
|
+ isProblem:'',
|
|
|
projectSource:'',
|
|
|
problemType:'',
|
|
|
roomInformation:'',
|
|
@@ -732,23 +771,27 @@ export default {
|
|
|
this.handleClick()
|
|
|
},
|
|
|
addFrom(){
|
|
|
+ this.cancel()
|
|
|
+ this.$set(this.form, 'hospitalId', [])
|
|
|
this.dialogTitle='新增问题'
|
|
|
this.dialogVisible = true
|
|
|
- getHospitalAndProcessor().then(res =>{
|
|
|
+ getProjectSourceOptions().then(res =>{
|
|
|
if(res.code == 200){
|
|
|
- this.restaurants = res.data
|
|
|
+ this.projectSourceOptions = res.data
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
cancel(){
|
|
|
this.form = {
|
|
|
id:undefined,
|
|
|
+ hospitalId:[],
|
|
|
problemCode:'',
|
|
|
projectSource:'',
|
|
|
questioner:'',
|
|
|
problemType:'',
|
|
|
roomInformation:'',
|
|
|
processor:'',
|
|
|
+ processorName:'',
|
|
|
processorWay:'',
|
|
|
problemDescription:'',
|
|
|
problemPicture:[],
|
|
@@ -776,11 +819,11 @@ export default {
|
|
|
},
|
|
|
submitForm(){
|
|
|
this.$refs["form"].validate(async valid => {
|
|
|
+ console.log("this.form",this.form)
|
|
|
if (valid) {
|
|
|
if (this.form.id == undefined) {
|
|
|
//新增售后问题
|
|
|
let formData = new FormData();
|
|
|
- //formData.append("problemInfo",new Blob([JSON.stringify(this.form)], {type: "application/json"}))
|
|
|
if(this.pictureList.length < 1 ){
|
|
|
formData.append("files",null)
|
|
|
}else {
|
|
@@ -788,6 +831,18 @@ export default {
|
|
|
formData.append("files",file.raw)
|
|
|
})
|
|
|
}
|
|
|
+ if(this.form){
|
|
|
+ this.projectSourceOptions.forEach((item) =>{
|
|
|
+ if(item.id == this.form.hospitalId){
|
|
|
+ this.form.projectSource=item.projectSource
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.processorOptions.forEach((item) =>{
|
|
|
+ if(item.userName == this.form.processor){
|
|
|
+ this.form.processorName=item.nickName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
return await addProblem(formData,this.form).then(res =>{
|
|
|
if(res.code == 200){
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
@@ -827,45 +882,55 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
async submitFormSolve(){
|
|
|
- if(this.form.id != undefined){
|
|
|
- let formData = new FormData();
|
|
|
- formData.append("problemInfo",new Blob([JSON.stringify(this.form)], {type: "application/json"}))
|
|
|
- if(this.pictureList.length < 1 ){
|
|
|
- formData.append("files",null)
|
|
|
- }else {
|
|
|
- this.pictureList.forEach(file =>{
|
|
|
- formData.append("files",file.raw)
|
|
|
- })
|
|
|
- }
|
|
|
- return await axios({
|
|
|
- method: "POST",
|
|
|
- url: process.env.VUE_APP_BASE_API + '/mk/as/problem/editSolve',
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'multipart/form-data',
|
|
|
- 'Authorization': 'Bearer ' + getToken()
|
|
|
- },
|
|
|
- data: formData,
|
|
|
- }).then(res =>{
|
|
|
- if(res.data.code == 200){
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
- this.dialogVisible = false
|
|
|
- this.cancel()
|
|
|
- this.handleClick()
|
|
|
+ this.$refs["form1"].validate(async valid => {
|
|
|
+ if(valid){
|
|
|
+ if(this.form.id != undefined){
|
|
|
+ let formData = new FormData();
|
|
|
+ formData.append("problemInfo",new Blob([JSON.stringify(this.form)], {type: "application/json"}))
|
|
|
+ if(this.pictureList.length < 1 ){
|
|
|
+ formData.append("files",null)
|
|
|
+ }else {
|
|
|
+ this.pictureList.forEach(file =>{
|
|
|
+ formData.append("files",file.raw)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(this.form){
|
|
|
+ this.processorOptions.forEach((item) =>{
|
|
|
+ if(item.userName == this.form.processor){
|
|
|
+ this.form.processorName=item.nickName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return await axios({
|
|
|
+ method: "POST",
|
|
|
+ url: process.env.VUE_APP_BASE_API + '/mk/as/problem/editSolve',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
|
+ 'Authorization': 'Bearer ' + getToken()
|
|
|
+ },
|
|
|
+ data: formData,
|
|
|
+ }).then(res =>{
|
|
|
+ if(res.data.code == 200){
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.cancel()
|
|
|
+ this.handleClick()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
//预览图片功能
|
|
|
handlePictureCardPreview(file) {
|
|
|
this.dialogVisiblePicture = true
|
|
|
this.dialogImageUrl = file.url
|
|
|
-
|
|
|
},
|
|
|
//移除图片功能
|
|
|
async handleRemove(file, fileList) {
|
|
|
await axios({
|
|
|
method: "get",
|
|
|
- url: `https://dev-sy.derom.com/document-center/fastdfs/delete?id=${file.id}`,
|
|
|
+ url: `https://sy.derom.com/document-center/fastdfs/delete?id=${file.id}`,
|
|
|
}).then(res =>{
|
|
|
if(res.data.code == 200) {
|
|
|
this.$message.success("移除图片成功")
|
|
@@ -878,36 +943,16 @@ export default {
|
|
|
this.pictureList = fileList
|
|
|
},
|
|
|
handleClose(done) {
|
|
|
- this.form = {
|
|
|
- id:undefined,
|
|
|
- problemCode:'',
|
|
|
- projectSource:'',
|
|
|
- questioner:'',
|
|
|
- problemType:'',
|
|
|
- roomInformation:'',
|
|
|
- processor:'',
|
|
|
- processorWay:'',
|
|
|
- problemDescription:'',
|
|
|
- problemPicture:[],
|
|
|
- questionerWay:'',
|
|
|
- processingFeedback:'',
|
|
|
- problemStateSolve:'',
|
|
|
- problemStateConvert:'',
|
|
|
- processorPicture:[],
|
|
|
- workOrderProcessor:'',
|
|
|
- processorEndTime:'',
|
|
|
- },
|
|
|
- this.restaurants=[],
|
|
|
- this.processorOptions=[],
|
|
|
this.$confirm('确认关闭?')
|
|
|
.then(_ => {
|
|
|
- done();
|
|
|
+ this.cancel()
|
|
|
})
|
|
|
.catch(_ => {});
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ projectSourceOptions:[],
|
|
|
dateRange:[],
|
|
|
isProblemOptions:[
|
|
|
{
|
|
@@ -924,11 +969,12 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
workOrderProcessorOptions:[],
|
|
|
+
|
|
|
roomInformationList:[],
|
|
|
questionerList:[],
|
|
|
rules: {
|
|
|
- projectSource: [
|
|
|
- { required: true, message: '请输入项目/医院', trigger: 'blur' },
|
|
|
+ hospitalId: [
|
|
|
+ { required: true, message: '请选择项目/医院', trigger: 'change' },
|
|
|
],
|
|
|
questioner: [
|
|
|
{ required: true, message: '请输入提问人', trigger: 'blur' },
|
|
@@ -949,6 +995,11 @@ export default {
|
|
|
{ required: true, message: '请输入负责处理人联系方式', trigger: 'blur' },
|
|
|
]
|
|
|
},
|
|
|
+ rules1: {
|
|
|
+ processingFeedback:[
|
|
|
+ { required: true, message: '请输入处理反馈', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
projectSource:'',
|
|
|
stateOne: '',
|
|
|
timeout: null,
|
|
@@ -1006,7 +1057,10 @@ export default {
|
|
|
dialogImageUrl:'',
|
|
|
dialogVisible: false,
|
|
|
dialogVisiblePicture: false,
|
|
|
+ projectSourceAndHospitalId:'',
|
|
|
+ projectSourceAndHospitalId1:'',
|
|
|
queryParams: {
|
|
|
+ hospitalId:'',
|
|
|
creatStart:'',
|
|
|
creatEnd:'',
|
|
|
problemDescription:'',
|
|
@@ -1023,12 +1077,14 @@ export default {
|
|
|
},
|
|
|
form: {
|
|
|
id:undefined,
|
|
|
+ hospitalId:[],
|
|
|
problemCode:'',
|
|
|
projectSource:'',
|
|
|
questioner:'',
|
|
|
problemType:'',
|
|
|
roomInformation:'',
|
|
|
processor:'',
|
|
|
+ processorName:'',
|
|
|
processorWay:'',
|
|
|
problemDescription:'',
|
|
|
problemPicture:[],
|