标准/译文申请

This commit is contained in:
baoyu
2024-04-01 16:49:39 +08:00
parent ebf13c861b
commit 05fd0fe6c4
@@ -30,10 +30,11 @@
/>
</el-form-item>
<el-form-item class="el-form-item search-item" label="申请人">
<el-input v-model="applyForUserName" placeholder="选择请选择申请人" @click.native="choiceWSSMR('wssmr', '请选择申请人', StandardApplyForEOPage.applyForUserIds)" />
<el-input v-model="applyForUserName" placeholder="选择请选择申请人"
@click.native="choiceWSSMR('wssmr', '请选择申请人', StandardApplyForEOPage.applyForUserIds)"/>
</el-form-item>
<el-form-item class="el-form-item search-item" label="需求时间">
<el-input v-model="StandardApplyForEOPage.requiredTime" clearable placeholder="请输入需求时间" />
<el-input v-model="StandardApplyForEOPage.requiredTime" clearable placeholder="请输入需求时间"/>
</el-form-item>
<el-form-item class="el-form-item search-item" label="申请状态">
<el-select
@@ -57,22 +58,32 @@
</el-form-item>
</el-form>
</div>
<div class="table-container">
<div class="operate-options">
<div>
<el-button v-btn-permission="'34ea84f51eb01a166b7acfe4f7b02c8d'" size="mini" type="danger" @click="batchOverrule(selectedList)">批量驳回</el-button>
<el-button v-btn-permission="'a8218ff15358a5265e5571e49acf1f4e'" size="mini" type="primary" @click="batchPass(selectedList)">批量通过</el-button>
<el-button v-btn-permission="'b899c22e27baa561b8c2ecb0f35d7302'" size="mini" @click="exportList">列表导出</el-button>
<el-button v-btn-permission="'34ea84f51eb01a166b7acfe4f7b02c8d'" size="mini" type="danger"
@click="batchOverrule(selectedList)">批量驳回
</el-button>
<el-button v-btn-permission="'a8218ff15358a5265e5571e49acf1f4e'" size="mini" type="primary"
@click="batchPass(selectedList)">批量通过
</el-button>
<el-button v-btn-permission="'b899c22e27baa561b8c2ecb0f35d7302'" size="mini" @click="exportList">列表导出
</el-button>
</div>
<div>
<el-button v-btn-permission="'33809866b2fda3f52058299b5e2584c3'" size="mini" type="primary" @click="standardsAndTranslationRequestShowModal">标准/译文获取申请</el-button>
<el-button v-btn-permission="'33809866b2fda3f52058299b5e2584c3'" size="mini" type="primary"
@click="standardsAndTranslationRequestShowModal">标准/译文获取申请
</el-button>
</div>
</div>
<div class="content">
<div class="table-wrap">
<div style="position: absolute;height: calc(100% - 10px);width: 100%;">
<el-table
ref="selections"
v-loading="tableLoading"
tooltip-effect="dark"
style="width: 100%; flex: auto;"
style="width: 100%;"
height="100%"
class="drag-table"
row-key="id"
border
@@ -143,8 +154,14 @@
<el-table-column label="操作" align="center" width="200" fixed="right">
<template slot-scope="scope">
<div class="table-operate-btn" @click="toView(scope.row)">查看</div>
<div v-show="scope.row.status ==='pendingApproval'" v-btn-permission="'3bc041e58bcb4b0510bcc1aad0b9ce89'" class="table-operate-btn" @click="batchPass([scope.row.id])">通过</div>
<div v-show="scope.row.status ==='pendingApproval'" v-btn-permission="'92adace8c9a703b3b2472f684808db98'" class="table-operate-btn" @click="batchOverrule([scope.row.id])">驳回</div>
<div v-show="scope.row.status ==='pendingApproval'"
v-btn-permission="'3bc041e58bcb4b0510bcc1aad0b9ce89'" class="table-operate-btn"
@click="batchPass([scope.row.id])">通过
</div>
<div v-show="scope.row.status ==='pendingApproval'"
v-btn-permission="'92adace8c9a703b3b2472f684808db98'" class="table-operate-btn"
@click="batchOverrule([scope.row.id])">驳回
</div>
<div
v-if="account === scope.row.createBy"
v-show="scope.row.status ==='pendingApproval'"
@@ -183,6 +200,9 @@
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<pagination
style="position: relative;"
:page="StandardApplyForEOPage.page"
@@ -190,11 +210,10 @@
@pageChange="pageChange"
@pageSizeChange="pageSizeChange"
/>
</div>
<standardsAndTranslationModal ref="standardsAndTranslationModalRef" @updateIndexList="getList" />
<detailModal ref="detailModalRef" />
<addModal ref="addModalRef" @updateList="getList" />
<exportDialog ref="exportDialogRef" @exportData="exportName" />
<standardsAndTranslationModal ref="standardsAndTranslationModalRef" @updateIndexList="getList"/>
<detailModal ref="detailModalRef"/>
<addModal ref="addModalRef" @updateList="getList"/>
<exportDialog ref="exportDialogRef" @exportData="exportName"/>
<Role-tree
:is-title="drawerTitle"
:is-visible.sync="modalShowRoleFlag"
@@ -226,7 +245,7 @@ export default {
exportDialog,
addModal
},
data () {
data() {
return {
moduleAdmin: false,
applyForUnitName: '',
@@ -280,17 +299,17 @@ export default {
nodeListDep: []
}
},
mounted () {
mounted() {
this.account = JSON.parse(window.localStorage.getItem('userInfo')).account
if (this.$route.query && this.$route.query.tag === 'fromSearchCenter') {
this.standardsAndTranslationRequestShowModal()
this.$router.replace({ query: { ...this.$route.query, tag: undefined } })
this.$router.replace({query: {...this.$route.query, tag: undefined}})
}
this.getList()
this.getDicTypeListCode()
},
methods: {
batchDelete (id) {
batchDelete(id) {
let ids = ''
let tipsText = ''
if (id) {
@@ -304,17 +323,17 @@ export default {
type: 'warning',
roundButton: false
}).then(() => {
this.$http.postData(this.url.deleteUrl, { ids: ids }, { _this: this }, res => {
this.$http.postData(this.url.deleteUrl, {ids: ids}, {_this: this}, res => {
if (res.ok) {
this.$message.success('操作成功')
this.getList()
}else{
} else {
this.$message.warning(res.message)
}
})
})
},
drawerCheckDep (data) {
drawerCheckDep(data) {
let idList = ''
let nameList = ''
data.forEach(item => {
@@ -328,7 +347,7 @@ export default {
this.StandardApplyForEOPage.applyForUnitIds = idList;
this.applyForUnitName = nameList;
},
choiceZRBM (type, title, id = '') {
choiceZRBM(type, title, id = '') {
this.nodeListDep = []
if (id) {
this.$set(this, 'nodeListDep', id.split(','))
@@ -336,24 +355,24 @@ export default {
this.choiceTitle = title
this.modalShowDepFlag = true
},
ResubmitOrWithdraw (id, status) {
ResubmitOrWithdraw(id, status) {
const query = {
status: status ? status : '',
ids: id
}
this.$http.postData('/lawss/standardApplyFor/batchUpdateStatus', query, { _this: this }, res => {
this.$http.postData('/lawss/standardApplyFor/batchUpdateStatus', query, {_this: this}, res => {
if (res.ok) {
this.$message.success('操作成功')
this.getList()
}else{
} else {
this.$message.warning(res.message)
}
})
},
edit (item) {
edit(item) {
this.$refs.addModalRef.showModal(item)
},
checkedRole (data) {
checkedRole(data) {
let idList = ''
let nameList = ''
data.forEach(item => {
@@ -367,9 +386,9 @@ export default {
this.StandardApplyForEOPage.applyForUserIds = idList
this.applyForUserName = nameList
},
choiceWSSMR (type, title, id) {
choiceWSSMR(type, title, id) {
this.nodeList = []
if(id) {
if (id) {
const nameId = id.split(',')
let idList = []
nameId.forEach(item => {
@@ -382,7 +401,7 @@ export default {
this.drawerTitle = title
this.modalShowRoleFlag = true
},
getDicTypeListCode () {
getDicTypeListCode() {
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
@@ -391,11 +410,11 @@ export default {
}, e => {
})
},
searchData () {
searchData() {
this.StandardApplyForEOPage.page = 1
this.getList()
},
clearSerach () {
clearSerach() {
this.applyForUnitName = ''
this.applyForUserName = ''
this.StandardApplyForEOPage = {
@@ -404,7 +423,7 @@ export default {
}
this.getList()
},
getList () {
getList() {
this.tableLoading = true
this.$http.get(this.url.getList, {
...this.StandardApplyForEOPage
@@ -414,14 +433,14 @@ export default {
if (res.ok) {
this.StandardApplyForEO = res.data.records
this.total = res.data.total
}else {
} else {
this.StandardApplyForEO = []
this.total = 0
}
this.selectedList = []
this.$refs.selections.clearSelection()
this.tableLoading = false
this.$http.get('/lawss/standardApplyFor/queryPendingApprovalCount', '', { _this: this }, res => {
this.$http.get('/lawss/standardApplyFor/queryPendingApprovalCount', '', {_this: this}, res => {
if (res.ok) {
this.$store.commit('SET_STANDARD_TRANSLATION_TODO', res.data.pendingApprovalCount)
this.moduleAdmin = res.data.isStandardApplyForAdministrator
@@ -429,7 +448,7 @@ export default {
})
})
},
batchPass (id) {
batchPass(id) {
if (id.length === 0) {
this.$message({
message: '请选择至少一条数据',
@@ -454,7 +473,7 @@ export default {
type: 'warning',
roundButton: false
}).then(() => {
this.$http.postData(this.url.updateState, { status: 'pass', ids: ids }, { _this: this }, res => {
this.$http.postData(this.url.updateState, {status: 'pass', ids: ids}, {_this: this}, res => {
if (res.ok) {
this.$message.success('操作成功')
this.getList()
@@ -467,7 +486,7 @@ export default {
this.$refs.selections.clearSelection()
})
},
batchOverrule (id) {
batchOverrule(id) {
if (id.length === 0) {
this.$message({
message: '请选择至少一条数据',
@@ -503,8 +522,8 @@ export default {
}
},
inputErrorMessage: ''
}).then(({ value }) => {
this.$http.postData(this.url.updateState, { status: 'refuse', refuseCause: value, ids }, { _this: this }, res => {
}).then(({value}) => {
this.$http.postData(this.url.updateState, {status: 'refuse', refuseCause: value, ids}, {_this: this}, res => {
if (res.ok) {
this.$message.success('操作成功')
this.getList()
@@ -517,7 +536,7 @@ export default {
this.$refs.selections.clearSelection()
})
},
exportName (name) {
exportName(name) {
const params = {
...this.StandardApplyForEOPage,
exportFileName: name ? name : '标准及译文获取申请',
@@ -529,7 +548,7 @@ export default {
responseType: 'blob',
params: params
}).then(res => {
const blob = new Blob([ res ], { type: 'application/vnd.ms-excel' });
const blob = new Blob([res], {type: 'application/vnd.ms-excel'});
// 浏览器兼容,Google和火狐支持a标签的download,IE不支持
if (window.navigator && window.navigator.msSaveBlob) {
// IE浏览器、微软浏览器
@@ -548,24 +567,24 @@ export default {
}
})
},
exportList () {
exportList() {
this.$refs.exportDialogRef.openModel()
},
toView (id) {
toView(id) {
this.$refs.detailModalRef.showModal(id)
},
standardsAndTranslationRequestShowModal () {
standardsAndTranslationRequestShowModal() {
this.$refs.standardsAndTranslationModalRef.showModal()
},
pageChange (page) {
pageChange(page) {
this.StandardApplyForEOPage.page = page
this.getList()
},
pageSizeChange (pageSize) {
pageSizeChange(pageSize) {
this.StandardApplyForEOPage.pageSize = pageSize
this.getList()
},
handleSelectionChange (value) {
handleSelectionChange(value) {
const ids = []
value.forEach(item => {
ids.push(item.id)
@@ -574,7 +593,7 @@ export default {
this.selectedTag = false
}
})
this.selectedList = [ ...ids ]
this.selectedList = [...ids]
}
},
}
@@ -585,23 +604,25 @@ export default {
height: 100%;
display: flex;
flex-direction: column;
.table-container {
background-color: white;
padding: 0 10px;
flex-grow: 1;
display: flex;
flex-direction: column;
.drag-table {
flex-grow: 1;
}
.operate-options {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 10px;
padding: 10px;
}
.content {
flex: auto;
overflow: hidden;
display: flex;
flex-direction: column;
.table-wrap {
flex: auto;
overflow: hidden;
position: relative;
}
}