标准/译文申请

This commit is contained in:
baoyu
2024-04-01 16:49:39 +08:00
parent ebf13c861b
commit 05fd0fe6c4
@@ -5,15 +5,15 @@
<el-form :inline="true" :model="StandardApplyForEOPage">
<el-form-item class="el-form-item search-item" label="类型">
<el-select
v-model="StandardApplyForEOPage.type"
:placeholder="'请选择类型'"
clearable
v-model="StandardApplyForEOPage.type"
:placeholder="'请选择类型'"
clearable
>
<el-option
v-for="opt in typeList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
v-for="opt in typeList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
@@ -21,31 +21,32 @@
</el-form-item>
<el-form-item class="el-form-item search-item" label="申请单位">
<el-input
v-model="applyForUnitName"
:config="zrbmOptions"
clearable
placeholder="请选择申请单位"
readonly
@click.native="choiceZRBM('dep', '选择申请单位', StandardApplyForEOPage.applyForUnitIds)"
v-model="applyForUnitName"
:config="zrbmOptions"
clearable
placeholder="请选择申请单位"
readonly
@click.native="choiceZRBM('dep', '选择申请单位', StandardApplyForEOPage.applyForUnitIds)"
/>
</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
v-model="StandardApplyForEOPage.status"
:placeholder="'请选择申请状态'"
clearable
v-model="StandardApplyForEOPage.status"
:placeholder="'请选择申请状态'"
clearable
>
<el-option
v-for="opt in statusList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
v-for="opt in statusList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
@@ -57,156 +58,174 @@
</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>
</div>
<div>
<el-button v-btn-permission="'33809866b2fda3f52058299b5e2584c3'" size="mini" type="primary" @click="standardsAndTranslationRequestShowModal">标准/译文获取申请</el-button>
<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>
</div>
<div>
<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%;"
height="100%"
class="drag-table"
row-key="id"
border
: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="typeShow"
align="center"
min-width="100"
/>
<el-table-column
show-overflow-tooltip
label="标准编号"
width="150"
align="center"
prop="standNumShow"
/>
<el-table-column
show-overflow-tooltip
label="标准名称"
prop="standName"
align="center"
min-width="150"
/>
<el-table-column
show-overflow-tooltip
label="原语言"
prop="sourceLanguage"
align="center"
min-width="85"
/>
<el-table-column
show-overflow-tooltip
label="目标语言"
prop="targetLanguage"
align="center"
min-width="85"
/>
<el-table-column
show-overflow-tooltip
label="理由"
prop="reason"
align="center"
min-width="300"
/>
<el-table-column
show-overflow-tooltip
label="申请状态"
prop="statusShow"
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)">查看</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'"
v-btn-permission="'08d4e36d7580c108f3a4ee8a66bbe04e'"
class="table-operate-btn"
@click="ResubmitOrWithdraw (scope.row.id,'draft')"
>
撤回
</div>
<div
v-if="account === scope.row.createBy"
v-show="scope.row.status === 'refuse' || scope.row.status === 'draft'"
v-btn-permission="'a2a193e87244b42fb2f989a1a9b40330'"
class="table-operate-btn"
@click="edit(scope.row)"
>
编辑
</div>
<div
v-if="account === scope.row.createBy"
v-show="scope.row.status === 'refuse' || scope.row.status === 'draft'"
v-btn-permission="'c3944c3c309ba5bc5d11b6b5a2773454'"
class="table-operate-btn"
@click="ResubmitOrWithdraw (scope.row.id,'pendingApproval')"
>
重新提交
</div>
<div
v-if="account === scope.row.createBy || moduleAdmin"
v-show="scope.row.status === 'refuse' || scope.row.status === 'draft'"
class="table-operate-btn"
@click="batchDelete (scope.row.id)"
>
删除
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
<el-table
ref="selections"
v-loading="tableLoading"
tooltip-effect="dark"
style="width: 100%; flex: auto;"
class="drag-table"
row-key="id"
border
: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="typeShow"
align="center"
min-width="100"
/>
<el-table-column
show-overflow-tooltip
label="标准编号"
width="150"
align="center"
prop="standNumShow"
/>
<el-table-column
show-overflow-tooltip
label="标准名称"
prop="standName"
align="center"
min-width="150"
/>
<el-table-column
show-overflow-tooltip
label="原语言"
prop="sourceLanguage"
align="center"
min-width="85"
/>
<el-table-column
show-overflow-tooltip
label="目标语言"
prop="targetLanguage"
align="center"
min-width="85"
/>
<el-table-column
show-overflow-tooltip
label="理由"
prop="reason"
align="center"
min-width="300"
/>
<el-table-column
show-overflow-tooltip
label="申请状态"
prop="statusShow"
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)">查看</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'"
v-btn-permission="'08d4e36d7580c108f3a4ee8a66bbe04e'"
class="table-operate-btn"
@click="ResubmitOrWithdraw (scope.row.id,'draft')"
>
撤回
</div>
<div
v-if="account === scope.row.createBy"
v-show="scope.row.status === 'refuse' || scope.row.status === 'draft'"
v-btn-permission="'a2a193e87244b42fb2f989a1a9b40330'"
class="table-operate-btn"
@click="edit(scope.row)"
>
编辑
</div>
<div
v-if="account === scope.row.createBy"
v-show="scope.row.status === 'refuse' || scope.row.status === 'draft'"
v-btn-permission="'c3944c3c309ba5bc5d11b6b5a2773454'"
class="table-operate-btn"
@click="ResubmitOrWithdraw (scope.row.id,'pendingApproval')"
>
重新提交
</div>
<div
v-if="account === scope.row.createBy || moduleAdmin"
v-show="scope.row.status === 'refuse' || scope.row.status === 'draft'"
class="table-operate-btn"
@click="batchDelete (scope.row.id)"
>
删除
</div>
</template>
</el-table-column>
</el-table>
<pagination
</div>
<pagination
style="position: relative;"
:page="StandardApplyForEOPage.page"
:total="total"
@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"
:nodeList="nodeList"
@checkedRole="checkedRole"
:is-title="drawerTitle"
:is-visible.sync="modalShowRoleFlag"
:nodeList="nodeList"
@checkedRole="checkedRole"
/>
<Mechanism-tree
:checkBox="true"
:is-title="choiceTitle"
:is-visible.sync="modalShowDepFlag"
:nodeList="nodeListDep"
@checkedRole="drawerCheckDep"
:checkBox="true"
:is-title="choiceTitle"
:is-visible.sync="modalShowDepFlag"
:nodeList="nodeListDep"
@checkedRole="drawerCheckDep"
/>
</div>
</template>
@@ -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标签的downloadIE不支持
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;
background-color: white;
.table-container {
background-color: white;
padding: 0 10px;
flex-grow: 1;
.operate-options {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
}
.content {
flex: auto;
overflow: hidden;
display: flex;
flex-direction: column;
.drag-table {
flex-grow: 1;
}
.operate-options {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 10px;
.table-wrap {
flex: auto;
overflow: hidden;
position: relative;
}
}