bug 78400
This commit is contained in:
@@ -510,7 +510,8 @@ module.exports = {
|
|||||||
exitEdit: '退出编辑',
|
exitEdit: '退出编辑',
|
||||||
specialty: '特点',
|
specialty: '特点',
|
||||||
comparisonItem: '比对项',
|
comparisonItem: '比对项',
|
||||||
relatedAccessory: '相关附件'
|
relatedAccessory: '相关附件',
|
||||||
|
reserveAnItem: '至少需要保留一项'
|
||||||
},
|
},
|
||||||
// 标准预警
|
// 标准预警
|
||||||
standardWarning: {
|
standardWarning: {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
class="custom-drawer-style">
|
class="custom-drawer-style">
|
||||||
|
|
||||||
<div class="custom-drawer-style-scroll">
|
<div class="custom-drawer-style-scroll" :class="{'no-btn-body': isDetail}">
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
<!--清单名称-->
|
<!--清单名称-->
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
</a-spin>
|
</a-spin>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="custom-drawer-style-bottom-btn">
|
<div class="custom-drawer-style-bottom-btn" v-if="!isDetail">
|
||||||
<a-button @click="handleSaveForm(true)" type="primary" style="margin-bottom: 0;" :loading="confirmLoading">
|
<a-button @click="handleSaveForm(true)" type="primary" style="margin-bottom: 0;" :loading="confirmLoading">
|
||||||
{{ $t('preservation') }}
|
{{ $t('preservation') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -217,7 +217,8 @@ export default {
|
|||||||
standardList: [], // 标准的列表
|
standardList: [], // 标准的列表
|
||||||
specialtyItemList: [], // 特点的列表(三级表头)
|
specialtyItemList: [], // 特点的列表(三级表头)
|
||||||
isFirstOpenComparison: true, // 第一次打开在线比对
|
isFirstOpenComparison: true, // 第一次打开在线比对
|
||||||
countryTreeData: [] // 涉及国家数据
|
countryTreeData: [], // 涉及国家数据
|
||||||
|
maintainItemList: [] // 维护项列表
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -326,7 +327,6 @@ export default {
|
|||||||
*/
|
*/
|
||||||
reloadData () {
|
reloadData () {
|
||||||
this.getFormData()
|
this.getFormData()
|
||||||
this.initTableData()
|
|
||||||
},
|
},
|
||||||
async reloadTableHasResult () {
|
async reloadTableHasResult () {
|
||||||
await this.initTableData()
|
await this.initTableData()
|
||||||
@@ -402,6 +402,7 @@ export default {
|
|||||||
|
|
||||||
// 处理表格数据
|
// 处理表格数据
|
||||||
// 把比对项的数据放在里面,对比项取proertyVal为显示字段,其余属性用数据本身的
|
// 把比对项的数据放在里面,对比项取proertyVal为显示字段,其余属性用数据本身的
|
||||||
|
this.maintainItemList = result.ranksMap.对比项 || []
|
||||||
const maintainItemList = result.ranksMap.对比项 || []
|
const maintainItemList = result.ranksMap.对比项 || []
|
||||||
// 有多少对比项决定了有多少行数据
|
// 有多少对比项决定了有多少行数据
|
||||||
this.dataSource = maintainItemList.map(maintainData => {
|
this.dataSource = maintainItemList.map(maintainData => {
|
||||||
@@ -428,6 +429,10 @@ export default {
|
|||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
handleDeleteSpecialty ({ id }) {
|
handleDeleteSpecialty ({ id }) {
|
||||||
|
if (this.specialtyItemList.length <= `1`) {
|
||||||
|
this.$message.warning(this.$t('docTool.customComparison.reserveAnItem'))
|
||||||
|
return
|
||||||
|
}
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
deleteSpecialtyItem({ id }).then(res => {
|
deleteSpecialtyItem({ id }).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -445,6 +450,10 @@ export default {
|
|||||||
* @param record
|
* @param record
|
||||||
*/
|
*/
|
||||||
handleDeleteMaintainItem (record) {
|
handleDeleteMaintainItem (record) {
|
||||||
|
if (this.maintainItemList.length <= `1`) {
|
||||||
|
this.$message.warning(this.$t('docTool.customComparison.reserveAnItem'))
|
||||||
|
return
|
||||||
|
}
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
const parmas = { id: record.maintainData.id }
|
const parmas = { id: record.maintainData.id }
|
||||||
deleteMaintainItem(parmas).then(res => {
|
deleteMaintainItem(parmas).then(res => {
|
||||||
@@ -532,7 +541,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
getFormData () {
|
getFormData () {
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
getFormDataById({ id: this.modal.id }).then(res => {
|
getFormDataById({ id: this.modal.id }).then(async res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.modal = Object.assign(this.modal, res.result || {})
|
this.modal = Object.assign(this.modal, res.result || {})
|
||||||
// 处理关联国家的回显
|
// 处理关联国家的回显
|
||||||
@@ -549,6 +558,7 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(this.modal)
|
this.form.setFieldsValue(this.modal)
|
||||||
})
|
})
|
||||||
|
await this.initTableData()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
@@ -584,7 +594,6 @@ export default {
|
|||||||
*/
|
*/
|
||||||
initTableData () {
|
initTableData () {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
this.confirmLoading = true
|
|
||||||
getTableData({ infoId: this.modal.id }).then(res => {
|
getTableData({ infoId: this.modal.id }).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// 平铺一些数据
|
// 平铺一些数据
|
||||||
@@ -595,7 +604,6 @@ export default {
|
|||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.confirmLoading = false
|
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -698,4 +706,8 @@ export default {
|
|||||||
float: right;
|
float: right;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-btn-body {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user