|
@@ -5,7 +5,7 @@
|
|
|
<div>
|
|
|
</div>
|
|
|
<div style="display: flex">
|
|
|
- <el-input v-model.trim="query.dishesName" clearable placeholder="请输入菜品名称" style="margin: 0 10px;width: 200px" />
|
|
|
+ <el-input v-model.trim="query.dishesName" clearable placeholder="请输入" style="margin: 0 10px;width: 200px" />
|
|
|
<el-button type="primary" class="search" @click="searchData">搜索</el-button>
|
|
|
<el-button type="primary" class="search" @click="reset" style="margin-left: 5px">重置</el-button>
|
|
|
</div>
|
|
@@ -19,17 +19,22 @@
|
|
|
{{ (sorts.page - 1) * sorts.limit + scope.$index + 1 }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="canteenName" :show-overflow-tooltip="true" label="食堂名称" />
|
|
|
- <el-table-column prop="dishesName" :show-overflow-tooltip="true" label="菜品名称" />
|
|
|
- <el-table-column prop="score" label="评分" width="70" />
|
|
|
- <el-table-column prop="evaluation" :show-overflow-tooltip="true" label="评论" />
|
|
|
+ <el-table-column prop="repairType" :show-overflow-tooltip="true" label="报修类型" />
|
|
|
+ <el-table-column prop="phoneNum" :show-overflow-tooltip="true" label="联系电话" />
|
|
|
+ <el-table-column prop="userDescription" :show-overflow-tooltip="true" label="问题描述" />
|
|
|
+<!-- <el-table-column prop="repairPic" :show-overflow-tooltip="true" label="报修照片" />-->
|
|
|
+ <el-table-column prop="status" :show-overflow-tooltip="true" :formatter = "statusFormat" label="状态" />
|
|
|
+ <el-table-column prop="maintenanceAddress" :show-overflow-tooltip="true" label="维修地址" />
|
|
|
+ <el-table-column prop="appointmentTime" :show-overflow-tooltip="true" label="预约上门时间" />
|
|
|
+ <el-table-column prop="workerId" :show-overflow-tooltip="true" :formatter = "getUserName" label="负责人" />
|
|
|
+<!-- <el-table-column prop="workerDescription" :show-overflow-tooltip="true" label="维修反馈" />-->
|
|
|
+<!-- <el-table-column prop="resultPic" :show-overflow-tooltip="true" label="维修确认单" />-->
|
|
|
<el-table-column prop="createTime" :show-overflow-tooltip="true" label="创建时间" width="160" />
|
|
|
<el-table-column prop="updateTime" :show-overflow-tooltip="true" label="更新时间" width="160" />
|
|
|
<el-table-column label="操作" width="230">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button class="but" type="primary" @click="info(scope.row)">详情</el-button>
|
|
|
- <el-button class="but" type="warning" @click="markEvaluation(scope.row.id)">
|
|
|
- 标记</el-button>
|
|
|
+ <el-button class="but" type="warning" @click="assign(scope.row)">指派</el-button>
|
|
|
<el-button class="but" type="danger" @click="handleDelete(scope.row.id, scope.$index)">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -50,65 +55,101 @@
|
|
|
<el-form :model="postManagement" label-width="140px">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="食堂名称">
|
|
|
- <el-input v-model="postManagement.canteenName" :readonly="true"></el-input>
|
|
|
+ <el-form-item label="报修类型">
|
|
|
+ <el-input v-model="postManagement.repairType" :readonly="true"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="菜品名称">
|
|
|
- <el-input v-model="postManagement.dishesName" :readonly="true"></el-input>
|
|
|
+ <el-form-item label="联系电话">
|
|
|
+ <el-input v-model="postManagement.phoneNum" :readonly="true"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="评分">
|
|
|
- <el-input v-model="postManagement.score" :readonly="true"></el-input>
|
|
|
+ <el-form-item label="维修地址">
|
|
|
+ <el-input type="textarea"
|
|
|
+ :autosize="{ minRows: 2, maxRows: 4}" v-model="postManagement.maintenanceAddress" :readonly="true"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="评论人">
|
|
|
- <el-input v-model="postManagement.nickName" :readonly="true"></el-input>
|
|
|
+ <el-form-item label="预约上门时间">
|
|
|
+ <el-input v-model="postManagement.appointmentTime" :readonly="true"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="评论">
|
|
|
- <el-input type="textarea" v-model="postManagement.evaluation" :autosize="{ minRows: 4, maxRows: 6}"
|
|
|
- resize="none" :readonly="true"></el-input>
|
|
|
+ <el-form-item label="问题描述">
|
|
|
+ <el-input type="textarea"
|
|
|
+ :autosize="{ minRows: 2, maxRows: 4}"
|
|
|
+ v-model="postManagement.userDescription" :readonly="true"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="评论图">
|
|
|
- <el-image style="width:100px; height:100px;margin:0 5px 0 10px;" v-for="(urls,index) in photoUrl"
|
|
|
- :key="index" :src="urls" :preview-src-list="photoUrl">
|
|
|
- </el-image>
|
|
|
+ <el-image style="width:100px; height:100px;margin:0 5px 0 10px;" v-for="(urls,index) in repair_pic"
|
|
|
+ :key="index" :src="urls" :preview-src-list="repair_pic">
|
|
|
+ </el-image>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="维修负责人">
|
|
|
+ <el-input v-model="postManagement.userDescription" :readonly="true"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="维修反馈">
|
|
|
+ <el-input type="textarea"
|
|
|
+ :autosize="{ minRows: 2, maxRows: 4}" v-model="postManagement.userDescription" :readonly="true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-image style="width:100px; height:100px;margin:0 5px 0 10px;" v-for="(urls,index) in result_pic"
|
|
|
+ :key="index" :src="urls" :preview-src-list="result_pic">
|
|
|
+ </el-image>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="workDialog = false" size="mini">返回</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :visible.sync="assignDialog" width="50%" class="detailDialog" :close-on-click-modal="false" top="40px">
|
|
|
+ <div slot="title">
|
|
|
+ <div class="addTitle">{{ workTitle }}</div>
|
|
|
+ </div>
|
|
|
+ <workerDialog ref="workerDialog"/>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="setUserToOrder" size="mini">确认</el-button>
|
|
|
+ <el-button @click="assignDialog = false" size="mini">返回</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import api from '../../api'
|
|
|
+ import Repair from "@/api/repair";
|
|
|
|
|
|
+ import WorkerDialog from "@/views/repair/components/WorkerDialog.vue";
|
|
|
export default {
|
|
|
name: 'EvaluationManage',
|
|
|
+ components: { WorkerDialog },
|
|
|
created() {
|
|
|
this.getData()
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ workDialog:false,
|
|
|
+ assignDialog:false,
|
|
|
imgUrl: process.env.VUE_APP_IMG_URL,
|
|
|
tableStyle: {
|
|
|
textAlign: 'center',
|
|
@@ -122,15 +163,48 @@
|
|
|
tableData: [],
|
|
|
// 总数
|
|
|
total: 0,
|
|
|
-
|
|
|
+ postManagement:{},
|
|
|
+ repair_pic : [],
|
|
|
+ result_pic : [],
|
|
|
// 分页
|
|
|
sorts: {
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
},
|
|
|
+ tableDataOne:{}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ statusFormat(data){
|
|
|
+ switch (data.status) {
|
|
|
+ case 0:
|
|
|
+ return '待审核'
|
|
|
+ case 1:
|
|
|
+ return '待维修'
|
|
|
+ case 3:
|
|
|
+ return '已完成'
|
|
|
+ case -1:
|
|
|
+ return '维修失败'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setUserToOrder(){
|
|
|
+ let worker = this.$refs.workerDialog.tableDataOne;
|
|
|
+ let params = {
|
|
|
+ workerId : worker.id,
|
|
|
+ repairId : this.postManagement.id
|
|
|
+ }
|
|
|
+ Repair.setAssign({params}).then(r=>{
|
|
|
+ console.log(r);
|
|
|
+ })
|
|
|
+ this.assignDialog = false;
|
|
|
+ },
|
|
|
+ getUserName(data){
|
|
|
+ let params = {
|
|
|
+ workerId:data.workerId
|
|
|
+ }
|
|
|
+ // ...
|
|
|
+ return 0
|
|
|
+ },
|
|
|
//切换列表条数
|
|
|
handleSizeChange(pageSize) {
|
|
|
this.sorts.limit = pageSize
|
|
@@ -146,24 +220,44 @@
|
|
|
|
|
|
// 详情
|
|
|
info: function (data) {
|
|
|
- this.workTitle = "详情";
|
|
|
+ this.workTitle = "工单详情";
|
|
|
this.postManagement = JSON.parse(JSON.stringify(data));
|
|
|
- this.photoUrl = [];
|
|
|
- if (this.postManagement.photoPath) {
|
|
|
+ this.repair_pic = [];
|
|
|
+ this.result_pic = [];
|
|
|
+ if (this.postManagement.repairPic) {
|
|
|
let params = {
|
|
|
- picId: this.postManagement.photoPath
|
|
|
+ picId: this.postManagement.repairPic
|
|
|
}
|
|
|
- api.getFoodPicByPicId({
|
|
|
+ Repair.getFoodPicByPicId({
|
|
|
params
|
|
|
}).then(r => {
|
|
|
for (let i = 0; i < r.data.data.length; i++) {
|
|
|
- this.photoUrl.push(this.imgUrl + r.data.data[i].path)
|
|
|
+ this.repair_pic.push(this.imgUrl + r.data.data[i].path)
|
|
|
}
|
|
|
- this.workDialog = true;
|
|
|
})
|
|
|
- } else {
|
|
|
- this.workDialog = true;
|
|
|
}
|
|
|
+
|
|
|
+ if (this.postManagement.resultPic) {
|
|
|
+ let params = {
|
|
|
+ picId: this.postManagement.resultPic
|
|
|
+ }
|
|
|
+ Repair.getFoodPicByPicId({
|
|
|
+ params
|
|
|
+ }).then(r => {
|
|
|
+ for (let i = 0; i < r.data.data.length; i++) {
|
|
|
+ this.repair_pic.push(this.imgUrl + r.data.data[i].path)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.workDialog = true;
|
|
|
+
|
|
|
+ },
|
|
|
+ assign(data){
|
|
|
+ console.log(data);
|
|
|
+ this.workTitle = "工单指派";
|
|
|
+ this.postManagement = JSON.parse(JSON.stringify(data));
|
|
|
+ this.assignDialog = true;
|
|
|
+ // this.tableDataOne = data;
|
|
|
},
|
|
|
// 删除
|
|
|
handleDelete(id, index) {
|
|
@@ -202,13 +296,15 @@
|
|
|
},
|
|
|
// 获取列表数据
|
|
|
getData() {
|
|
|
- api.queryEvaluationByPage({
|
|
|
- page: this.sorts.page,
|
|
|
+ let params = {
|
|
|
+ page: this.sorts.page-1,
|
|
|
size: this.sorts.limit,
|
|
|
- dishesName: this.query.dishesName
|
|
|
+ }
|
|
|
+ Repair.queryByRepair({
|
|
|
+ params
|
|
|
}).then(r => {
|
|
|
- this.total = r.data.data.totalElements
|
|
|
- this.tableData = r.data.data.content
|
|
|
+ this.total = r.data.totalElements
|
|
|
+ this.tableData = r.data.content
|
|
|
})
|
|
|
},
|
|
|
// 搜索
|