[update] binaji
This commit is contained in:
@@ -226,7 +226,6 @@
|
||||
},
|
||||
// 历史版本
|
||||
historicalVersion(historicalRow) {
|
||||
console.log(historicalRow)
|
||||
this.historicalVisible = true
|
||||
this.historicalRow = historicalRow
|
||||
},
|
||||
@@ -271,33 +270,40 @@
|
||||
handleAdd() {
|
||||
this.areaVisible = true
|
||||
},
|
||||
// 变更扩展
|
||||
handleModule() {
|
||||
let _this = this
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/changeExtension?id=${this.selectedRowKeys[0]}`,
|
||||
method: 'get',
|
||||
transformRequest: [function(data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': _this.token
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.message)
|
||||
} else {
|
||||
_this.$message.warning(res.data.message)
|
||||
if(this.selectedRowKeys.length == 0){
|
||||
this.$message.warning(_this.$t('pleaseSelectData'))
|
||||
}else if(this.selectedRowKeys.length > 2){
|
||||
this.$message.warning(_this.$t('OnlyOneSelected'))
|
||||
} else {
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/changeExtension?id=${this.selectedRowKeys[0]}`,
|
||||
method: 'get',
|
||||
transformRequest: [function(data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token': _this.token
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.message)
|
||||
} else {
|
||||
_this.$message.warning(res.data.message)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
},
|
||||
handleDel() {
|
||||
let param = {
|
||||
@@ -323,7 +329,8 @@
|
||||
}
|
||||
},
|
||||
handleCody() {
|
||||
this.areaVisibleCody = true
|
||||
console.log('复制')
|
||||
// this.areaVisibleCody = true
|
||||
},
|
||||
getPersonnelList() {
|
||||
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
>
|
||||
<a-row :gutter='24'>
|
||||
<a-col :span='9'>
|
||||
<span class="Required">*</span>
|
||||
<a-form-model-item :label="$t('title')" prop='templatetitle' :rules='rules'>
|
||||
<a-input style='width: 420px'
|
||||
v-model='templatetitle' />
|
||||
:placeholder="$t('PleaseEnter')+$t('title')"
|
||||
v-model='form.templatetitle' />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span='9'>
|
||||
@@ -37,6 +39,7 @@
|
||||
<a-col :span='9'>
|
||||
<a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>
|
||||
<a-input
|
||||
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
|
||||
v-model='form.paramsTemplateName' />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
@@ -62,6 +65,17 @@
|
||||
v-has="'area:delete'">{{ $t('delete') }}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" style='display: flex;justify-content: flex-end;'>
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<div class='drawer-bootom-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>
|
||||
@@ -108,16 +122,18 @@ export default {
|
||||
},
|
||||
form: {},
|
||||
rules: {
|
||||
// templatetitle: [
|
||||
// { required: true, message: this.$t('enterTitle'), trigger: 'blur' }
|
||||
// ]
|
||||
templatetitle: [
|
||||
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
areaTable: [],
|
||||
flag: false, //表单提交标识
|
||||
spinLoading: false,
|
||||
confirmLoading: false,
|
||||
templatetitle: '',
|
||||
selectedRowKeys: []
|
||||
selectedRowKeys: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -151,14 +167,25 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.loadData()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.loadData()
|
||||
},
|
||||
loadData() {
|
||||
this.loading = true
|
||||
let params = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.form
|
||||
}
|
||||
getAction(`params/manifest/getParamsTemplateList`, params).then(res => {
|
||||
getAction(`params/manifest/getParamsTemplatePage`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.areaTable = [...res.result]
|
||||
this.areaTable = [...res.result.records]
|
||||
this.total = res.result.total
|
||||
}
|
||||
}).finally(() => {
|
||||
@@ -331,6 +358,10 @@ export default {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.Required {
|
||||
color: red;
|
||||
margin-left: 20px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
|
||||
@@ -154,18 +154,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
this.loading = true
|
||||
let params = {
|
||||
...this.form
|
||||
}
|
||||
getAction(`params/manifest/getParamsTemplateList`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.areaTable = [...res.result]
|
||||
this.total = res.result.total
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
console.log('复制')
|
||||
// this.loading = true
|
||||
// let params = {
|
||||
// ...this.form
|
||||
// }
|
||||
// getAction(`params/manifest/getParamsTemplateList`, params).then(res => {
|
||||
// if (res.success) {
|
||||
// this.areaTable = [...res.result]
|
||||
// this.total = res.result.total
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// this.loading = false
|
||||
// })
|
||||
},
|
||||
searchQuery() {
|
||||
this.loadData()
|
||||
@@ -188,66 +189,66 @@ export default {
|
||||
this.newVisible = true
|
||||
this.form = {}
|
||||
},
|
||||
//新增
|
||||
// 复制 - 确定
|
||||
handleSubmit() {
|
||||
if (this.selectedRowKeys.length == 0) {
|
||||
this.$message.warning(this.$t('pleaseSelectData'))
|
||||
} else if (this.selectedRowKeys.length > 1) {
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
} else {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.flag = true
|
||||
this.spinLoading = true
|
||||
// 新增編輯之前 判断 标题唯一
|
||||
getAction(`params/manifest/verifyTitle?projectId=${this.$route.query.id}
|
||||
&title=${this.templatetitle}`, {})
|
||||
.then(res => {
|
||||
if (res.success) {
|
||||
let postDate = {
|
||||
// sourceManifestId:
|
||||
paramsTemplateId: this.rowId || this.selectedRowKeysDate[0].id,
|
||||
paramsTemplatePublishVersion: this.version || this.selectedRowKeysDate[0].version,
|
||||
projectId: this.projectId
|
||||
}
|
||||
let _this = this
|
||||
axios({
|
||||
url: `/jero-boot/params/manifest/copy`,
|
||||
method: 'post',
|
||||
data: postDate,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.result)
|
||||
}else{
|
||||
_this.$message.warning(res.data.result)
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
// if (this.selectedRowKeys.length == 0) {
|
||||
// this.$message.warning(this.$t('pleaseSelectData'))
|
||||
// } else if (this.selectedRowKeys.length > 1) {
|
||||
// this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
// } else {
|
||||
// this.$refs.ruleForm.validate(valid => {
|
||||
// if (valid) {
|
||||
// this.flag = true
|
||||
// this.spinLoading = true
|
||||
// // 新增編輯之前 判断 标题唯一
|
||||
// getAction(`params/manifest/verifyTitle?projectId=${this.$route.query.id}
|
||||
// &title=${this.templatetitle}`, {})
|
||||
// .then(res => {
|
||||
// if (res.success) {
|
||||
// let postDate = {
|
||||
// // sourceManifestId:
|
||||
// paramsTemplateId: this.rowId || this.selectedRowKeysDate[0].id,
|
||||
// paramsTemplatePublishVersion: this.version || this.selectedRowKeysDate[0].version,
|
||||
// projectId: this.projectId
|
||||
// }
|
||||
// let _this = this
|
||||
// axios({
|
||||
// url: `/jero-boot/params/manifest/copy`,
|
||||
// method: 'post',
|
||||
// data: postDate,
|
||||
// transformRequest: [function (data) {
|
||||
// let ret = ''
|
||||
// for (let it in data) {
|
||||
// ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
// }
|
||||
// return ret
|
||||
// }],
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// 'X-Access-Token':_this.token
|
||||
// }
|
||||
// })
|
||||
// .then( (res) =>{
|
||||
// if (res.data.success) {
|
||||
// _this.$message.success(res.data.result)
|
||||
// }else{
|
||||
// _this.$message.warning(res.data.result)
|
||||
// }
|
||||
// })
|
||||
// .catch( (error) =>{
|
||||
// console.log(error);
|
||||
// });
|
||||
// } else {
|
||||
// this.$message.warning(res.message)
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// this.loading = false
|
||||
// })
|
||||
// } else {
|
||||
// return false
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
cancelModel() {
|
||||
this.newVisible = false
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
:scroll='{x: 600}'>
|
||||
<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 class='action-edit' @click='editArea(record.id)' v-has="'area:edit'">{{ $t('See') }}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -38,8 +38,7 @@ export default {
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('VersionNumber'),
|
||||
dataIndex: 'region_dictText',
|
||||
key: 'showArea',
|
||||
dataIndex: 'version',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
@@ -47,7 +46,8 @@ export default {
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
dataIndex: 'paramsTemplateName',
|
||||
ellipsis: true
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
newVisible: false,
|
||||
@@ -71,9 +71,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
console.log(this.historicalRow,'this.historicalRow')
|
||||
let _this = this
|
||||
axios({
|
||||
url: `/jero-boot/params/collectManifestHistory/getConfigById?id=${this.historicalRow.id}`,
|
||||
url: `/jero-boot/params/manifest/history?title=${this.historicalRow.title}`,
|
||||
method: 'get',
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
@@ -88,9 +89,8 @@ export default {
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
console.log(res,'lll')
|
||||
this.areaTable = res.data.result
|
||||
}else{
|
||||
_this.$message.warning(res.data.result)
|
||||
}
|
||||
@@ -99,21 +99,23 @@ export default {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
//编辑按钮
|
||||
// 查看
|
||||
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)
|
||||
|
||||
}
|
||||
})
|
||||
console.log('查看')
|
||||
}
|
||||
// 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)
|
||||
//
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user