feat: 0517优化

演示数据2.0
chenhc 11 months ago
parent 9e36fe67e4
commit 2987836967

@ -17,7 +17,7 @@
>
<i class="el-icon-plus" />
</el-upload>
<span class="msg" v-show="isShowTip">{{this.limit}},{{this.fileSize}}MB</span>
<span class="msg" v-show="isShowTip">{{this.maxFiles}},{{this.fileSize}}MB</span>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>

@ -5,7 +5,14 @@ import {deviceRepairInfo} from "@/api/dev/deviceRepairApi";
export default {
name: "deviceRepairDialog",
props: {repairId: {require: true}},
props: {
repairId:
{ require: true },
disabledUp:
{required: false,
default: false,
type: Boolean},
},
data() {
return {
maxFiles: 3, // 允许同时上传的最大文件数

@ -8,7 +8,7 @@
<el-button @click="getInfo"></el-button>
</div>
</div>
<el-descriptions border label-style="width:90px" :column="4">
<el-descriptions border label-style="width:90px" :column="4" >
<el-descriptions-item label="维修号">{{ info.id }}</el-descriptions-item>
<el-descriptions-item label="状态"><el-tag :type="info.finishFlag?'success':'warning'">{{
info.finishFlag ? '已完成' : '未完成'
@ -43,7 +43,7 @@
:fileSizeLimit="this.fileSizeLimit"
:type="deptDeviceCheck"
:uploadedFileNames="info.livePath"
:isShowTip="false"
:disabledUp="info.finishFlag || this.disabledUp"
@changeComponent1Data="component1DataChange"
></localImageUpload>
@ -51,8 +51,31 @@
<el-descriptions-item label="诊断信息" :label-style="{'height': '100px'}" :span="4">
{{ info.diagnosisInfo }}
</el-descriptions-item>
<el-descriptions-item label="诊断图片" span="4" label-style="height:100px">
<localImageUpload
:fileType="['image/jpeg','image/png','image/gif']"
:maxFiles= "this.maxFiles"
:fileSizeLimit="this.fileSizeLimit"
:type="deptDeviceCheck"
:uploadedFileNames="info.diagnosisLivePath"
:disabledUp="info.finishFlag || this.disabledUp"
@changeComponent1Data="component1DataChange"
></localImageUpload>
</el-descriptions-item>
<el-descriptions-item label="维修内容" :label-style="{'height': '100px'}" :span="4" >
<el-input type="textarea" resize="none" :autosize="{ minRows: 4, maxRows: 4 }" clearable v-model.trim="info.repairDescription" :disabled="info.finishFlag"></el-input>
<el-input type="textarea" resize="none" :autosize="{ minRows: 4, maxRows: 4 }" clearable v-model.trim="info.repairDescription" :disabled="info.finishFlag || this.disabledUp" ></el-input>
</el-descriptions-item>
<el-descriptions-item label="维修后现场图片" :span="4" label-style="height:100px">
<localImageUpload
:fileType="['image/jpeg','image/png','image/gif']"
:maxFiles= "this.maxFiles"
:fileSizeLimit="this.fileSizeLimit"
:type="deptDeviceCheck"
:uploadedFileNames="info.serviceLivePath"
:disabledUp="info.finishFlag || this.disabledUp"
@changeComponent1Data="component1DataChange"
></localImageUpload>
</el-descriptions-item>
</el-descriptions>
</el-card>

@ -218,7 +218,7 @@
<el-descriptions-item label="规格">
{{ item.ggxh }}
</el-descriptions-item>
<el-descriptions-item label="问题描述">
<el-descriptions-item label="问题描述" span="2">
<el-row>
<el-col>
<el-form-item label=" " prop="description">
@ -229,6 +229,19 @@
</el-col>
</el-row>
</el-descriptions-item>
<el-descriptions-item label="报修现场图片" span="4" label-style="height:100px">
<localImageUpload
:fileType="['image/jpeg','image/png','image/gif']"
:maxFiles= "this.maxFiles"
:fileSizeLimit="this.fileSizeLimit"
:type="deptDeviceCheck"
:uploadedFileNames="this.uploadedFileNames"
:isShowTip="false"
@changeComponent1Data="component1DataChange"
></localImageUpload>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>

@ -142,13 +142,24 @@
:uploadedFileNames="currentRow.livePath"
:isShowTip="false"
:disabledUp="true"
@changeComponent1Data="component1DataChange"
></localImageUpload>
</el-descriptions-item>
<el-descriptions-item label="诊断信息" :label-style="{'height': '100px'}" :span="4">
{{ currentRow.diagnosisInfo }}
</el-descriptions-item>
<el-descriptions-item label="诊断图片" span="4" label-style="height:100px">
<localImageUpload
:fileType="['image/jpeg','image/png','image/gif']"
:maxFiles= "this.maxFiles"
:fileSizeLimit="this.fileSizeLimit"
:type="deptDeviceCheck"
:uploadedFileNames="currentRow.diagnosisLivePath"
:disabledUp="true"
></localImageUpload>
</el-descriptions-item>
<el-descriptions-item label="维修内容" :label-style="{'height': '100px'}" :span="4" >
<el-input type="textarea" resize="none" :autosize="{ minRows: 4, maxRows: 4 }" clearable v-model.trim="currentRow.repairDescription" :disabled="currentRow.finishFlag"></el-input>
</el-descriptions-item>

@ -89,6 +89,7 @@
<el-table :data="detailList" v-loading="detailLoading">
<el-table-column label="序号" width="50" type="index"/>
<el-table-column label="设备编码" width="150" prop="deviceCode"/>
<el-table-column label="设备部门" width="100" prop="deptName"/>
<el-table-column label="最小销售标识" width="150" prop="nameCode"/>
<el-table-column label="名称" width="150" prop="productName"/>
<el-table-column label="规格型号" width="160" prop="ggxh"/>
@ -201,7 +202,7 @@
<el-descriptions border label-style="width:70px" :column="2">
<el-descriptions-item label="名称" >{{ item.productName }}</el-descriptions-item>
<el-descriptions-item label="规格" >{{ item.ggxh }}</el-descriptions-item>
<el-descriptions-item label="问题描述" >
<el-descriptions-item label="问题描述" disabled>
<el-row>
<el-col>
<el-form-item label=" " prop="description">
@ -212,6 +213,19 @@
</el-col>
</el-row>
</el-descriptions-item>
<el-descriptions-item label="报修现场图片" span="4" label-style="height:100px">
<localImageUpload
:fileType="['image/jpeg','image/png','image/gif']"
:maxFiles= "maxFiles"
:fileSizeLimit="fileSizeLimit"
:type="deptDeviceCheck"
:uploadedFileNames="item.livePath"
:isShowTip="false"
:disabledUp="true"
></localImageUpload>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
@ -240,7 +254,8 @@
title="维修单信息"
width="80%"
>
<deviceRepairDialog :repairId="repairId"/>
<deviceRepairDialog :repairId="repairId" :disabledUp="true" />
</el-dialog>
</div>
</template>

@ -101,6 +101,7 @@
<el-table :data="detailList" v-loading="detailLoading">
<el-table-column label="序号" width="50" type="index"/>
<el-table-column label="设备编码" width="150" prop="deviceCode"/>
<el-table-column label="设备部门" width="100" prop="deptName"/>
<el-table-column label="最小销售标识" width="150" prop="nameCode"/>
<el-table-column label="名称" width="150" prop="productName"/>
<el-table-column label="规格型号" width="160" prop="ggxh"/>
@ -187,6 +188,17 @@
<el-descriptions-item label="问题描述" :label-style="{'height': '100px'}" :span="3">
{{ detailData.description }}
</el-descriptions-item>
<el-descriptions-item label="报修现场图片" span="4" label-style="height:100px">
<localImageUpload
:fileType="['image/jpeg','image/png','image/gif']"
:maxFiles= "maxFiles"
:fileSizeLimit="fileSizeLimit"
:type="deptDeviceCheck"
:uploadedFileNames="detailData.livePath"
:isShowTip="false"
:disabledUp="true"
></localImageUpload>
</el-descriptions-item>
<el-descriptions-item label="是否维修" :span="3">
<el-form-item label=" " prop="repairFlag" style="margin-bottom: 0">
<el-radio-group v-model="diagnosisData.repairFlag">
@ -238,6 +250,21 @@
maxlength="300" v-model.trim="diagnosisData.diagnosisInfo"/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="诊断图片" span="4" label-style="height:100px">
<localImageUpload
:fileType="['image/jpeg','image/png','image/gif']"
:maxFiles= "this.maxFiles"
:fileSizeLimit="this.fileSizeLimit"
:type="deptDeviceCheck"
:uploadedFileNames="this.uploadedFileNames"
:isShowTip="false"
@changeComponent1Data="component1DataChange"
></localImageUpload>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
@ -250,7 +277,7 @@
title="维修单信息"
width="80%"
>
<deviceRepairDialog :repairId="repairId"/>
<deviceRepairDialog :repairId="repairId" :disabledUp="true" />
</el-dialog>
</div>
</template>

@ -92,6 +92,7 @@
<el-table :data="detailList" v-loading="detailLoading">
<el-table-column label="序号" width="50" type="index"/>
<el-table-column label="设备编码" width="150" prop="deviceCode"/>
<el-table-column label="设备部门" width="100" prop="deptName"/>
<el-table-column label="最小销售标识" width="150" prop="nameCode"/>
<el-table-column label="名称" width="150" prop="productName"/>
<el-table-column label="规格型号" width="160" prop="ggxh"/>

@ -38,6 +38,10 @@ export default {
props: {isChoose: {required: false, default: false, type: Boolean}, chooseFunc: {required: false, type: Function}},
data() {
return {
maxFiles: 3, // 允许同时上传的最大文件数
fileSizeLimit: 5, // 允许上传的文件大小限制MB
uploadedFileNames: '', // 存储已上传文件名,逗号隔开
locDeptCode: null,
clickRow: null,
showSearch: true,
@ -66,6 +70,13 @@ export default {
this.getDetailList()
},
methods: {
/**
* 父组件处理子组件发送的数据更改
* @param params
*/
component1DataChange(params) {
this.uploadedFileNames = params;
},
downloadBase64Image,
tableRowClassName({row}) {
if (row.checked) return "warning-row";
@ -76,6 +87,7 @@ export default {
this.$message.error("请选择一个设备!")
return
}
this.item.livePath = this.uploadedFileNames
this.chooseFunc(this.item)
},
handleChange(val) {
@ -83,6 +95,7 @@ export default {
this.currentRow = val;
this.item = val;
this.multipleSelection = val
this.uploadedFileNames = val.livePath
},
genQR(row) {
genDeviceQR(row.deviceCode).then(res => {

@ -37,6 +37,10 @@ export default {
},
data() {
return {
maxFiles: 3, // 允许同时上传的最大文件数
fileSizeLimit: 5, // 允许上传的文件大小限制MB
uploadedFileNames: '', // 存储已上传文件名,逗号隔开
showSearch: true,
loading: false,
total: .0,

@ -33,6 +33,7 @@ let diagnosisData = {
repairUserName: '',
repairUserPhone: '',
diagnosisInfo: '',
diagnosisLivePath: '',
}
export default {
@ -47,6 +48,10 @@ export default {
},
data() {
return {
maxFiles: 3, // 允许同时上传的最大文件数
fileSizeLimit: 5, // 允许上传的文件大小限制MB
uploadedFileNames: '', // 存储已上传文件名,逗号隔开
tabActive: 1,
showSearch: true,
loading: false,
@ -114,6 +119,13 @@ export default {
this.getList()
},
methods: {
/**
* 父组件处理子组件发送的数据更改
* @param params
*/
component1DataChange(params) {
this.uploadedFileNames = params;
},
repairInfo(row) {
this.repairId = row.repairId
},
@ -122,6 +134,7 @@ export default {
if (!b) {
return
}
this.diagnosisData.diagnosisLivePath = this.uploadedFileNames
deviceRepairApplyDetailDiagnosis(this.diagnosisData).then(res => {
if (res.code != 20000) {
this.$message.error(res.message)
@ -168,6 +181,7 @@ export default {
openDiagnosisDialog(row) {
this.detailFlag = true
this.detailData = _.cloneDeep(row)
this.uploadedFileNames = row.diagnosisLivePath
this.diagnosisData = _.cloneDeep({...diagnosisData, applyId: row.applyId, deviceCode: row.deviceCode})
},
confirm(row) {

@ -180,6 +180,7 @@
:pId="pId"
:purType="1"
:codeArray="codeArray"
:attributeType="pageType==2?1:2"
></purApplyProducts>
</el-dialog>

Loading…
Cancel
Save