Merge remote-tracking branch 'origin/fourthStage-UAT2024-09-20' into fourthStage

This commit is contained in:
lideqin
2024-09-18 15:15:30 +08:00
7 changed files with 127 additions and 46 deletions
+3
View File
@@ -15,6 +15,8 @@ const queryTreeList = (params) => getAction('/laws/standardization/lawsStandardi
const addNode = (params) => postAction('/laws/standardization/lawsStandardization/add', params)
// 标准化活动-编辑
const editNode = (params) => postAction('/laws/standardization/lawsStandardization/edit', params)
// 标准化活动-删除
const deleteNode = (params) => postAction('/laws/standardization/lawsStandardization/delete', params)
// 标准化活动-通过id查询
const queryById = (params) => getAction('/laws/standardization/lawsStandardization/queryById', params)
// 标准化活动-通过id查询表格信息
@@ -43,6 +45,7 @@ export {
queryTreeList,
addNode,
editNode,
deleteNode,
queryById,
queryTableDataById,
queryStatisticalList,
+3 -1
View File
@@ -31,7 +31,9 @@ module.exports = {
addUpToFourLevels: '该节点无法添加子节点',
pleaseUploadGroupInfo: '请上传集团参与情况资料',
pleaseUploadPaymentInfo: '请上传支付信息资料',
pleaseUploadMeeting: '请上传参会记录会议资料'
pleaseUploadMeeting: '请上传参会记录会议资料',
rootNodeNoDelete: '根节点不可以删除,请重新选择',
onlyDeleteLeaf: '只能删除叶子结点,请重新选择'
},
// 问答库
questionAnswer: {
+3 -1
View File
@@ -189,6 +189,7 @@ module.exports = {
noFileAvailableForPreview: '暂无可预览的文件',
enterpriseStandard: '企业标准',
pleaseAtLeastSelectOneUser: '请至少选择一个用户',
workNo: '工号',
// 树右键
treeRight: {
addFolder: '新增文件夹',
@@ -645,7 +646,8 @@ module.exports = {
fileFormatIncorrect: '文件格式不正确',
uploadSuccessful: '上传成功',
uploadMaximumATime: '一次最多上传二十张图片',
deletedSuccessfully: '删除成功'
deletedSuccessfully: '删除成功',
fileNameOverlong: '文件名长度不可超过30,请修改后重试'
},
importWithTemplate: {
chooseFile: '选择文件',
+6
View File
@@ -345,6 +345,12 @@ export default {
doBeforeUpload (file) {
this.uploadGoOn = true
file.uploadGoOn = true
if (file.name.split('.')[0].length > 30) {
this.$message.warning(this.$t('uploadFile.fileNameOverlong'))
this.uploadGoOn = false
file.uploadGoOn = false
return false
}
const fileSize = file.size // 上传的文件大小
if (fileSize === 0) {
this.$message.warning(this.$t('uploadFile.cannotUploadEmpty'))
+11
View File
@@ -310,8 +310,15 @@ export default {
this.$emit('change', path)
},
doBeforeUpload (file) {
console.log('--------file', file)
this.uploadGoOn = true
file.uploadGoOn = true
if (file.name.split('.')[0].length > 30) {
this.$message.warning(this.$t('uploadFile.fileNameOverlong'))
this.uploadGoOn = false
file.uploadGoOn = false
return false
}
const fileSize = file.size // 上传的文件大小
if (fileSize === 0) {
this.$message.warning(this.$t('uploadFile.cannotUploadEmpty'))
@@ -395,6 +402,10 @@ export default {
} else if (info.file.status === 'removed') {
this.handleDelete(info.file)
}
fileList = fileList.filter(tt => !!tt)
console.log(fileList)
// 二次过滤不符合要求的(uploadGoOn为false的),否则只上传多个不符合要求的只会有一个不出现在列表中
fileList = fileList.filter(tt => tt.uploadGoOn === undefined || tt.uploadGoOn === null || tt.uploadGoOn === true)
this.fileList = fileList
if (info.file.status === 'done' || info.file.status === 'removed') {
// returnUrl为true时仅返回文件路径
@@ -14,56 +14,80 @@
<a-row :gutter="24">
<!-- 原企标编号 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.enterpriseStandardNum')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.enterpriseStandardNum')" v-model="queryParam.originEnStandardNo"></a-input>
<a-form-item :label="$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum')" v-model="queryParam.originEnStandardNo"></a-input>
</a-form-item>
</a-col>
<!-- 原企标名称 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.enterpriseStandardName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.enterpriseStandardName')" v-model="queryParam.originEnStandardName"></a-input>
</a-form-item>
</a-col>
<!-- 主起草人 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.principalDrafter')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.principalDrafter')" v-model="queryParam.mainDraftingUser"></a-input>
</a-form-item>
</a-col>
<!-- 主起草单位 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.mainDraftingUnit')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam.mainDraftingUnit"
:maxTagCount="1"
:show-search="true"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="categoryTreeList"
:placeholder="$t('pleaseSelect') + $t('enterpriseStandardLibrary.plan.mainDraftingUnit')"
/>
</a-form-item>
</a-col>
<!-- 主起草单位负责人 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit')" v-model="queryParam.mainDraftingUnitResponsiblePerson"></a-input>
</a-form-item>
</a-col>
<!-- 制修订类型 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.revisionType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.revisionType')"
dict-code="esp_revision_type"
v-model="queryParam.revisionType">
</j-dict-select-tag>
<a-form-item :label="$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName')" v-model="queryParam.originEnStandardName"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<!-- 新企标编号 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.newEnterpriseStandardNum')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.newEnterpriseStandardNum')" v-model="queryParam.newEnStandardNo"></a-input>
</a-form-item>
</a-col>
<!-- 新企标名称 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.newEnterpriseStandardName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.newEnterpriseStandardName')" v-model="queryParam.newEnStandardName"></a-input>
</a-form-item>
</a-col>
<!-- 主起草人 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.principalDrafter')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.principalDrafter')" v-model="queryParam.mainDraftingUser"></a-input>
</a-form-item>
</a-col>
<!-- 主起草单位 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.mainDraftingUnit')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam.mainDraftingUnit"
:maxTagCount="1"
:show-search="true"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="categoryTreeList"
:placeholder="$t('pleaseSelect') + $t('enterpriseStandardLibrary.plan.mainDraftingUnit')"
/>
</a-form-item>
</a-col>
<!-- 主起草单位负责人 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.headOfMainDraftingUnit')" v-model="queryParam.mainDraftingUnitResponsiblePerson"></a-input>
</a-form-item>
</a-col>
<!-- 制修订类型 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.revisionType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.revisionType')"
dict-code="esp_revision_type"
v-model="queryParam.revisionType">
</j-dict-select-tag>
</a-form-item>
</a-col>
<!-- 标准推进人 -->
<a-col :span="8">
<a-form-item :label="$t('enterpriseStandardLibrary.plan.standardPusher')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('enterpriseStandardLibrary.plan.standardPusher')+$t('workNo')" v-model="queryParam.standardPromoter"></a-input>
</a-form-item>
</a-col>
</template>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a @click="handleToggleSearch">
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
@@ -282,7 +306,8 @@ export default {
}
],
dataList: [],
categoryTreeList: [] // 组织机构下拉框数据
categoryTreeList: [], // 组织机构下拉框数据
toggleSearchStatus: false
}
},
mounted () {
@@ -296,6 +321,9 @@ export default {
this.replacePage()
})
},
handleToggleSearch () {
this.toggleSearchStatus = !this.toggleSearchStatus
},
// 获取组织机构树
getSysCategoryTree () {
queryDepartTreeList().then((res) => {
@@ -393,6 +421,7 @@ export default {
showSizeChanger: true,
total: 0
}
this.toggleSearchStatus = false
}
}
}
@@ -17,6 +17,8 @@
</a-button>
<!--编辑-->
<a-button type="primary" ghost icon="edit" @click="handleEdit" v-has="'standardActivity:edit'">{{ $t('edit') }}</a-button>
<!--删除-->
<a-button type="primary" ghost icon="delete" @click="handleDelete" v-has="'standardActivity:delete'">{{ $t('delete') }}</a-button>
<!--查看-->
<a-button type="primary" ghost icon="eye" @click="handleDetail" v-has="'standardActivity:view'">{{ $t('view') }}</a-button>
<!--会议统计列表-->
@@ -80,7 +82,7 @@
<script>
import MindMap from '../../../components/MindMap.vue'
import InternalDetailPage from '../../../components/InternalDetailPage'
import { queryTreeList } from '../../../api/businessSupport'
import { deleteNode, queryTreeList } from '../../../api/businessSupport'
import StandardizationActivityDrawer from './modules/StandardizationActivityDrawer'
import StatisticalListDrawer from './modules/StatisticalListDrawer'
@@ -235,6 +237,32 @@ export default {
}
this.$refs.modalForm.edit(this.selectedNodeId)
},
// 删除节点
handleDelete () {
console.log('--------this.selectedNode', this.selectedNode)
if (this.selectedNode.level === 0) {
this.$message.warning(this.$t('businessSupport.standardizationActivity.rootNodeNoDelete'))
return
}
if (this.selectedNode.children && this.selectedNode.children.length > 0) {
this.$message.warning(this.$t('businessSupport.standardizationActivity.onlyDeleteLeaf'))
return
}
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
deleteNode({ id: this.selectedNodeId }).then((res) => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warning(res.message)
}
})
}
})
},
handleDetail () {
// 需要先选中一个节点
if (!this.selectedNodeId) {