[update] 上宝库
This commit is contained in:
@@ -981,4 +981,5 @@ module.exports = {
|
||||
// 上报库
|
||||
Enable: 'Enable',
|
||||
Latestupdatetime: 'Latest update time',
|
||||
Exporthistory: 'Exporthistory',
|
||||
}
|
||||
@@ -986,4 +986,5 @@ module.exports = {
|
||||
// 上报库
|
||||
Enable: '启用',
|
||||
Latestupdatetime: '最新更新时间',
|
||||
Exporthistory: '导出历史',
|
||||
}
|
||||
@@ -4,22 +4,20 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('zoneOfApplication')">
|
||||
<span>{{$t('zoneOfApplication')}}</span>
|
||||
<div class="title-text" :title="$t('entryName')">
|
||||
<span>{{$t('entryName')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.region"
|
||||
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'region'"/>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
|
||||
v-model="queryParam.projectName"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('parameterTemplate')">
|
||||
<span>{{$t('parameterTemplate')}}</span>
|
||||
<div class="title-text" :title="$t('ListTitle')">
|
||||
<span>{{$t('ListTitle')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
|
||||
v-model="queryParam.paramsTemplateName"></a-input>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ListTitle')"
|
||||
v-model="queryParam.title"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
@@ -30,20 +28,6 @@
|
||||
</span>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="handleAdd" class="operator-text" v-has="'params:template:add'">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('newlyAdded')}}
|
||||
</div>
|
||||
<div @click="handlecody" class="operator-text" v-has="'params:template:copy'">
|
||||
<a-icon type="copy"/>
|
||||
{{$t('copy')}}
|
||||
</div>
|
||||
<div @click="handleDel" class="operator-text" v-has="'params:template:delete'">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
@@ -65,8 +49,8 @@
|
||||
{{ text && text.length > 30 ? text.slice(0, 29) + '...' : text }}
|
||||
</span>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" v-has="'params:template:edit'" @click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation" v-has="'params:template:delete'" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
<a class="text-operation" @click="edit(record)">{{$t('Exporthistory')}}</a>
|
||||
<a class="text-operation" @click="deleteLib(record)">{{$t('See')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -138,7 +122,7 @@ export default {
|
||||
dataSource: [],
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: 'params/template/page',
|
||||
list: 'params/report/page',
|
||||
add: 'params/template/add',
|
||||
edit: 'params/template/edit',
|
||||
deleteBatch: 'params/template/delete',
|
||||
@@ -154,19 +138,17 @@ export default {
|
||||
title: this.$t('entryName'),
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
dataIndex: 'region_dictText',
|
||||
dataIndex: 'projectName',
|
||||
},
|
||||
{
|
||||
title: this.$t('ListTitle'),
|
||||
align: 'center',
|
||||
dataIndex: 'paramsTemplateName',
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
dataIndex: 'title',
|
||||
},
|
||||
{
|
||||
title: this.$t('Version'),
|
||||
align: 'center',
|
||||
dataIndex: 'description',
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
dataIndex: 'version',
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
@@ -214,68 +196,9 @@ export default {
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowKeysArray = this.selectedRowKeys.join(',')
|
||||
},
|
||||
//添加
|
||||
handleAdd() {
|
||||
this.$refs.addModelRef.addModel()
|
||||
},
|
||||
// 复制
|
||||
handlecody(){
|
||||
if (this.selectedRowKeys.length > 1) {
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
} else if(this.selectedRowKeys.length == 0){
|
||||
this.$message.warning(this.$t('pleaseSelectData'))
|
||||
} else {
|
||||
this.areaVisible=true
|
||||
this.formInline = {}
|
||||
}
|
||||
},
|
||||
hideModal(){
|
||||
this.visible = false;
|
||||
},
|
||||
//批量删除
|
||||
handleDel() {
|
||||
let param={
|
||||
ids: this.selectedRowKeysArray
|
||||
}
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
axios({
|
||||
url: '/jero-boot/params/template/deleteBatch',
|
||||
method: 'post',
|
||||
data: param,
|
||||
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(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
}else{
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
edit(item) {
|
||||
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
||||
|
||||
Reference in New Issue
Block a user