[update] 认证参数收集-編輯
This commit is contained in:
@@ -68,7 +68,8 @@
|
|||||||
/>
|
/>
|
||||||
</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 v-if='areaVisible' @areaVisible='handleCancel'></parameter-template>
|
<parameter-template v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'
|
||||||
|
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'></parameter-template>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -137,6 +138,7 @@
|
|||||||
list: 'params/manifest/page',
|
list: 'params/manifest/page',
|
||||||
add: 'params/manifest/add',
|
add: 'params/manifest/add',
|
||||||
edit: 'params/manifest/edit',
|
edit: 'params/manifest/edit',
|
||||||
|
queryById: 'params/manifest/queryById',
|
||||||
deleteBatch: 'params/manifest/delete',
|
deleteBatch: 'params/manifest/delete',
|
||||||
deleteAll: 'params/manifest/deleteBatch',
|
deleteAll: 'params/manifest/deleteBatch',
|
||||||
},
|
},
|
||||||
@@ -147,6 +149,10 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
selectedRowKeysArray: '',
|
selectedRowKeysArray: '',
|
||||||
|
templatetitle: '',
|
||||||
|
templatetitleId: '',
|
||||||
|
rowId: '',
|
||||||
|
version: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -190,7 +196,23 @@
|
|||||||
this.selectedRowKeysArray = val.join(',')
|
this.selectedRowKeysArray = val.join(',')
|
||||||
},
|
},
|
||||||
edit(edit){
|
edit(edit){
|
||||||
|
this.areaVisible = true
|
||||||
|
let _this = this
|
||||||
|
let query = {
|
||||||
|
id: edit.id
|
||||||
|
}
|
||||||
|
getAction(_this.url.queryById, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
console.log(res,'res..')
|
||||||
|
this.templatetitle = res.result.title
|
||||||
|
this.selectedRowKeys = res.result.paramsTemplateId.split(',')
|
||||||
|
this.rowId = res.result.id
|
||||||
|
this.version = res.result.paramsTemplatePublishVersion
|
||||||
|
console.log(this.selectedRowKeys,'this.selectedRowKeys')
|
||||||
|
console.log(typeof this.version)
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleExport(){
|
handleExport(){
|
||||||
|
|
||||||
|
|||||||
@@ -13,24 +13,24 @@
|
|||||||
<a-col :span='9'>
|
<a-col :span='9'>
|
||||||
<a-form-model-item :label="$t('title')" prop='templatetitle' :rules='rules'>
|
<a-form-model-item :label="$t('title')" prop='templatetitle' :rules='rules'>
|
||||||
<a-input style='width: 420px'
|
<a-input style='width: 420px'
|
||||||
v-model='templatetitle' />
|
v-model='templatetitle' />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='9'>
|
<a-col :span='9'>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='6'>
|
<a-col :span='6'>
|
||||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
<a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>
|
||||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
<a-button class='box-button' style='margin-left: 8px' @click='searchReset'>{{ $t('reset') }}</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter='24'>
|
<a-row :gutter='24'>
|
||||||
<a-col :span='9'>
|
<a-col :span='9'>
|
||||||
<a-form-model-item ref='region' :label="$t('zoneOfApplication')" prop='region'>
|
<a-form-model-item ref='region' :label="$t('zoneOfApplication')" prop='region'>
|
||||||
<a-form-model-item class="itemModel" prop="region">
|
<a-form-model-item class='itemModel' prop='region'>
|
||||||
<j-dict-select-tag class="box-input" v-model="form.region"
|
<j-dict-select-tag class='box-input' v-model='form.region'
|
||||||
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="'region'"/>
|
:triggerChange='false' :dictCode="'region'" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -62,9 +62,9 @@
|
|||||||
v-has="'area:delete'">{{ $t('delete') }}</a>
|
v-has="'area:delete'">{{ $t('delete') }}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="drawer-bootom-button">
|
<div class='drawer-bootom-button'>
|
||||||
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
|
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
|
||||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -77,13 +77,10 @@ export default {
|
|||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
templatetitle: '',
|
|
||||||
title: this.$t('add'),
|
title: this.$t('add'),
|
||||||
total: 0,
|
total: 0,
|
||||||
selectedRowKeys: [],
|
|
||||||
selectedRowKeysDate: {},
|
selectedRowKeysDate: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
ipagination: true,
|
|
||||||
editId: '',
|
editId: '',
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -118,10 +115,33 @@ export default {
|
|||||||
areaTable: [],
|
areaTable: [],
|
||||||
flag: false, //表单提交标识
|
flag: false, //表单提交标识
|
||||||
spinLoading: false,
|
spinLoading: false,
|
||||||
confirmLoading: false
|
confirmLoading: false,
|
||||||
|
templatetitle: '',
|
||||||
|
selectedRowKeys: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
templateTitle: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
selectedRowKeyS: {
|
||||||
|
type: Array,
|
||||||
|
default: '',
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
rowId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
required: false
|
||||||
|
},
|
||||||
|
version: {
|
||||||
|
type: Number,
|
||||||
|
default: '',
|
||||||
|
required: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
@@ -141,16 +161,16 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchQuery() {
|
searchQuery() {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.form = {}
|
this.form = {}
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.$emit('areaVisible',false)
|
this.$emit('areaVisible', false)
|
||||||
},
|
},
|
||||||
onSelectChange(selectedRowKeys,selectedRowKeysDate) {
|
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
|
||||||
this.selectedRowKeysDate = selectedRowKeysDate
|
this.selectedRowKeysDate = selectedRowKeysDate
|
||||||
this.selectedRowKeys = selectedRowKeys
|
this.selectedRowKeys = selectedRowKeys
|
||||||
},
|
},
|
||||||
@@ -163,62 +183,31 @@ export default {
|
|||||||
},
|
},
|
||||||
//新增
|
//新增
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
if(this.selectedRowKeys.length == 0) {
|
if (this.selectedRowKeys.length == 0) {
|
||||||
this.$message.warning(this.$t('pleaseSelectData'))
|
this.$message.warning(this.$t('pleaseSelectData'))
|
||||||
} else if(this.selectedRowKeys.length > 1) {
|
} else if (this.selectedRowKeys.length > 1) {
|
||||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||||
} else {
|
} else {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.flag = true
|
this.flag = true
|
||||||
this.spinLoading = true
|
this.spinLoading = true
|
||||||
//编辑
|
// 新增編輯之前 判断 标题唯一
|
||||||
if (this.form.id) {
|
getAction(`params/manifest/verifyTitle?projectId=${this.$route.query.id}
|
||||||
// putAction(`tag/onlCgformArea/edit`, this.form).then((res) => {
|
&title=${this.templatetitle}`, {})
|
||||||
// if (res.success) {
|
.then(res => {
|
||||||
// this.$message.success(this.$t('OperationSuccessful'))
|
if (res.success) {
|
||||||
// this.loadData()
|
let postDate = {
|
||||||
// this.form = {
|
title: this.templatetitle,
|
||||||
// isModel: '',
|
paramsTemplateId: this.rowId || this.selectedRowKeysDate[0].id,
|
||||||
// showArea: '',
|
paramsTemplatePublishVersion: this.version || this.selectedRowKeysDate[0].version
|
||||||
// enName: '',
|
}
|
||||||
// sort: ''
|
if (this.rowId) {
|
||||||
// }
|
//编辑
|
||||||
// } else {
|
postAction(`params/manifest/edit`, postDate).then(res => {
|
||||||
// this.$message.warning(res.message)
|
|
||||||
// this.form = {
|
|
||||||
// isModel: '',
|
|
||||||
// showArea: '',
|
|
||||||
// enName: '',
|
|
||||||
// sort: ''
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }).finally(() => {
|
|
||||||
// this.flag = false
|
|
||||||
// this.spinLoading = false
|
|
||||||
// this.newVisible = false
|
|
||||||
// this.form = {
|
|
||||||
// isModel: '',
|
|
||||||
// showArea: '',
|
|
||||||
// enName: '',
|
|
||||||
// sort: ''
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
} else {
|
|
||||||
// 新增之前 判断 标题唯一
|
|
||||||
getAction(`params/manifest/verifyTitle?projectId=${this.$route.query.id}&title=${this.templatetitle}`, {}).then(res => {
|
|
||||||
if (res.success) {
|
|
||||||
console.log(this.selectedRowKeys[0])
|
|
||||||
let postDate = {
|
|
||||||
title: this.templatetitle,
|
|
||||||
paramsTemplateId : this.selectedRowKeysDate[0].id,
|
|
||||||
paramsTemplatePublishVersion: this.selectedRowKeysDate[0].version
|
|
||||||
}
|
|
||||||
//新增
|
|
||||||
postAction(`params/manifest/add`, postDate).then(res => {
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.newVisible = false
|
this.newVisible = false
|
||||||
this.$emit('areaVisible',false)
|
this.$emit('areaVisible', false)
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
@@ -230,12 +219,28 @@ export default {
|
|||||||
this.newVisible = false
|
this.newVisible = false
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
//新增
|
||||||
|
postAction(`params/manifest/add`, postDate).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.newVisible = false
|
||||||
|
this.$emit('areaVisible', false)
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
).finally(() => {
|
||||||
|
this.flag = false
|
||||||
|
this.spinLoading = false
|
||||||
|
this.newVisible = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
} else {
|
||||||
this.loading = false
|
this.$message.warning(res.message)
|
||||||
})
|
}
|
||||||
}
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -286,29 +291,17 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
templateTitle(val) {
|
||||||
|
this.templatetitle = val
|
||||||
},
|
},
|
||||||
//点击页数
|
selectedRowKeyS(val) {
|
||||||
onChangePage(page, pageSize) {
|
this.selectedRowKeys = val
|
||||||
this.queryParams.pageNo = page
|
|
||||||
this.loadData()
|
|
||||||
},
|
|
||||||
//一页显示条数
|
|
||||||
SizeChange(page, pageSize) {
|
|
||||||
this.queryParams.pageSize = pageSize
|
|
||||||
this.queryParams.pageNo = 1
|
|
||||||
this.loadData()
|
|
||||||
},
|
|
||||||
//正则替换小数点
|
|
||||||
limitNumber(value) {
|
|
||||||
if (typeof value === 'string') {
|
|
||||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
|
||||||
} else if (typeof value === 'number') {
|
|
||||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
|
||||||
} else {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user