[update] 解决禅道上一部分企标bug

This commit is contained in:
lideqin
2023-10-30 15:42:54 +08:00
parent e24aaf8415
commit d76927714c
12 changed files with 86 additions and 19 deletions
+1 -1
View File
@@ -393,7 +393,7 @@
}
.ant-pagination-item {
width: 24px;
/* 不能设置宽度,设置宽度三位的时候选择标准弹框会飘 */
height: 24px !important;
min-width: 24px !important;
line-height: 22px !important;
+2
View File
@@ -163,6 +163,8 @@ module.exports = {
pleaseSelectDistributeData: '请选择要分发的数据',
deadline: '截止时间',
submitAddAdd: '提交并新增',
pleaseSelectOneStandard: '请选择至少一条标准',
selectAtLeastOne: '选中至少一条列表数据',
// 树右键
treeRight: {
addFolder: 'Create New Folder',
@@ -22,9 +22,11 @@ module.exports = {
submitQuestion: '提交问题',
standardResolutionSheet: '标准分解单',
nodeName: '节点名称',
subjectToClause: '依据条款',
subjectToClause: '章节条款',
standardContentOrRequirements: '标准内容或要求',
auditContent: '稽查内容'
rectificationDepartment: '整改部门',
auditContent: '稽查内容',
disabledBatchDel: '选中数据中存在没有操作权限的数据,请重新选择'
},
// 评审会记录
reviewMeeting: {
@@ -11,7 +11,7 @@ module.exports = {
exportExcelFile: '企业标准表',
exportZipFile: '企业标准文件',
templateExport: '企业标准模板',
pleaseSelectLeastOneNode: '请先选择企业标准下体系',
pleaseSelectLeastOneNode: '请先选择二级及以下体系',
myCollectNotRemove: '我的收藏体系不可移出标准',
authorizationDepart: '授权部门',
authorizationUser: '授权人员',
@@ -22,9 +22,11 @@ module.exports = {
submitQuestion: '提交问题',
standardResolutionSheet: '标准分解单',
nodeName: '节点名称',
subjectToClause: '依据条款',
subjectToClause: '章节条款',
standardContentOrRequirements: '标准内容或要求',
auditContent: '稽查内容'
rectificationDepartment: '整改部门',
auditContent: '稽查内容',
disabledBatchDel: '选中数据中存在没有操作权限的数据,请重新选择'
},
// 评审会记录
reviewMeeting: {
+2
View File
@@ -166,6 +166,8 @@ module.exports = {
pleaseSelectDistributeData: '请选择要分发的数据',
deadline: '截止时间',
submitAddAdd: '提交并新增',
pleaseSelectOneStandard: '请选择至少一条标准',
selectAtLeastOne: '选中至少一条列表数据',
// 树右键
treeRight: {
addFolder: '新增文件夹',
+1 -1
View File
@@ -328,7 +328,7 @@ export default {
rule.push({
required: true,
message: res.dbFieldTxt + this.$t('cannotEmpty'),
trigger: ['change', 'blur']
trigger: 'change'
})
} else {
rule.push({
@@ -2,7 +2,8 @@
<div class="selection-wrapper">
<div class="box-title-text">
<a-input class="box-input" :value="value" :title="value" @input="indexClick($event)"
:disabled="disabled || disabledInput" readonly
:disabled="disabled || disabledInput" readonly :max-length="500"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="placeholder"/>
<a-button v-if="!disabled" type="primary" class="button-box" @click="standardClick">
{{this.$t('standardSelect.standardSelection')}}
@@ -40,7 +40,8 @@
:data-source="dataList"
:pagination="ipagination"
:row-selection="{ type: type, selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:loading="loading">
:loading="loading"
@change="handleTableChange">
</a-table>
</div>
@@ -154,7 +155,7 @@ export default {
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize
}
this.selectedRowKeys = []
// this.selectedRowKeys = []
this.loading = true
getStandardList(query).then((res) => {
if (res.success) {
@@ -180,6 +181,11 @@ export default {
this.selectedRowKeys = value
this.selectedRowList = row
},
handleTableChange (pagination) {
// 分页、排序、筛选变化时触发
this.ipagination = pagination
this.replacePage()
},
handleCancel () {
this.visible = false
},
+5 -1
View File
@@ -211,7 +211,11 @@ export const ConfigurableTableMixin = {
tableOnChange (pagination, filters, sorter) {
console.log(sorter)
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.order ? sorter.field : ''
if (sorter.field.split('_')[sorter.field.split('_').length - 1] === 'dictText') {
this.isorter.column = sorter.order ? sorter.field.slice(0, -9) : ''
} else {
this.isorter.column = sorter.order ? sorter.field : ''
}
this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc'
}
this.ipagination = pagination
@@ -180,7 +180,7 @@ import TreeNodeModal from './modules/TreeNodeModal'
import UserSelectModal from '../../../components/selection/UserSelectModal'
// 配置标准弹框
import AllocationStandardDrawer from './modules/AllocationStandardDrawer'
import { postDownFile, downloadFile } from '@/api/manage'
import { postDownFile, downloadFile, postAction } from '@/api/manage'
export default {
name: 'EnterpriseStandardList',
@@ -418,11 +418,48 @@ export default {
}
downloadFile(this.url.downTemplateUrl, fileName + '.zip')
},
/**
* 批量删除
*/
batchDel () {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning(this.$t('selectARecord'))
return
}
console.log(this.selectionRows)
if (this.selectionRows.find(item => !item.detailFlag)) {
// 有没有查看权限的数据
this.$message.warning(this.$t('enterpriseStandardLibrary.standard.disabledBatchDel'))
return
}
const ids = this.selectedRowKeys.join(',')
this.$confirm({
title: this.$t('confirmBatchDeletion'),
content: this.$t('deleteAData'),
onOk: () => {
this.loading = true
postAction(this.url.deleteBatch, { ids: ids }).then((res) => {
if (res.success) {
// 重新计算分页问题
this.reCalculatePage(this.selectedRowKeys.length)
this.$message.success(res.message)
this.loadData()
this.onClearSelected()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
}
})
},
// 配置标准
handleAllocationStandard () {
console.log(this.currentTreeNode)
// 没选择左侧树节点,需要提示“请先选择二级及以下体系”
if (!this.currentTreeNode || this.currentTreeNode.length === 0 || this.currentTreeNode.includes('myCollect')) {
if (!this.currentTreeNode || this.currentTreeNode.length === 0 ||
this.currentTreeNode.includes('myCollect') || this.currentTreeNode.includes('adb15f66ce174f7295ab51fbc39c15b8')) {
this.$message.warn(this.$t('enterpriseStandardLibrary.standard.pleaseSelectLeastOneNode'))
return
}
@@ -431,7 +468,8 @@ export default {
// 移出标准
handleShiftOutStandard () {
// 没选择左侧树节点,需要提示“请先选择左侧体系”
if (!this.currentTreeNode || this.currentTreeNode.length === 0) {
if (!this.currentTreeNode || this.currentTreeNode.length === 0 ||
this.currentTreeNode.includes('myCollect') || this.currentTreeNode.includes('adb15f66ce174f7295ab51fbc39c15b8')) {
this.$message.warn(this.$t('enterpriseStandardLibrary.standard.pleaseSelectLeastOneNode'))
return
}
@@ -442,7 +480,7 @@ export default {
}
// 没有选择列表数据,需要提示“选中至少一条列表数据”
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
this.$message.warning(this.$t('selectLeastOne'))
this.$message.warning(this.$t('selectAtLeastOne'))
return
}
this.loading = true
@@ -194,7 +194,7 @@ export default {
})
this.visible = false
} else {
this.$message.warning(this.$t('selectLeastOne'))
this.$message.warning(this.$t('pleaseSelectOneStandard'))
}
},
/**
@@ -13,8 +13,8 @@
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
<add-form ref="addForm"
flag="3"
:defaultValue="{year_number: new Date().getFullYear() + ''}"
:disabledFieldList="['standard_number', 'replaced_standard_num', 'referenced_standard']"
:defaultValue="{year_number: new Date().getFullYear() + '', trial_period: '24'}"
:disabledFieldList="['standard_number', 'replaced_by_standard_number', 'referenced_standard']"
:hiddenFieldList="hiddenFieldList"
:get-form-func="getFormFunc"
:get-document-info-func="getDocumentInfoFunc"
@@ -98,11 +98,21 @@ export default {
dataIndex: 'requirement',
scopedSlots: { customRender: 'text' }
},
{ // 整改部门
title: this.$t('enterpriseStandardLibrary.standard.rectificationDepartment'),
align: 'center',
width: 200,
dataIndex: 'rectificationDepartment',
customRender: (value, row, index) => {
return <j-select-depart v-model={this.dataSource[index].rectificationDepartment}
backDepart={true} />
}
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
width: 200
width: 150
}
],
dataSource: [],