feature: 标准跟踪清单-修改

This commit is contained in:
zyn
2024-01-31 11:37:25 +08:00
parent 9d8f3f9451
commit 3e679e64b8
3 changed files with 41 additions and 6 deletions
@@ -64,7 +64,7 @@
round
class="common-button-default"
icon="el-icon-check"
@click="importFailed.importFailed = false"
@click="importFailed.visible = false"
>
确认
</el-button>
@@ -101,7 +101,7 @@ export default {
rules,
url: {
uploadNew: 'api/att/attFile/uploadNew',
importExcelUrl: 'api/standardTrackingCheckList/importTrackingChecklist',
importExcelUrl: 'standardTrackingCheckList/importTrackingChecklist',
exportTemplateFile: 'api/standardTrackingCheckList/exportTemplateFile',
},
importModalShowFlag: false,
@@ -123,7 +123,7 @@ export default {
this.$refs.formRef.validate(valid => {
if (valid) {
const config = { _this: this, loading: 'loading' }
this.$http._postData(this.url.importExcelUrl, this.form, config).then(res => {
this.$http._post(this.url.importExcelUrl, this.form, config).then(res => {
if (res.ok) {
this.$message.success('导入成功')
this.visible = false
@@ -131,7 +131,7 @@ export default {
} else {
this.importFailed.importFailedText = res.message
this.importFailed.visible = true
this.$message.warning(res.message)
// this.$message.warning(res.message)
}
})
}
@@ -64,7 +64,9 @@
label="产品类型"
>
<template slot-scope="{row, column, $index}">
<span v-if="disabled">{{ trackingChecklistProductTypeMap[row.productType] || '-' }}</span>
<el-select
v-else
v-model="row.productType"
placeholder="请选择产品类型"
size="mini"
@@ -87,7 +89,9 @@
label="实施日期"
>
<template slot-scope="{row, column, $index}">
<span v-if="disabled">{{ row.implTime || '-' }}</span>
<el-date-picker
v-else
v-model="row.implTime"
size="mini"
type="date"
@@ -104,7 +108,9 @@
label="实施要求"
>
<template slot-scope="{row, column, $index}">
<span v-if="disabled">{{ trackingChecklistPutDemandMap[row.implRequire] || '-' }}</span>
<el-select
v-else
v-model="row.implRequire"
placeholder="请选择实施要求"
clearable
@@ -149,6 +155,24 @@ export default {
dict: {}
}
},
computed: {
trackingChecklistProductTypeMap () {
return this.dict.trackingChecklistProductType
? this.dict.trackingChecklistProductType.reduce((obj, item) => {
obj[item.value] = item.label
return obj
}, {})
: []
},
trackingChecklistPutDemandMap () {
return this.dict.trackingChecklistPutDemand
? this.dict.trackingChecklistPutDemand.reduce((obj, item) => {
obj[item.value] = item.label
return obj
}, {})
: []
}
},
created () {
this.getDicTypeListCode()
},
@@ -203,7 +227,7 @@ export default {
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
const list = this.value.filter(item => !this.selectedList.some(i => i.id === item.id))
const list = this.value.filter(item => !this.selectedList.some(i => i.lawId === item.lawId))
this.$emit('input', list)
})
},
@@ -218,8 +242,11 @@ export default {
<style scoped lang="less">
.table{
/deep/ .el-select.el-select--mini{
width: 100% !important;
}
/deep/ .el-date-editor.el-input, .el-date-editor.el-input__inner {
width: 130px !important;
width: 100% !important;
}
}
</style>
@@ -168,6 +168,7 @@ export default {
},
add () {
this.title = '新增'
this.disabled = false
// this.form = JSON.parse(JSON.stringify(this.initForm))
Object.keys(this.initForm).forEach(key => this.form[key] = this.initForm[key])
this.roleForm = JSON.parse(JSON.stringify(this.initRoleForm))
@@ -250,9 +251,16 @@ export default {
.el-form-item__content{
line-height: 50px;
}
.el-input.is-disabled .el-input__inner {
background-color: transparent;
border-color: #E4E7ED;
color: #666;
cursor: not-allowed;
}
}
.form-item-first {
/deep/ .el-input__inner{
padding-left: 0;
border: none;
}
}