Compare commits

..

No commits in common. "e915c7a40ba563b192358f9256af1365c2dcf36a" and "ec9ce6cb7f15e61aaa70abb39b6321f836175b50" have entirely different histories.

5 changed files with 33 additions and 45 deletions

View File

@ -80,6 +80,7 @@ export const dialogConfig = {
{ t_width: '', t_props: 'specificationType', t_label: '规格型号' },
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
{ t_width: '', t_props: 'auditRemark', t_label: '报废原因' },
{ t_width: '', t_props: '', t_label: '损坏原因', t_slot: 't_damage' },
{ t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' },
],

View File

@ -64,8 +64,8 @@ export const dialogConfig = {
{ t_width: '', t_props: 'specificationType', t_label: '规格型号' },
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
{ t_width: '', t_props: '', t_label: '损坏原因', t_slot: 't_damage' },
{ t_width: '', t_props: '', t_label: '报废图片', t_slot: 't_img' },
{ t_width: '', t_props: 'remark', t_label: '报废原因' },
{ t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' },
],
}

View File

@ -91,19 +91,14 @@
:sendApi="getDialogListApi"
:config="dialogConfig"
>
<!-- 损坏原因 -->
<template slot-scope="{ data }" slot="t_damage">
{{ data.scrapType == 1 ? '人为' : '自然' }}
</template>
<!-- 报废图片 -->
<template slot-scope="{ data }" slot="t_img">
<ScrapImg
v-if="data.fileUrl"
:scrapImgUrl="data.fileUrl"
<template slot="imgPreview">
<ImagePreview
:src="``"
:width="`30px`"
:height="`30px`"
/>
</template>
</TableModel>
</template>
</template> </TableModel
></template>
<template v-else-if="dialogConfig.outerTitle === '附件信息'">
<el-table :data="fileList" border>
@ -161,14 +156,12 @@ import {
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import ScrapSource from '../../component/scrapSource.vue'
import ScrapImg from '../../component/scrapImg.vue'
import { config, dialogConfig, getSelList } from './config.js'
export default {
components: {
TableModel,
DialogModel,
ScrapSource,
ScrapImg,
},
data() {
return {
@ -210,14 +203,7 @@ export default {
this.dialogConfig.outerWidth = '70%'
this.dialogConfig.outerVisible = true
},
handleDisposition(row) {
this.dispositionParams = []
this.dispositionParams.push({
taskId: row.taskId,
fileUrl: '', // url
fileName: '', //
disposition: 1, // 0 1
})
handleDisposition() {
this.dialogConfig.outerTitle = '处置'
this.dialogConfig.outerWidth = '60%'
this.dialogConfig.outerVisible = true
@ -238,7 +224,6 @@ export default {
data.dispositionFileUrl.split(',').map((e, index) => {
this.fileList[index].fileUrl = e
})
this.fileList.splice(this.fileList.length - 1, 1)
this.dialogConfig.outerTitle = '附件信息'
this.dialogConfig.outerWidth = '40%'
this.dialogConfig.outerVisible = true
@ -256,7 +241,7 @@ export default {
/* 确定 */
async handleSubmitInner() {
if (this.uploadFileList.length < 1) {
this.$message.error('请先上传文件')
this.$message.error('请先上传图片')
return
}
@ -266,15 +251,25 @@ export default {
fileUrl += e.fileUrl + ','
fileName += e.fileName + ','
})
this.dispositionParams.fileUrl = fileUrl.substring(
fileUrl.length - 1,
',',
)
this.dispositionParams.fileName = fileName.substring(
fileName.length - 1,
',',
)
this.dispositionParams.map((e) => {
e.fileUrl = fileUrl.substring(fileUrl.length - 1, ',')
e.fileName = fileName.substring(fileUrl.length - 1, ',')
})
const res = await submitDispositionApi(this.dispositionParams)
if (res.code == 200) {
this.$message.success('处置成功!')
this.dialogConfig.outerVisible = false
this.$refs.tbRef.getList()
this.$refs.tbRef()
}
},
/* 获取上传后的图片信息 */
@ -294,7 +289,7 @@ export default {
taskId: e.taskId,
fileUrl: '', // url
fileName: '', //
disposition: 1, // 0 1
disposition: 1, // 0 1
}
this.dispositionParams.push(prams)

View File

@ -72,8 +72,8 @@ export const dialogConfig = {
{ t_width: '', t_props: 'specificationType', t_label: '规格型号' },
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
{ t_width: '', t_props: '', t_label: '损坏原因', t_slot: 't_damage' },
{ t_width: '', t_props: '', t_label: '报废图片', t_slot: 't_img' },
{ t_width: '', t_props: 'remark', t_label: '报废原因' },
{ t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' },
],
}

View File

@ -48,7 +48,6 @@
v-hasPermi="['scrap:auditing']"
@click="handleAuditing(data)"
>
<!-- v-if="auditingIsShow(data)" -->
审核
</el-button>
<el-button
@ -76,19 +75,14 @@
:sendApi="getDialogListApi"
:config="dialogConfig"
>
<!-- 损坏原因 -->
<template slot-scope="{ data }" slot="t_damage">
{{ data.scrapType == 1 ? '人为' : '自然' }}
</template>
<!-- 报废图片 -->
<template slot-scope="{ data }" slot="t_img">
<ScrapImg
v-if="data.fileUrl"
:scrapImgUrl="data.fileUrl"
<template slot="imgPreview" slot-scope="{ data }">
<ImagePreview
:src="``"
:width="`30px`"
:height="`30px`"
/>
</template>
</TableModel>
</template>
</template> </TableModel
></template>
<template v-if="dialogConfig.outerTitle === '审核'">
<TableModel
:config="dialogConfig"
@ -155,7 +149,6 @@ import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import ScrapSource from '../../component/scrapSource.vue'
import AuditingDetails from '../../component/auditingDetails.vue'
import ScrapImg from '../../component/scrapImg.vue'
import { config, dialogConfig, getSelList } from './config'
import {
getScrapListApi,
@ -168,7 +161,6 @@ export default {
DialogModel,
ScrapSource,
AuditingDetails,
ScrapImg,
},
data() {
return {