mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 10:19:36 +08:00
修改了对应设备类型列表和楼层列表
This commit is contained in:
parent
dcef42fdbc
commit
80fbcaf0fd
21
src/api/admin/repair/repairStats.js
Normal file
21
src/api/admin/repair/repairStats.js
Normal file
@ -0,0 +1,21 @@
|
||||
import { axios } from '@/utils/request'
|
||||
|
||||
const api = {
|
||||
repairStats: '/admin/repair/stats'
|
||||
}
|
||||
|
||||
export function getWorkerList (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/workerList',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
export function getFloorList (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/floorList',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
<template v-slot:title>
|
||||
<span>待分配</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status >= 0">
|
||||
<template v-slot:description v-if="mdl.status >= 1">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.createBy }}
|
||||
<div>{{ mdl.createTime }}</div>
|
||||
@ -18,7 +18,18 @@
|
||||
<template v-slot:title>
|
||||
<span>待处理</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status >= 1">
|
||||
<template v-slot:description v-if="mdl.status >= 5">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-step>
|
||||
<a-step>
|
||||
<template v-slot:title>
|
||||
<span>处理中</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status >= 7">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
@ -29,7 +40,18 @@
|
||||
<template v-slot:title>
|
||||
<span>已完成</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status >= 2">
|
||||
<template v-slot:description v-if="mdl.status >= 9">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-step>
|
||||
<a-step>
|
||||
<template v-slot:title>
|
||||
<span>已废弃</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status == 11">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
@ -40,7 +62,7 @@
|
||||
<template v-slot:title>
|
||||
<span>已评价</span>
|
||||
</template>
|
||||
<template v-slot:description v-if="mdl.status >= 3">
|
||||
<template v-slot:description v-if="mdl.status == 13">
|
||||
<div class="antd-pro-pages-profile-advanced-style-stepDescription">
|
||||
{{ mdl.updateBy }}
|
||||
<div>{{ mdl.updateTime }}</div>
|
||||
@ -77,9 +99,14 @@
|
||||
报修图片
|
||||
</span>
|
||||
<div style="margin-bottom: 50px; margin-left: 30px" class="clearfix">
|
||||
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
|
||||
<img alt="example" style="width: 100%" :src="previewImage" />
|
||||
</a-modal>
|
||||
<div class="fileList">
|
||||
<video class="file video" :src="item.url" v-for="item in files.voice"
|
||||
controls/>
|
||||
<img class="file image" :src="item.url" v-for="item in files.repair"
|
||||
v-if="item.fileType== 'image'" />
|
||||
<video class="file video" :src="item.url" v-for="item in files.repair"
|
||||
v-if="item.fileType== 'video'" controls/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@ -171,11 +198,9 @@ export default {
|
||||
// 工人评价
|
||||
workerScore: 0
|
||||
},
|
||||
previewVisible: false,
|
||||
previewImage: '',
|
||||
fileList: [],
|
||||
// form
|
||||
form: this.$form.createForm(this)
|
||||
form: this.$form.createForm(this),
|
||||
files: {}
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
@ -221,22 +246,48 @@ export default {
|
||||
if (record.log.length > 0) {
|
||||
this.dataSource = record.log
|
||||
}
|
||||
if (record.files.feedback) {
|
||||
record.files.feedback.forEach((item, i) => {
|
||||
item.url = process.env.VUE_APP_API_BASE_URL + item.url
|
||||
})
|
||||
console.log(record.files.feedback[0].url
|
||||
)
|
||||
this.fileList = record.files.feedback
|
||||
// this.previewImage = .url
|
||||
} else {
|
||||
this.fileList = []
|
||||
}
|
||||
// 报修图片
|
||||
// this.fileList = record.files.feedback
|
||||
record.files.repair = record.files.repair.map((item) => {
|
||||
item.url = process.env.VUE_APP_MODEL_BASE_URL + item.url
|
||||
item.fileType = this.checkMediaType(item.url)
|
||||
return item
|
||||
})
|
||||
record.files.voice = record.files.voice.map((item) => {
|
||||
item.url = process.env.VUE_APP_MODEL_BASE_URL + item.url
|
||||
return item
|
||||
})
|
||||
this.files = record.files
|
||||
console.log(this.files.voice)
|
||||
})
|
||||
}
|
||||
},
|
||||
checkMediaType (url) {
|
||||
// 创建URL对象
|
||||
let link = new URL(url)
|
||||
|
||||
// 获取路径部分(去除参数)
|
||||
let path = link.pathname
|
||||
|
||||
// 获取路径的最后一个点之后的内容作为文件扩展名
|
||||
let extension = path.split('.').pop().toLowerCase()
|
||||
|
||||
// 声明支持的图片和视频文件扩展名
|
||||
let imageExtensions = ['jpg', 'jpeg', 'gif', 'png']
|
||||
let videoExtensions = ['mp4', 'wmv', 'avi', 'mov']
|
||||
|
||||
// 判断文件扩展名是否在图片扩展名数组中
|
||||
if (imageExtensions.includes(extension)) {
|
||||
return 'image'
|
||||
}
|
||||
|
||||
// 判断文件扩展名是否在视频扩展名数组中
|
||||
if (videoExtensions.includes(extension)) {
|
||||
return 'video'
|
||||
}
|
||||
|
||||
// 扩展名不在图片或视频数组中,返回null表示无法确定媒体类型
|
||||
return null
|
||||
},
|
||||
|
||||
handleCancel () {
|
||||
this.previewVisible = false
|
||||
},
|
||||
@ -273,7 +324,7 @@ function getBase64 (file) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped >
|
||||
/* you can make up upload button and sample style by using stylesheets */
|
||||
.ant-upload-select-picture-card i {
|
||||
font-size: 32px;
|
||||
@ -284,4 +335,26 @@ function getBase64 (file) {
|
||||
margin-top: 8px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.fileList{
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.fileList .file{
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.fileList .image{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.fileList .video{
|
||||
width: 160px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
|
@ -15,10 +15,10 @@
|
||||
<a-input v-decorator="['version']" />
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
|
||||
<a-input placeholder="名称" v-decorator="['name']" />
|
||||
<a-input placeholder="名称" v-decorator="['name', {rules: [{ required: true, message: '请输入设备名称' }]} ]" />
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="品牌">
|
||||
<a-input placeholder="品牌" v-decorator="['brand']" />
|
||||
<a-input placeholder="品牌" v-decorator="['brand', {rules: [{ required: true, message: '请输入品牌' }]}]" />
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="规格">
|
||||
<a-input placeholder="规格" v-decorator="['specification']" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user