对接待办中心

This commit is contained in:
sunFlower
2022-10-18 15:17:03 +08:00
parent 150b5e36b8
commit 94dad9ec77
4 changed files with 31 additions and 2 deletions
+2
View File
@@ -1324,4 +1324,6 @@ module.exports = {
softwareVersion:'Software version', softwareVersion:'Software version',
versionStatistics:'Version statistics', versionStatistics:'Version statistics',
addSubproject:'Add Subproject', addSubproject:'Add Subproject',
Topping:'Topping',
cancelTopping:'Cancel Topping',
} }
+2
View File
@@ -1425,4 +1425,6 @@ module.exports = {
softwareVersion:'软件版本', softwareVersion:'软件版本',
versionStatistics:'版本统计', versionStatistics:'版本统计',
addSubproject:'添加子项目', addSubproject:'添加子项目',
Topping:'置顶',
cancelTopping:'取消置顶',
} }
@@ -100,7 +100,7 @@
editModel(value) { editModel(value) {
this.visible = true this.visible = true
this.formInline = {} this.formInline = {}
this.formInline.id = value.id this.formInline.id = value.parentId || value.id
if (!value.versionLast) { if (!value.versionLast) {
this.formInline.projectVersion = '01' this.formInline.projectVersion = '01'
} else if (value.versionLast) { } else if (value.versionLast) {
@@ -129,6 +129,11 @@
</span> </span>
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>--> <!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>-->
<a class="text-operation"
v-if="!record.parentId"
@click="toppingClick(record)">
{{record.flag == '1'?$t('cancelTopping'):$t('Topping')}}
</a>
<a class="text-operation" @click="changeExtensionClick(record)"> <a class="text-operation" @click="changeExtensionClick(record)">
{{$t('addSubproject')}} {{$t('addSubproject')}}
</a> </a>
@@ -254,7 +259,7 @@
title: this.$t('operation'), title: this.$t('operation'),
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
width: 160, width: 252,
scopedSlots: { customRender: 'operation' } scopedSlots: { customRender: 'operation' }
} }
], ],
@@ -271,6 +276,26 @@
handleToggleSearch() { handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus this.toggleSearchStatus = !this.toggleSearchStatus
}, },
toppingClick(row) {
let flag = ''
if (row.flag == '1') {
flag = '0'
} else {
flag = '1'
}
let query = {
flag: flag,
id: row.id
}
getAction('/project/projectLibraryBase/top', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
changeExtensionClick(val) { changeExtensionClick(val) {
this.$refs.changeExtensionModelRef.editModel(JSON.parse(JSON.stringify(val))) this.$refs.changeExtensionModelRef.editModel(JSON.parse(JSON.stringify(val)))
}, },