优化报废等页面数据回显,操作事件等
This commit is contained in:
parent
b19296dbe4
commit
bd89662085
|
|
@ -80,7 +80,6 @@ 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' },
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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: 'remark', t_label: '报废原因' },
|
||||
{ t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' },
|
||||
{ t_width: '', t_props: '', t_label: '损坏原因', t_slot: 't_damage' },
|
||||
{ t_width: '', t_props: '', t_label: '报废图片', t_slot: 't_img' },
|
||||
],
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,14 +91,19 @@
|
|||
:sendApi="getDialogListApi"
|
||||
:config="dialogConfig"
|
||||
>
|
||||
<template slot="imgPreview">
|
||||
<ImagePreview
|
||||
:src="``"
|
||||
:width="`30px`"
|
||||
:height="`30px`"
|
||||
<!-- 损坏原因 -->
|
||||
<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> </TableModel
|
||||
></template>
|
||||
</template>
|
||||
</TableModel>
|
||||
</template>
|
||||
|
||||
<template v-else-if="dialogConfig.outerTitle === '附件信息'">
|
||||
<el-table :data="fileList" border>
|
||||
|
|
@ -156,12 +161,14 @@ 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 {
|
||||
|
|
@ -203,7 +210,14 @@ export default {
|
|||
this.dialogConfig.outerWidth = '70%'
|
||||
this.dialogConfig.outerVisible = true
|
||||
},
|
||||
handleDisposition() {
|
||||
handleDisposition(row) {
|
||||
this.dispositionParams = []
|
||||
this.dispositionParams.push({
|
||||
taskId: row.taskId,
|
||||
fileUrl: '', // 附件url
|
||||
fileName: '', // 附件名称
|
||||
disposition: 1, // 处置状态 0、未处置 1、已处置
|
||||
})
|
||||
this.dialogConfig.outerTitle = '处置'
|
||||
this.dialogConfig.outerWidth = '60%'
|
||||
this.dialogConfig.outerVisible = true
|
||||
|
|
@ -224,6 +238,7 @@ 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
|
||||
|
|
@ -241,7 +256,7 @@ export default {
|
|||
/* 确定 */
|
||||
async handleSubmitInner() {
|
||||
if (this.uploadFileList.length < 1) {
|
||||
this.$message.error('请先上传图片')
|
||||
this.$message.error('请先上传文件')
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -251,25 +266,15 @@ 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()
|
||||
this.$refs.tbRef.getList()
|
||||
}
|
||||
},
|
||||
/* 获取上传后的图片信息 */
|
||||
|
|
@ -289,7 +294,7 @@ export default {
|
|||
taskId: e.taskId,
|
||||
fileUrl: '', // 附件url
|
||||
fileName: '', // 附件名称
|
||||
disposition: 1, // 处置状态 0、未通过 1、通过
|
||||
disposition: 1, // 处置状 0、未处置 1、已处置
|
||||
}
|
||||
|
||||
this.dispositionParams.push(prams)
|
||||
|
|
|
|||
|
|
@ -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: 'remark', t_label: '报废原因' },
|
||||
{ t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' },
|
||||
{ t_width: '', t_props: '', t_label: '损坏原因', t_slot: 't_damage' },
|
||||
{ t_width: '', t_props: '', t_label: '报废图片', t_slot: 't_img' },
|
||||
],
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
v-hasPermi="['scrap:auditing']"
|
||||
@click="handleAuditing(data)"
|
||||
>
|
||||
<!-- v-if="auditingIsShow(data)" -->
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
|
|
@ -75,14 +76,19 @@
|
|||
:sendApi="getDialogListApi"
|
||||
:config="dialogConfig"
|
||||
>
|
||||
<template slot="imgPreview" slot-scope="{ data }">
|
||||
<ImagePreview
|
||||
:src="``"
|
||||
:width="`30px`"
|
||||
:height="`30px`"
|
||||
<!-- 损坏原因 -->
|
||||
<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> </TableModel
|
||||
></template>
|
||||
</template>
|
||||
</TableModel>
|
||||
</template>
|
||||
<template v-if="dialogConfig.outerTitle === '审核'">
|
||||
<TableModel
|
||||
:config="dialogConfig"
|
||||
|
|
@ -149,6 +155,7 @@ 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,
|
||||
|
|
@ -161,6 +168,7 @@ export default {
|
|||
DialogModel,
|
||||
ScrapSource,
|
||||
AuditingDetails,
|
||||
ScrapImg,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue