标准/译文获取申请管理 对话框批量删除/删除
This commit is contained in:
+115
-89
@@ -9,108 +9,105 @@
|
||||
<el-button size="mini" type="primary" @click="standardTranslationAcquisitionRequestAdd">新增标准/译文获取申请</el-button>
|
||||
<el-button size="mini" type="primary" @click="importData">导入</el-button>
|
||||
<el-button size="mini" @click="templateDownload">模版下载</el-button>
|
||||
<el-button size="mini" @click="batchDelete">批量删除</el-button>
|
||||
<el-button size="mini" @click="batchDelete(selectedList)">批量删除</el-button>
|
||||
</div>
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
ref="selections"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%; flex: auto;"
|
||||
class="drag-table"
|
||||
height="300px"
|
||||
row-key="id"
|
||||
border
|
||||
:loading="tableLoading"
|
||||
:data="tableData"
|
||||
@selection-change="handleSelectionChange"
|
||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', fontWeight: 'bold', height: '48px'}"
|
||||
ref="selections"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%; flex: auto;"
|
||||
class="drag-table"
|
||||
height="300px"
|
||||
row-key="id"
|
||||
border
|
||||
:loading="tableLoading"
|
||||
:data="StandardApplyForEO"
|
||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', fontWeight: 'bold', height: '48px'}"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
type="index"
|
||||
fixed="left"
|
||||
width="55"
|
||||
label="序号"
|
||||
align="center"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="类型"
|
||||
prop="classification"
|
||||
align="center"
|
||||
min-width="100"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="标准编号"
|
||||
width="150"
|
||||
align="center"
|
||||
prop="standardEncdoing"
|
||||
type="selection"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="标准名称"
|
||||
prop="standardName"
|
||||
align="center"
|
||||
min-width="150"
|
||||
type="index"
|
||||
fixed="left"
|
||||
width="55"
|
||||
label="序号"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="原语言"
|
||||
prop="problemDescription"
|
||||
align="center"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
label="类型"
|
||||
prop="type"
|
||||
align="center"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="目标语言"
|
||||
prop="problemDescription"
|
||||
align="center"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
label="标准编号"
|
||||
width="150"
|
||||
align="center"
|
||||
prop="standNum"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="理由"
|
||||
prop="problemDescription"
|
||||
align="center"
|
||||
min-width="300"
|
||||
show-overflow-tooltip
|
||||
label="标准名称"
|
||||
prop="standName"
|
||||
align="center"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="申请状态"
|
||||
prop="problemDescription"
|
||||
align="center"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
label="原语言"
|
||||
prop="sourceLanguage"
|
||||
align="center"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="目标语言"
|
||||
prop="targetLanguage"
|
||||
align="center"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="理由"
|
||||
prop="reason"
|
||||
align="center"
|
||||
min-width="300"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="申请状态"
|
||||
prop="status"
|
||||
align="center"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<div class="table-operate-btn" @click="toView(scope.row.id)">查看</div>
|
||||
<div class="table-operate-btn" @click="edit(scope.row.id)">编辑</div>
|
||||
<div class="table-operate-btn" @click="deleteItem(scope.row.id)">删除</div>
|
||||
<div class="table-operate-btn" @click="batchDelete([scope.row.id])">删除</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页-->
|
||||
<pagination
|
||||
style="position: relative;"
|
||||
:page="serachForm.page"
|
||||
:total="serachForm.total"
|
||||
@pageChange="pageChange"
|
||||
@pageSizeChange="pageSizeChange"
|
||||
style="position: relative;"
|
||||
:page="page"
|
||||
:total="total"
|
||||
@pageChange="pageChange"
|
||||
@pageSizeChange="pageSizeChange"
|
||||
/>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" @click="submitData(0)">保存</el-button>
|
||||
<el-button size="mini" type="primary" @click="submitData(1)">提交</el-button>
|
||||
</span>
|
||||
<addModal ref="addModalRef"></addModal>
|
||||
<detailModal ref="detailModalRef"></detailModal>
|
||||
<addModal ref="addModalRef" />
|
||||
<detailModal ref="detailModalRef" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -127,50 +124,78 @@ export default {
|
||||
return {
|
||||
visible: false,
|
||||
tableLoading: false,
|
||||
tableData: [],
|
||||
serachForm: {},
|
||||
selectedList: []
|
||||
StandardApplyForEO: [],
|
||||
selectedList: [],
|
||||
page: 1,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
total: 0,
|
||||
url: {
|
||||
deleteUrl: '/lawss/standardApplyFor/batchUpdateValidFlag',
|
||||
getList: '/lawss/standardApplyFor/queryStagingByPage'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showModal () {
|
||||
this.visible = true
|
||||
this.StandardApplyForEO = []
|
||||
this.page = 1
|
||||
this.getList()
|
||||
},
|
||||
handleClose () {
|
||||
this.visible = false
|
||||
},
|
||||
handleSelectionChange (value) {
|
||||
this.selectedList = value
|
||||
},
|
||||
toView (id) {
|
||||
this.$refs.addModalRef.detailModalRef(id)
|
||||
this.$refs.addModalRef.showModal(id)
|
||||
},
|
||||
edit (id) {
|
||||
this.$refs.addModalRef.showModal(id)
|
||||
},
|
||||
deletItem(id){
|
||||
importData () {
|
||||
},
|
||||
templateDownload () {
|
||||
},
|
||||
batchDelete () {
|
||||
if (this.selectedList.length === 0) {
|
||||
getList () {
|
||||
this.tableLoading = true
|
||||
this.$http.get(this.url.getList, { page: this.page, pageSize: this.pageSize }, {
|
||||
_this: this,
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.StandardApplyForEO = res.data.list
|
||||
this.total = res.data.total
|
||||
}else {
|
||||
this.StandardApplyForEO = []
|
||||
this.total = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
batchDelete (id) {
|
||||
if (id.length === 0) {
|
||||
this.$message({
|
||||
message: '请选择至少一条数据',
|
||||
type: 'warning',
|
||||
offset: 20
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = id.join(',')
|
||||
this.$http.postData(this.url.deleteUrl, ids, { _this: this }, res => {
|
||||
this.$message.success('操作成功')
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
importData () {
|
||||
submitData (tag) {
|
||||
},
|
||||
handleSelectionChange (value) {
|
||||
const ids = []
|
||||
value.forEach(item => {
|
||||
ids.push(item.id)
|
||||
})
|
||||
this.selectedList = [ ...ids ]
|
||||
},
|
||||
standardTranslationAcquisitionRequestAdd () {
|
||||
this.$refs.addModalRef.showModal()
|
||||
},
|
||||
submitData (tag) {
|
||||
if (tag) {
|
||||
return
|
||||
}
|
||||
},
|
||||
pageChange (page) {
|
||||
this.questionSerach.page = page
|
||||
this.getList()
|
||||
@@ -184,12 +209,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.operate{
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.table-operate-btn{
|
||||
|
||||
.table-operate-btn {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
color: #409EFF;
|
||||
|
||||
Reference in New Issue
Block a user