对接标准/译文获取申请

This commit is contained in:
范强强
2024-03-28 10:58:41 +08:00
parent cbd7392931
commit 3d261fe269
4 changed files with 161 additions and 40 deletions
@@ -390,12 +390,13 @@ export default {
}, },
goNuwPage (item) { goNuwPage (item) {
this.$store.commit('setDetailMap', this.$route.path) this.$store.commit('setDetailMap', this.$route.path)
console.log(item);
const params = { const params = {
id: item.id, id: item.id,
dictionaryName: item.dictionaryName, dictionaryName: item.dictionaryName,
dictionType: item.dictionType, dictionType: item.dictionType,
isRelate: item.isRelate, isRelate: item.isRelate,
relateDicId: item.relateDicId relateDicId: item.relateDicId || '1'
} }
if(item.dictionType && item.dictionType === 'TREE'){ if(item.dictionType && item.dictionType === 'TREE'){
this.$router.push({ this.$router.push({
@@ -408,7 +409,6 @@ export default {
params: params params: params
}) })
} }
}, },
handleSelectone (data) { handleSelectone (data) {
this.selectedList = [] this.selectedList = []
@@ -12,28 +12,68 @@
<el-form ref="addFormRef" :model="StandardApplyForEO" :rules="addFormRules" class="label-input-form"> <el-form ref="addFormRef" :model="StandardApplyForEO" :rules="addFormRules" class="label-input-form">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="申请单位" prop="applyForUnitId" label-width="100px" class="add-form-item"> <el-form-item label="申请单位" prop="applyForUnitName" label-width="100px" class="add-form-item">
<el-input v-model="StandardApplyForEO.applyForUnitId" readonly clearable /> <el-input disabled v-model="StandardApplyForEO.applyForUnitName" readonly clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="申请人" prop="applyForUserId" label-width="100px" class="add-form-item"> <el-form-item label="申请人" prop="applyForUserName" label-width="100px" class="add-form-item">
<el-input v-model="StandardApplyForEO.applyForUserId" readonly clearable /> <el-input disabled v-model="StandardApplyForEO.applyForUserName" readonly clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="类型" prop="type" label-width="100px" class="add-form-item"> <el-form-item label="类型" prop="type" label-width="100px" class="add-form-item">
<el-select v-model="StandardApplyForEO.type" placeholder="请选择类型" /> <el-select
v-model="StandardApplyForEO.type"
:placeholder="'请选择类型'"
clearable
>
<el-option
v-for="opt in typeList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="标准类型" prop="standType" label-width="100px" class="add-form-item"> <el-form-item label="标准类型" prop="standType" label-width="100px" class="add-form-item">
<el-select v-model="StandardApplyForEO.standType" placeholder="请选择标准类型" @change="selectStandType" /> <el-select
v-model="StandardApplyForEO.standType"
:placeholder="'请选择标准类型'"
clearable
>
<el-option
v-for="opt in standTypeList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
</el-select>
<!-- <el-select v-model="StandardApplyForEO.standType" placeholder="请选择标准类型" @change="selectStandType" />-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="标准类别" prop="standLb" label-width="100px" class="add-form-item"> <el-form-item label="标准类别" prop="standLb" label-width="100px" class="add-form-item">
<el-select v-model="StandardApplyForEO.standLb" placeholder="请选择标准类别" /> <el-select
v-model="StandardApplyForEO.standLb"
:placeholder="'请选择标准类别'"
clearable
>
<el-option
v-for="opt in standLbList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@@ -91,11 +131,21 @@ export default {
showLoading: false, showLoading: false,
id: '', id: '',
StandardApplyForEO: {}, StandardApplyForEO: {},
typeList: [],
standTypeList: [], standTypeList: [],
standLb: [], standLbList: [
{
label: 'GB',
value: 'GB',
},
{
label: 'GB/T',
value: 'GB/T',
}
],
addFormRules: { addFormRules: {
applyForUnitId: [ { required: true, message: '申请单位不能为空', trigger: 'blur' } ], applyForUnitName: [ { required: true, message: '申请单位不能为空', trigger: 'blur' } ],
applyForUserId: [ { required: true, message: '申请人不能为空', trigger: 'blur' } ], applyForUserName: [ { required: true, message: '申请人不能为空', trigger: 'blur' } ],
type: [ { required: true, message: '类型不能为空', trigger: 'blur' } ], type: [ { required: true, message: '类型不能为空', trigger: 'blur' } ],
standType: [ { required: true, message: '标准类型类型不能为空', trigger: 'blur' } ], standType: [ { required: true, message: '标准类型类型不能为空', trigger: 'blur' } ],
standLb: [ { required: true, message: '标准类型类别不能为空', trigger: 'blur' } ], standLb: [ { required: true, message: '标准类型类别不能为空', trigger: 'blur' } ],
@@ -113,16 +163,39 @@ export default {
} }
} }
}, },
mounted () {
this.getDicTypeListCode()
},
methods: { methods: {
getDicTypeListCode () {
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
this.typeList = res.data.BZJYWTYPE // 标准类别
this.standTypeList = res.data.BZJYWSTADNTYPE
}, e => {
})
},
handleClose () { handleClose () {
this.visible = false this.visible = false
}, },
showModal (id) { addModel () {
this.visible = true this.visible = true
this.id = id this.StandardApplyForEO = {}
this.StandardApplyForEO.applyForUserId = this.$store.getters.userInfo.userId
this.StandardApplyForEO.applyForUserName = this.$store.getters.userInfo.userName
this.StandardApplyForEO.applyForUnitId = this.$store.getters.userInfo.upDeptId
this.StandardApplyForEO.applyForUnitName = this.$store.getters.userInfo.upDeptName
this.StandardApplyForEO = { ...this.StandardApplyForEO }
this.$nextTick(() => {
this.$refs.addFormRef.clearValidate()
})
},
showModal (item) {
this.visible = true
this.StandardApplyForEO = JSON.parse(JSON.stringify(item))
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addFormRef.clearValidate() this.$refs.addFormRef.clearValidate()
this.StandardApplyForEO = {}
}) })
}, },
selectStandType () { selectStandType () {
@@ -136,6 +209,8 @@ export default {
if (res.ok) { if (res.ok) {
this.$emit('updateList') this.$emit('updateList')
this.visible = false this.visible = false
}else{
this.$message.warning(res.message)
} }
}) })
} }
@@ -9,7 +9,7 @@
<el-button size="mini" type="primary" @click="standardTranslationAcquisitionRequestAdd">新增标准/译文获取申请</el-button> <el-button size="mini" type="primary" @click="standardTranslationAcquisitionRequestAdd">新增标准/译文获取申请</el-button>
<el-button size="mini" type="primary" @click="importData">导入</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="templateDownload">模版下载</el-button>
<el-button size="mini" @click="batchDelete(selectedList)">批量删除</el-button> <el-button size="mini" @click="batchDelete()">批量删除</el-button>
</div> </div>
<div class="table-container"> <div class="table-container">
<el-table <el-table
@@ -20,7 +20,6 @@
height="300px" height="300px"
row-key="id" row-key="id"
border border
:loading="tableLoading"
:data="StandardApplyForEO" :data="StandardApplyForEO"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', fontWeight: 'bold', height: '48px'}" :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@@ -87,9 +86,9 @@
/> />
<el-table-column label="操作" align="center" width="200" fixed="right"> <el-table-column label="操作" align="center" width="200" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="table-operate-btn" @click="toView(scope.row.id)">查看</div> <div class="table-operate-btn" @click="toView(scope.row)">查看</div>
<div class="table-operate-btn" @click="edit(scope.row.id)">编辑</div> <div class="table-operate-btn" @click="edit(scope.row)">编辑</div>
<div class="table-operate-btn" @click="batchDelete([scope.row.id])">删除</div> <div class="table-operate-btn" @click="batchDelete(scope.row.id)">删除</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -103,9 +102,10 @@
/> />
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="submitData(0)">保存</el-button> <el-button size="mini" type="primary" @click="cancel">取消</el-button>
<el-button size="mini" type="primary" @click="submitData(1)">提交</el-button> <el-button size="mini" type="primary" @click="submitData(1)">提交</el-button>
</span> </span>
<loading :loading="tableLoading">数据加载中</loading>
<addModal ref="addModalRef" @updateList="getList" /> <addModal ref="addModalRef" @updateList="getList" />
<detailModal ref="detailModalRef" /> <detailModal ref="detailModalRef" />
</el-dialog> </el-dialog>
@@ -146,15 +146,16 @@ export default {
this.visible = false this.visible = false
this.$emit('updateIndexList') this.$emit('updateIndexList')
}, },
toView (id) { toView (item) {
this.$refs.addModalRef.showModal(id) this.$refs.addModalRef.showModal(item)
}, },
edit (id) { edit (item) {
this.$refs.addModalRef.showModal(id) this.$refs.addModalRef.showModal(item)
}, },
importData () { importData () {
}, },
templateDownload () { templateDownload () {
window.open('/api/lawss/standardApplyFor/exportTemplateFile?fileName=标准/译文获取申请模板.xlsx')
}, },
getList () { getList () {
this.tableLoading = true this.tableLoading = true
@@ -162,30 +163,68 @@ export default {
_this: this, _this: this,
}, res => { }, res => {
if (res.ok) { if (res.ok) {
this.StandardApplyForEO = res.data.list this.StandardApplyForEO = res.data.records
this.total = res.data.total this.total = res.data.total
}else { }else {
this.StandardApplyForEO = [] this.StandardApplyForEO = []
this.total = 0 this.total = 0
} }
this.tableLoading = false
}) })
}, },
batchDelete (id) { batchDelete (id) {
if (id.length === 0) { let ids = ''
this.$message({ let tipsText = ''
message: '请选择至少一条数据', if (id) {
type: 'warning', ids = id
offset: 20 tipsText = '确认删除这条数据?'
}) } else {
return if (this.selectedList && this.selectedList.length > 0) {
ids = this.selectedList.join(',')
tipsText = '确认删除这些数据?'
}else{
this.$message.warning('请至少勾选一条数据')
return
}
} }
const ids = id.join(',') this.$confirm(tipsText, '提示', {
this.$http.postData(this.url.deleteUrl, ids, { _this: this }, res => { confirmButtonText: '确定',
this.$message.success('操作成功') confirmButtonClass: 'common-button-primary',
this.getList() cancelButtonText: '取消',
type: 'warning',
roundButton: false
}).then(() => {
this.$http.postData(this.url.deleteUrl, { ids: ids }, { _this: this }, res => {
if (res.ok) {
this.$message.success('操作成功')
this.getList()
this.selectedList = []
}else{
this.$message.warning(res.message)
}
})
}).catch(() => {
// 取消删除,清空选择
this.$refs.selections.clearSelection()
}) })
}, },
submitData (tag) { submitData () {
if (this.selectedList && this.selectedList.length > 0){
const query = {
status: 'pendingApproval',
ids: this.selectedList.join(',')
}
this.$http.postData('/lawss/standardApplyFor/batchUpdateStatus', query, { _this: this }, res => {
if (res.ok) {
this.$message.success('操作成功')
this.getList()
}else{
this.$message.warning(res.message)
}
})
} else {
this.$message.warning('请至少勾选一条数据')
}
}, },
handleSelectionChange (value) { handleSelectionChange (value) {
const ids = [] const ids = []
@@ -195,7 +234,7 @@ export default {
this.selectedList = [ ...ids ] this.selectedList = [ ...ids ]
}, },
standardTranslationAcquisitionRequestAdd () { standardTranslationAcquisitionRequestAdd () {
this.$refs.addModalRef.showModal() this.$refs.addModalRef.addModel()
}, },
pageChange (page) { pageChange (page) {
this.questionSerach.page = page this.questionSerach.page = page
@@ -205,6 +244,9 @@ export default {
this.questionSerach.pageSize = pageSize this.questionSerach.pageSize = pageSize
this.getList() this.getList()
}, },
cancel () {
this.visible = false
},
} }
} }
</script> </script>
@@ -222,4 +264,8 @@ export default {
color: #409EFF; color: #409EFF;
margin: 0 5px; margin: 0 5px;
} }
/deep/.el-input.is-disabled .el-input__inner{
background-color: #fff;
color: #606266;
}
</style> </style>
@@ -203,7 +203,7 @@ export default {
_this: this _this: this
}, res => { }, res => {
if (res.ok) { if (res.ok) {
this.StandardApplyForEO = res.data.list this.StandardApplyForEO = res.data.records
this.total = res.data.total this.total = res.data.total
}else { }else {
this.StandardApplyForEO = [] this.StandardApplyForEO = []