标签库测试反馈修改
This commit is contained in:
@@ -261,7 +261,7 @@ module.exports = {
|
|||||||
userExists: '用户名已存在',
|
userExists: '用户名已存在',
|
||||||
workNoExists: '工号已存在',
|
workNoExists: '工号已存在',
|
||||||
handStamp: '手写章',
|
handStamp: '手写章',
|
||||||
uploadHandStamp:'上传手写章'
|
uploadHandStamp: '上传手写章'
|
||||||
},
|
},
|
||||||
// 高级查询
|
// 高级查询
|
||||||
superQuery: {
|
superQuery: {
|
||||||
@@ -477,8 +477,8 @@ module.exports = {
|
|||||||
enterQuantity: '请输入数量',
|
enterQuantity: '请输入数量',
|
||||||
numberRows: '行数',
|
numberRows: '行数',
|
||||||
numberColumns: '列数',
|
numberColumns: '列数',
|
||||||
maximumSelection:'最多选择',
|
maximumSelection: '最多选择',
|
||||||
pieceOfData:'条数据'
|
pieceOfData: '条数据'
|
||||||
},
|
},
|
||||||
// 文档比对
|
// 文档比对
|
||||||
comparison: {
|
comparison: {
|
||||||
@@ -638,11 +638,13 @@ module.exports = {
|
|||||||
selectedData: '已选数据'
|
selectedData: '已选数据'
|
||||||
},
|
},
|
||||||
// 属性标识管理
|
// 属性标识管理
|
||||||
attributeIdentification:{
|
attributeIdentification: {
|
||||||
labelName:'标签名称',
|
labelName: '标签名称',
|
||||||
firstLabel:'一级标签',
|
firstLabel: '一级标签',
|
||||||
secondLabel:'二级标签',
|
secondLabel: '二级标签',
|
||||||
thirdLabel:'三级标签',
|
thirdLabel: '三级标签',
|
||||||
|
labelDelete: '请再次确认是否删除1级/2级标签。删除后该标签无法重新添加,同时该标签目录下所有标签都会被删除',
|
||||||
|
batchDelete: '您正在进行批量删除。1级/2级标签无法手动添加,请谨慎删除1级/2级标签。如果您选中了1级/2级标签,同时该标签目录下所有标签都会被删除'
|
||||||
},
|
},
|
||||||
|
|
||||||
// 系统管理
|
// 系统管理
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<!-- 操作栏 -->
|
<!-- 操作栏 -->
|
||||||
<template slot="action" slot-scope="text, record, index" class="action-span-cell">
|
<template slot="action" slot-scope="text, record, index" class="action-span-cell">
|
||||||
<a @click="handleEdit(record, index)" v-show='handleShowEdit(record)' class="table-ope-btn">{{ $t('edit') }}</a>
|
<a @click="handleEdit(record, index)" v-show='handleShowEdit(record)' class="table-ope-btn">{{ $t('edit') }}</a>
|
||||||
<a @click="handleDelete(index)" class="table-ope-btn" style="margin-left: 8px">{{ $t('delete') }}</a>
|
<a @click="handleDelete(record)" class="table-ope-btn" style="margin-left: 8px">{{ $t('delete') }}</a>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -65,7 +65,7 @@ import AttributeIdentificationModal from './modules/AttributeIdentificationModal
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TreeSelectModal',
|
name: 'TreeSelectModal',
|
||||||
components:{AttributeIdentificationModal},
|
components: { AttributeIdentificationModal },
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
props: {
|
props: {
|
||||||
dictId: {
|
dictId: {
|
||||||
@@ -89,7 +89,7 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
rowSelection () {
|
rowSelection () {
|
||||||
@@ -107,9 +107,10 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
url:{
|
url: {
|
||||||
queryLabelTree:'/laws/lawsLabelDatabase/queryLabelTree',
|
queryLabelTree: '/laws/lawsLabelDatabase/queryLabelTree',
|
||||||
deleteBatch:'/laws/lawsLabelDatabase/deleteBatch'
|
deleteBatch: '/laws/lawsLabelDatabase/deleteBatch',
|
||||||
|
delete: '/laws/lawsLabelDatabase/delete'
|
||||||
},
|
},
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
@@ -124,8 +125,8 @@ export default {
|
|||||||
/* 分页参数 */
|
/* 分页参数 */
|
||||||
ipagination: {
|
ipagination: {
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 5,
|
pageSize: 10,
|
||||||
pageSizeOptions: ['5', '10', '20', '30', '100', '200'],
|
pageSizeOptions: ['10', '20', '30', '100', '200'],
|
||||||
showTotal: (total, range) => {
|
showTotal: (total, range) => {
|
||||||
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
|
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
|
||||||
},
|
},
|
||||||
@@ -151,7 +152,7 @@ export default {
|
|||||||
searchField: 'nodeName'
|
searchField: 'nodeName'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted () {
|
||||||
this.searchQuery()
|
this.searchQuery()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -213,7 +214,7 @@ export default {
|
|||||||
this.dataSourceRight = selectedRows
|
this.dataSourceRight = selectedRows
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleShowEdit(record){
|
handleShowEdit (record) {
|
||||||
// console.log('handlwShow record',record)
|
// console.log('handlwShow record',record)
|
||||||
// 只有第三级标签允许修改
|
// 只有第三级标签允许修改
|
||||||
return record.code.split('-').length === 3
|
return record.code.split('-').length === 3
|
||||||
@@ -228,6 +229,68 @@ export default {
|
|||||||
// 清空列表选中
|
// 清空列表选中
|
||||||
this.onClearSelected()
|
this.onClearSelected()
|
||||||
},
|
},
|
||||||
|
handleDelete: function (record) {
|
||||||
|
if (!this.url.delete) {
|
||||||
|
this.$message.warning('请设置url.delete属性!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log('record', record)
|
||||||
|
const that = this
|
||||||
|
let content = this.$t('areYouSure')
|
||||||
|
if (record.code.split('-').length <= 2) {
|
||||||
|
content = this.$t('attributeIdentification.labelDelete')
|
||||||
|
}
|
||||||
|
this.$confirm({
|
||||||
|
title: this.$t('confirmDeletion'),
|
||||||
|
content: content,
|
||||||
|
onOk: function () {
|
||||||
|
postAction(that.url.delete, { id: record.id }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.message)
|
||||||
|
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
||||||
|
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
|
||||||
|
that.ipagination.current -= 1
|
||||||
|
}
|
||||||
|
that.loadData()
|
||||||
|
} else {
|
||||||
|
that.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
batchDel: function () {
|
||||||
|
if (!this.url.deleteBatch) {
|
||||||
|
this.$message.warning('请设置url.deleteBatch属性!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.selectedRowKeys.length <= 0) {
|
||||||
|
this.$message.warning(this.$t('selectARecord'))
|
||||||
|
} else {
|
||||||
|
const ids = this.selectedRowKeys.join(',')
|
||||||
|
const that = this
|
||||||
|
this.$confirm({
|
||||||
|
title: this.$t('confirmBatchDeletion'),
|
||||||
|
content: this.$t('attributeIdentification.batchDelete'),
|
||||||
|
onOk: function () {
|
||||||
|
that.loading = true
|
||||||
|
postAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
// 重新计算分页问题
|
||||||
|
that.reCalculatePage(that.selectedRowKeys.length)
|
||||||
|
that.$message.success(res.message)
|
||||||
|
that.loadData()
|
||||||
|
that.onClearSelected()
|
||||||
|
} else {
|
||||||
|
that.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
that.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user