优化新购配件保存后无法跳转问题,解决报废图片在预报废列表不回显等问题
This commit is contained in:
parent
bb5e3b844c
commit
8bc40d2f07
|
|
@ -11,7 +11,7 @@
|
||||||
<ImagePreview
|
<ImagePreview
|
||||||
v-for="(item, index) in scrapImgList"
|
v-for="(item, index) in scrapImgList"
|
||||||
:key="index"
|
:key="index"
|
||||||
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
|
:src="item"
|
||||||
:width="`20px`"
|
:width="`20px`"
|
||||||
:height="`20px`"
|
:height="`20px`"
|
||||||
class="img-box"
|
class="img-box"
|
||||||
|
|
@ -22,24 +22,23 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
scrapImg: {
|
scrapImgUrl: {},
|
||||||
type: String,
|
|
||||||
default: () => null,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
scrapImgList: [
|
scrapImgList: [],
|
||||||
{ imgUrl: '123' },
|
impViewUrl: process.env.VUE_APP_BASE_API + '/system',
|
||||||
{ imgUrl: '123' },
|
|
||||||
{ imgUrl: '123' },
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
if (this.scrapImg) {
|
let imgList = []
|
||||||
this.scrapImgList = this.scrapImg.split(',')
|
if (this.scrapImgUrl) {
|
||||||
|
imgList = this.scrapImgUrl.split(',')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.scrapImgList = imgList.map(
|
||||||
|
(item) => (item = this.impViewUrl + item),
|
||||||
|
)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { deptTreeSelect } from '@/api/system/user'
|
import { deptTreeSelect } from '@/api/system/user'
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
deptIds: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
deptName: '',
|
deptName: '',
|
||||||
|
|
@ -144,16 +150,20 @@
|
||||||
|
|
||||||
/* 取消按钮 */
|
/* 取消按钮 */
|
||||||
handelCancel() {
|
handelCancel() {
|
||||||
this.$emit('closeDepartSel', false)
|
this.$emit('closeDepartSel', 0)
|
||||||
this.selDeptList = []
|
this.selDeptList = []
|
||||||
this.selDeptAmount = 0
|
this.selDeptAmount = 0
|
||||||
},
|
},
|
||||||
/* 确定按钮 */
|
/* 确定按钮 */
|
||||||
handelSubmit() {
|
handelSubmit() {
|
||||||
this.$emit('closeDepartSel', false, this.selDeptList)
|
this.$emit('closeDepartSel', 1, this.selDeptList)
|
||||||
this.selDeptList = []
|
this.selDeptList = []
|
||||||
this.selDeptAmount = 0
|
this.selDeptAmount = 0
|
||||||
},
|
},
|
||||||
|
/* 清空已选择的数据 */
|
||||||
|
clearNode() {
|
||||||
|
this.selDeptList = []
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 根据名称筛选部门树
|
// 根据名称筛选部门树
|
||||||
|
|
@ -161,37 +171,37 @@
|
||||||
this.$refs.tree.filter(val)
|
this.$refs.tree.filter(val)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.depart-left {
|
.depart-left {
|
||||||
border: 1px solid #f2f2f2;
|
border: 1px solid #f2f2f2;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
.head-container {
|
.head-container {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
}
|
}
|
||||||
::v-deep .el-input {
|
::v-deep .el-input {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
::v-deep .el-input--small .el-input__inner {
|
::v-deep .el-input--small .el-input__inner {
|
||||||
border-radius: 32px;
|
border-radius: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-content {
|
.tree-content {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.depart-right {
|
.depart-right {
|
||||||
border: 1px solid #f2f2f2;
|
border: 1px solid #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-header {
|
.right-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
@ -201,9 +211,9 @@
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-container {
|
.right-container {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
|
|
@ -212,10 +222,10 @@
|
||||||
align-content: center;
|
align-content: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-btn {
|
.footer-btn {
|
||||||
padding: 15px 5px 0;
|
padding: 15px 5px 0;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ export const dialogConfig = {
|
||||||
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
|
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
|
||||||
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
|
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
|
||||||
{ t_width: '', t_props: 'status', t_label: '审批状态', t_slot: 't_type' },
|
{ t_width: '', t_props: 'status', t_label: '审批状态', t_slot: 't_type' },
|
||||||
{ t_width: '', t_props: '', t_label: '报废原因' },
|
{ t_width: '', t_props: 'auditRemark', t_label: '报废原因' },
|
||||||
{ t_width: '', t_props: '', t_label: '损坏原因', t_slot: 't_damage' },
|
{ t_width: '', t_props: '', t_label: '损坏原因', t_slot: 't_damage' },
|
||||||
{ t_width: '', t_props: '', t_label: '报废图片', t_slot: 't_img' },
|
{ t_width: '', t_props: '', t_label: '报废图片', t_slot: 't_img' },
|
||||||
{ t_width: '', t_props: 'remark', t_label: '备注' },
|
{ t_width: '', t_props: 'remark', t_label: '备注' },
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,10 @@
|
||||||
</template>
|
</template>
|
||||||
<!-- 报废图片 -->
|
<!-- 报废图片 -->
|
||||||
<template slot-scope="{ data }" slot="t_img">
|
<template slot-scope="{ data }" slot="t_img">
|
||||||
<ScrapImg />
|
<ScrapImg
|
||||||
|
v-if="data.fileUrl"
|
||||||
|
:scrapImgUrl="data.fileUrl"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</TableModel>
|
</TableModel>
|
||||||
<el-row
|
<el-row
|
||||||
|
|
@ -346,7 +349,7 @@ export default {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
/* 监听外层弹框关闭 清空勾选的数据 */
|
/* 监听外层弹框关闭 清空勾选的数据 */
|
||||||
if (!newVal.outerVisible) {
|
if (!newVal.outerVisible) {
|
||||||
this.selectionList = []
|
this.selAuditingList = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,8 @@ export const dialogConfig = {
|
||||||
{ t_width: '', t_props: 'specificationType', t_label: '规格型号' },
|
{ t_width: '', t_props: 'specificationType', t_label: '规格型号' },
|
||||||
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
|
{ t_width: '', t_props: 'maCode', t_label: '设备编码' },
|
||||||
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
|
{ t_width: '', t_props: 'scrapNum', t_label: '设备数量' },
|
||||||
{ t_width: '', t_props: 'remark', 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' },
|
{ t_width: '', t_props: 'fileUrl', t_label: '报废图片', t_slot: 'imgPreview' },
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,8 +112,16 @@
|
||||||
:sendApi="getDialogListApi"
|
:sendApi="getDialogListApi"
|
||||||
:config="dialogConfig"
|
:config="dialogConfig"
|
||||||
>
|
>
|
||||||
<template slot="imgPreview">
|
<!-- 损坏原因 -->
|
||||||
<ScrapImg />
|
<template slot-scope="{ data }" slot="t_damage">
|
||||||
|
{{ data.scrapType == 1 ? '人为' : '自然' }}
|
||||||
|
</template>
|
||||||
|
<!-- 报废图片 -->
|
||||||
|
<template slot="imgPreview" slot-scope="{ data }">
|
||||||
|
<ScrapImg
|
||||||
|
v-if="data.fileUrl"
|
||||||
|
:scrapImgUrl="data.fileUrl"
|
||||||
|
/>
|
||||||
</template> </TableModel
|
</template> </TableModel
|
||||||
></template>
|
></template>
|
||||||
|
|
||||||
|
|
@ -124,7 +132,10 @@
|
||||||
|
|
||||||
<!-- 部门选择 -->
|
<!-- 部门选择 -->
|
||||||
<template v-if="dialogConfig.outerTitle === '选择审批部门'">
|
<template v-if="dialogConfig.outerTitle === '选择审批部门'">
|
||||||
<SelDepart @closeDepartSel="closeDepartSel" />
|
<SelDepart
|
||||||
|
@closeDepartSel="closeDepartSel"
|
||||||
|
ref="selDepartRef"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</DialogModel>
|
</DialogModel>
|
||||||
|
|
@ -218,23 +229,31 @@ export default {
|
||||||
this.temp = !this.temp
|
this.temp = !this.temp
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 关闭选择审批部门弹框 */
|
/* 确定或取消按钮触发的自定义事件 */
|
||||||
async closeDepartSel(val, list) {
|
async closeDepartSel(val, list) {
|
||||||
|
// val === 0 取消 ===1 为确定
|
||||||
|
if (val === 0) {
|
||||||
|
this.dialogConfig.outerVisible = false
|
||||||
|
this.$refs.listingTbRef.getList()
|
||||||
|
this.submitScrapParams.taskIdList = []
|
||||||
|
return
|
||||||
|
}
|
||||||
if (list.length < 1) {
|
if (list.length < 1) {
|
||||||
this.$message.error('请选择审批部门')
|
this.$message.error('请选择审批部门')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.submitScrapParams.deptIds = []
|
||||||
list.map((e) => {
|
list.map((e) => {
|
||||||
this.submitScrapParams.deptIds.push(e.id)
|
this.submitScrapParams.deptIds.push(e.id)
|
||||||
})
|
})
|
||||||
const res = await submitScrapApi(this.submitScrapParams)
|
const res = await submitScrapApi(this.submitScrapParams)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message.success('已提交成功')
|
this.$message.success('已提交成功')
|
||||||
this.dialogConfig.outerVisible = val
|
this.dialogConfig.outerVisible = false
|
||||||
this.$refs.listingTbRef.getList()
|
this.$refs.listingTbRef.getList()
|
||||||
|
this.submitScrapParams.taskIdList = []
|
||||||
}
|
}
|
||||||
this.submitScrapParams.deptIds = this.submitScrapParams.taskIdList =
|
this.$refs.selDepartRef.clearNode()
|
||||||
[]
|
|
||||||
},
|
},
|
||||||
/* 批量提交报废按钮 */
|
/* 批量提交报废按钮 */
|
||||||
handelSubmitScrap() {
|
handelSubmitScrap() {
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
@queryParts="queryParts"
|
@queryParts="queryParts"
|
||||||
@editParts="editParts"
|
@editParts="editParts"
|
||||||
@acceptParts="acceptParts"
|
@acceptParts="acceptParts"
|
||||||
|
@partsSaveSuccess="partsSaveSuccess"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,11 @@ module.exports = {
|
||||||
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
||||||
// target: `https://z.csgmall.com.cn`,
|
// target: `https://z.csgmall.com.cn`,
|
||||||
|
|
||||||
target: `http://10.40.92.51:28080`, //超
|
// target: `http://10.40.92.51:28080`, //超
|
||||||
// target: `http://10.40.92.81:8080`, //韩/
|
// target: `http://10.40.92.81:8080`, //韩/
|
||||||
// target: `http://10.40.92.74:8080`,//旭/
|
// target: `http://10.40.92.74:8080`,//旭/
|
||||||
// target: `http://10.40.92.148:28080`, //帅
|
// target: `http://10.40.92.138:28080`, //帅
|
||||||
// target: `http://10.40.92.253:28080`, //福
|
target: `http://10.40.92.253:28080`, //福
|
||||||
|
|
||||||
//******** 注意事项 ********* */
|
//******** 注意事项 ********* */
|
||||||
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;
|
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue