7/30 限制前端输入字数
This commit is contained in:
@@ -30,7 +30,9 @@
|
||||
<el-col :span="8">
|
||||
<div class="carInfo_Item">
|
||||
<div class="label">问题描述:</div>
|
||||
<div class="main">{{ form.problem }}</div>
|
||||
<div class="main" style="font-size: small; max-width: 200px">
|
||||
<span>{{ form.problem }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -56,12 +58,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="mb-20px">
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <div class="carInfo_Item">-->
|
||||
<!-- <div class="label">提交人:</div>-->
|
||||
<!-- <div class="main">{{ form.problem }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="8">
|
||||
<div class="carInfo_Item">
|
||||
<div class="label">提交时间:</div>
|
||||
@@ -69,22 +65,23 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.problemImageUrl.trim() === ''">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="carInfo_Item">
|
||||
<div class="label">附件:</div>
|
||||
<div class="main fileImagebox">
|
||||
<div class="main fileImagebox" v-if="form.problemImageUrlList.length > 0">
|
||||
<el-image
|
||||
:preview-teleported="true"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="form.problemImageUrl.split(',').filter(Boolean)"
|
||||
:preview-src-list="form.problemImageUrlList"
|
||||
show-progress
|
||||
:initial-index="0"
|
||||
v-for="(item, index) in form.problemImageUrl.split(',').filter(Boolean)"
|
||||
v-for="(item, index) in form.problemImageUrlList"
|
||||
:key="index"
|
||||
:src="splitImages(item)"
|
||||
:src="item"
|
||||
lazy
|
||||
class="carInfoImage"
|
||||
></el-image>
|
||||
</div>
|
||||
@@ -106,6 +103,7 @@
|
||||
<repairUser :is-multiple="false" :username="form.repairName" :userid="form.repairUserId" @change="handleChange"> </repairUser>
|
||||
<div class="actions mt-5">
|
||||
<el-button v-if="form.problemStatus === '0'" @click="handleSend" type="primary">确定派单</el-button>
|
||||
<el-button v-if="form.problemStatus === '1'" @click="handleChangeRepairUser" type="primary">变更人员</el-button>
|
||||
<el-button @click="backRouter">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,32 +121,6 @@
|
||||
</div>
|
||||
</template>
|
||||
<div class="h-full w-full">
|
||||
<!-- <el-steps space="108px" direction="vertical" :active="activeStop">-->
|
||||
<!-- <el-step>-->
|
||||
<!-- <template #title>-->
|
||||
<!-- <span>完成维修 </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-step>-->
|
||||
<!-- <el-step>-->
|
||||
<!-- <template #title>-->
|
||||
<!-- <span>{{ reviewInfo.completeStatus === '0' ? '待维修' : '已维修' }} </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #description> {{ reviewInfo.completeTime ?? '维修人员进行维修' }}</template>-->
|
||||
<!-- </el-step>-->
|
||||
<!-- <el-step>-->
|
||||
<!-- <template #title>-->
|
||||
<!-- <span>{{ reviewInfo.allocateStatus === '0' ? '待分配' : '已分配' }} </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #description>{{ reviewInfo.allocateTime ?? '等待物业派单中' }} </template>-->
|
||||
<!-- </el-step>-->
|
||||
<!-- <el-step>-->
|
||||
<!-- <template #title>-->
|
||||
<!-- <span>已提交维护信息</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template #description> {{ reviewInfo.submitTime ?? '' }} </template>-->
|
||||
<!-- </el-step>-->
|
||||
<!-- </el-steps>-->
|
||||
|
||||
<StepTimeline :steps="stepList">
|
||||
<template #title="{ item }">{{ item.title }}</template>
|
||||
<template #subtitle="{ item }">{{ item.subtitle }}</template>
|
||||
@@ -169,14 +141,10 @@ import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { getRepair, updateRepair } from '@/api/system/Repair';
|
||||
import { RepairVO } from '@/api/system/Repair/type';
|
||||
import { listRepairProcess, updateRepairProcess } from '@/api/system/repairProcess';
|
||||
import { splitImages } from '@/utils';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const active = ref(0);
|
||||
const activeStop = ref(0);
|
||||
|
||||
interface formType extends RepairVO {
|
||||
problemImageUrlList: string[];
|
||||
}
|
||||
@@ -249,13 +217,12 @@ async function init() {
|
||||
pageNum: 1
|
||||
}).then((info) => {
|
||||
reviewInfo.value = info.rows[info.rows.length - 1] || null;
|
||||
console.log(reviewInfo.value);
|
||||
handleReview();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 处理审核
|
||||
// 处理审核╬╬
|
||||
function handleReview() {
|
||||
if (reviewInfo.value.submitStatus === '1') {
|
||||
// 提交完成
|
||||
@@ -269,7 +236,7 @@ function handleReview() {
|
||||
// 分配完成
|
||||
stepList.value[1].status = 'completed';
|
||||
stepList.value[1].title = '已分配';
|
||||
stepList.value[1].subtitle = `${form.value.repairName ?? '---'} ${form.value.repairPhone ?? '---'}`;
|
||||
stepList.value[1].subtitle = `${form.value.repairName ?? ''} ${form.value.repairPhone ?? ''}`;
|
||||
stepList.value[1].time = reviewInfo.value.allocateTime;
|
||||
|
||||
stepList.value[2].status = 'pending';
|
||||
@@ -295,28 +262,43 @@ if (route.query.id) {
|
||||
|
||||
/** 派单 */
|
||||
function handleSend() {
|
||||
// 已分配
|
||||
form.value.problemStatus = '1';
|
||||
updateRepair(form.value).then(() => {
|
||||
if (form.value.repairUserId && form.value.repairUserId.trim()) {
|
||||
// 已分配
|
||||
form.value.problemStatus = '1';
|
||||
reviewInfo.value.allocateTime = new Date().toLocaleString().replaceAll('/', '-');
|
||||
if (form.value.repairUserId) {
|
||||
reviewInfo.value.allocateStatus = '1';
|
||||
} else {
|
||||
reviewInfo.value.allocateStatus = '0';
|
||||
}
|
||||
updateRepairProcess(reviewInfo.value).then(() => {
|
||||
backRouter();
|
||||
updateRepair(form.value).then(() => {
|
||||
form.value.problemStatus = '1';
|
||||
reviewInfo.value.allocateTime = new Date().toLocaleString().replaceAll('/', '-');
|
||||
if (form.value.repairUserId) {
|
||||
reviewInfo.value.allocateStatus = '1';
|
||||
} else {
|
||||
reviewInfo.value.allocateStatus = '0';
|
||||
}
|
||||
updateRepairProcess(reviewInfo.value).then(() => {
|
||||
backRouter();
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
ElMessage.warning('请选择维修人员');
|
||||
}
|
||||
}
|
||||
|
||||
// 是否变更人员
|
||||
const isChangeUse = ref(false);
|
||||
/** 选择维修人员 */
|
||||
function handleChange(row) {
|
||||
const oldValue = form.value.repairUserId;
|
||||
isChangeUse.value = oldValue !== '' && oldValue !== row;
|
||||
form.value.repairUserId = row;
|
||||
}
|
||||
function handleChangeRepairUser() {
|
||||
if (form.value.repairUserId && form.value.repairUserId.trim()) {
|
||||
handleSend();
|
||||
} else {
|
||||
ElMessage.warning('请选择维修人员');
|
||||
}
|
||||
}
|
||||
|
||||
/** 返回 */
|
||||
/** 返回╬╬╬╬╬╬*/
|
||||
function backRouter() {
|
||||
router.push({
|
||||
path: '/repair/repairlist'
|
||||
@@ -350,7 +332,7 @@ function handleEdit() {
|
||||
}
|
||||
.carInfo_Item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
font-size: 14px;
|
||||
.label {
|
||||
font-weight: 600;
|
||||
@@ -359,6 +341,9 @@ function handleEdit() {
|
||||
padding-right: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.main {
|
||||
word-break: break-word;
|
||||
}
|
||||
.carInfoImage {
|
||||
margin: 10px;
|
||||
width: 200px;
|
||||
|
||||
Reference in New Issue
Block a user