[update] tianjia
This commit is contained in:
@@ -76,7 +76,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 参数模板-->
|
<!-- 参数模板-->
|
||||||
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
|
<a-modal v-model="areaVisible" :title="$t('parameterTemplate')" width='750px' :footer="null">
|
||||||
<parameter-template-add v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'
|
<parameter-template-add :url='url' ref='templateRef' v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'
|
||||||
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'
|
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'
|
||||||
:projectId='this.$route.query.id'></parameter-template-add>
|
:projectId='this.$route.query.id'></parameter-template-add>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@@ -253,19 +253,9 @@
|
|||||||
},
|
},
|
||||||
edit(edit) {
|
edit(edit) {
|
||||||
this.areaVisible = true
|
this.areaVisible = true
|
||||||
let _this = this
|
setTimeout(() => {
|
||||||
let query = {
|
this.$refs.templateRef.editData(edit)
|
||||||
id: edit.id
|
},50)
|
||||||
}
|
|
||||||
getAction(_this.url.queryById, query).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.templatetitle = res.result.title
|
|
||||||
this.selectedRowKeys = res.result.paramsTemplateId.split(',')
|
|
||||||
this.rowId = res.result.id
|
|
||||||
this.version = res.result.paramsTemplatePublishVersion
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.areaVisible = true
|
this.areaVisible = true
|
||||||
|
|||||||
@@ -57,12 +57,6 @@
|
|||||||
:scroll='{x: 600}'
|
:scroll='{x: 600}'
|
||||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
||||||
@change='handleTableChange'>
|
@change='handleTableChange'>
|
||||||
<a slot='name' slot-scope='text'>{{ text }}</a>
|
|
||||||
<span slot='action' slot-scope='text, record'>
|
|
||||||
<a class='action-edit' @click='editArea(record.id)' v-has="'area:edit'">{{ $t('edit') }}</a>
|
|
||||||
<a style='color:red' href='javascript:;' @click=' deleteArea(record.id)'
|
|
||||||
v-has="'area:delete'">{{ $t('delete') }}</a>
|
|
||||||
</span>
|
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="page" style='display: flex;justify-content: flex-end;'>
|
<div class="page" style='display: flex;justify-content: flex-end;'>
|
||||||
<a-pagination
|
<a-pagination
|
||||||
@@ -161,6 +155,11 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
require: true
|
require: true
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
type: Object,
|
||||||
|
default: '',
|
||||||
|
require: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -213,6 +212,20 @@ export default {
|
|||||||
this.newVisible = true
|
this.newVisible = true
|
||||||
this.form = {}
|
this.form = {}
|
||||||
},
|
},
|
||||||
|
editData(edit) {
|
||||||
|
let query = {
|
||||||
|
id: edit.id
|
||||||
|
}
|
||||||
|
getAction(this.url.queryById, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.formData.templatetitle = res.result.title
|
||||||
|
this.selectedRowKeys = res.result.paramsTemplateId.split(',')
|
||||||
|
// this.rowId = res.result.id
|
||||||
|
// this.version = res.result.paramsTemplatePublishVersion
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//新增
|
//新增
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
if (this.selectedRowKeys.length == 0) {
|
if (this.selectedRowKeys.length == 0) {
|
||||||
@@ -236,6 +249,7 @@ export default {
|
|||||||
projectId: this.projectId
|
projectId: this.projectId
|
||||||
}
|
}
|
||||||
if (this.rowId) {
|
if (this.rowId) {
|
||||||
|
console.log('编辑')
|
||||||
//编辑
|
//编辑
|
||||||
postAction(`params/manifest/edit`, postDate).then(res => {
|
postAction(`params/manifest/edit`, postDate).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -252,6 +266,7 @@ export default {
|
|||||||
this.newVisible = false
|
this.newVisible = false
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
console.log('新增')
|
||||||
//新增
|
//新增
|
||||||
postAction(`params/manifest/add`, postDate).then(res => {
|
postAction(`params/manifest/add`, postDate).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -310,25 +325,11 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//编辑按钮
|
// 编辑
|
||||||
editArea(val) {
|
|
||||||
this.title = this.$t('edit')
|
|
||||||
this.newVisible = true
|
|
||||||
let params = {
|
|
||||||
id: val
|
|
||||||
}
|
|
||||||
getAction(`tag/onlCgformArea/queryById`, params).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.form = { ...res.result }
|
|
||||||
// this.$emit('updateOk',res.result)
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
templateTitle(val) {
|
templateTitle(val) {
|
||||||
this.templatetitle = val
|
this.formData.templatetitle = val
|
||||||
},
|
},
|
||||||
selectedRowKeyS(val) {
|
selectedRowKeyS(val) {
|
||||||
this.selectedRowKeys = val
|
this.selectedRowKeys = val
|
||||||
|
|||||||
Reference in New Issue
Block a user