diff --git a/src/api/documentToolApi.js b/src/api/documentToolApi.js
index e835fd1b..a06908e7 100644
--- a/src/api/documentToolApi.js
+++ b/src/api/documentToolApi.js
@@ -2,7 +2,12 @@
import { getAction, postAction } from './manage'
// 文档拆分-发布
-const releaseSplitStandard = (params) => postAction('', params)
+const releaseSplitStandard = (params) => postAction('/split/sarFileSplitInfo/publish', params)
+// 文档拆分-更改权限
+const changePermission = (params) => postAction('/split/sarFileSplitInfo/updatePermissions', params)
+// 文档拆分-撤回
+const withdraw = (params) => postAction('', params)
+
// 文档拆分-拆分已入库文本-拆分
const addDocSplit = (params) => postAction('/split/sarFileSplitInfo/add', params)
// 文档拆分编辑-表头
@@ -66,6 +71,8 @@ const getCommentList = (params) => getAction('/compare/sarFileCompareResComment/
export {
// 文档拆分
releaseSplitStandard,
+ changePermission,
+ withdraw,
// 文档拆分-详情
getDocSplitTableHeader,
diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js
index a144b998..0786d7b8 100644
--- a/src/common/lang/en-us.js
+++ b/src/common/lang/en-us.js
@@ -121,6 +121,7 @@ module.exports = {
confirmRelease: 'Confirm Release?',
confirmReleaseContent: 'Confirm to publish the data?',
confirmWithdraw: 'Confirm to Withdraw?',
+ confirmWithdrawContent: 'Confirm the withdrawal of this data?',
doNotHavePermissionDeleteData: 'Do not have permission to delete this data',
noData: 'No Data',
dataLoading: 'Data loading...',
@@ -406,6 +407,8 @@ module.exports = {
formatRequirementContentTwo: '2.The images are in jpg, jpeg, png, gif format',
formatRequirementContentThree: '3.The image in the document is displayed in the form of a link in the exported excel, click the link to jump to the specified local file',
formatRequirementContentFour: '4.The table in the document is displayed in the form of a link in the exported excel. Click the link to jump to the specified sheet page',
+ changePermissions: 'Change permissions',
+ pleaseSelectUser: 'Please select a user',
selectFileType: 'Please select a file type',
onlyWord: 'Only word files can be imported',
diff --git a/src/common/lang/workCenter/en.js b/src/common/lang/workCenter/en.js
index aa5b3da2..b3b82401 100644
--- a/src/common/lang/workCenter/en.js
+++ b/src/common/lang/workCenter/en.js
@@ -102,5 +102,11 @@ module.exports = {
timeConsuming: '耗时',
approvalOpinion: '审批意见',
opinionContent: '意见内容'
+ },
+ // 标准征求意见
+ standardConsultationProcess: {
+ standardText: '标准文本',
+ selectText: '选择文本',
+ selectionStandardFile: '选择标准文件'
}
}
diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js
index bab8b724..be578da8 100644
--- a/src/common/lang/workCenter/zh.js
+++ b/src/common/lang/workCenter/zh.js
@@ -123,5 +123,11 @@ module.exports = {
finishTime: '完成时间',
processState: '流程状态',
processTime: '流程耗时(小时)'
+ },
+ // 标准征求意见
+ standardConsultationProcess: {
+ standardText: '标准文本',
+ selectText: '选择文本',
+ selectionStandardFile: '选择标准文件'
}
}
diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js
index ce7226e4..2bd10bef 100644
--- a/src/common/lang/zh-cn.js
+++ b/src/common/lang/zh-cn.js
@@ -121,6 +121,7 @@ module.exports = {
confirmRelease: '确认发布?',
confirmReleaseContent: '确认发布该条数据?',
confirmWithdraw: '确认撤回?',
+ confirmWithdrawContent: '确认撤回该条数据?',
doNotHavePermissionDeleteData: '没有权限删除此数据',
noData: '暂无数据',
dataLoading: '数据加载中...',
@@ -409,6 +410,8 @@ module.exports = {
formatRequirementContentTwo: '2.图片为jpg、jpeg、png、gif格式',
formatRequirementContentThree: '3.文档中的图片,在导出excel中以链接的形式展示,点击链接跳转到本地指定的文件',
formatRequirementContentFour: '4.文档中的表格,在导出excel中以链接的形式展示,点击链接跳转到指定的sheet页面',
+ changePermissions: '更改权限',
+ pleaseSelectUser: '请选择一个用户',
selectFileType: '请选择文件类型',
onlyWord: '只能导入word文件',
diff --git a/src/components/selection/UserSelectModal.vue b/src/components/selection/UserSelectModal.vue
index bc729d85..d8ab48f8 100644
--- a/src/components/selection/UserSelectModal.vue
+++ b/src/components/selection/UserSelectModal.vue
@@ -100,6 +100,12 @@ export default {
default: () => {
return ''
}
+ },
+ // 是否校验必选
+ checkRequired: {
+ type: Boolean,
+ required: false,
+ default: false
}
},
watch: {
@@ -297,6 +303,10 @@ export default {
this.selectedRowKeys = this.selectedRowKeys.filter(item => item !== record.id)
},
handleOk () {
+ if (this.checkRequired && (!this.selectedRowKeys || this.selectedRowKeys.length === 0)) {
+ this.$message.warning(this.$t('docTool.split.pleaseSelectUser'))
+ return
+ }
this.$emit('change', this.selectedRowKeys.join(','))
this.$emit('nameChange', this.dataSourceRight.map(item => item.realname + '(' + item.username + ')').join(','))
this.close()
diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js
index 733f704d..fbec5008 100644
--- a/src/enums/commonEnums.js
+++ b/src/enums/commonEnums.js
@@ -75,3 +75,9 @@ export const OperationType = {
ENTRY: { text: '标准法规入库', value: '1' },
CHANGE: { text: '标准法规变更', value: '2' }
}
+
+// 文档拆分-拆分状态
+export const SplitStatus = {
+ EDITING: { text: '编辑中', value: '1' },
+ RELEASED: { text: '已发布', value: '2' }
+}
diff --git a/src/mixins/ConfigurableTableMixin.js b/src/mixins/ConfigurableTableMixin.js
index 2155b077..e0eec074 100644
--- a/src/mixins/ConfigurableTableMixin.js
+++ b/src/mixins/ConfigurableTableMixin.js
@@ -56,7 +56,8 @@ export const ConfigurableTableMixin = {
needFilterTableBtn: true, // 是否需要过滤没有权限的按钮
tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
getTableHeaderFunc: null, // 获取表头的方法
- tableSlotField: [] // 表格需要使用插槽的字段,dbFieldName
+ tableSlotField: [], // 表格需要使用插槽的字段,dbFieldName
+ disabledMixinsCreate: false
}
},
computed: {
@@ -65,6 +66,9 @@ export const ConfigurableTableMixin = {
}
},
mounted () {
+ if (this.disabledMixinsCreate) {
+ return
+ }
this.getTableHeader()
this.loadData()
// 过滤没有权限的按钮
@@ -174,6 +178,7 @@ export const ConfigurableTableMixin = {
const param = Object.assign({}, this.searchParams, this.isorter, this.filters)
param.pageNo = this.ipagination.current
param.pageSize = this.ipagination.pageSize
+ console.log(param)
return filterObj(param)
},
loadData (arg) {
diff --git a/src/views/documentTool/documentSplit/DocumentSplit.vue b/src/views/documentTool/documentSplit/DocumentSplit.vue
index f643a785..4c5cf978 100644
--- a/src/views/documentTool/documentSplit/DocumentSplit.vue
+++ b/src/views/documentTool/documentSplit/DocumentSplit.vue
@@ -42,12 +42,14 @@
{{ $t('docTool.split.splitText') }}
-
+
{{ $t('docTool.split.importResults') }}
{{ $t('batchDelete') }}
+
+ {{ $t('docTool.split.changePermissions') }}
@@ -89,6 +72,8 @@
+
+
@@ -97,21 +82,39 @@ import '../../../assets/less/common.less'
import JTable from '../../../components/jero/JTable.vue'
import SplitText from './modules/SplitText.vue'
import { JeroListMixin } from '../../../mixins/JeroListMixin.js'
-import { releaseSplitStandard } from '../../../api/documentToolApi.js'
+import { releaseSplitStandard, changePermission, withdraw } from '../../../api/documentToolApi.js'
import ImportSplitResultModal from './modules/ImportSplitResultModal.vue'
+import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
+import { SplitStatus } from '../../../enums/commonEnums.js'
+import { mapState } from 'vuex'
export default {
name: 'DocumentSplit',
- components: { JTable, SplitText, ImportSplitResultModal },
+ components: { JTable, SplitText, ImportSplitResultModal, UserSelectModal },
mixins: [JeroListMixin],
data () {
return {
+ userInfo: this.$store.getters.userInfo,
operationList: [
// 发布
{
text: this.$t('release'),
clickEvent: 'handleRelease',
- has: 'split:sarFileSplitInfo:release'
+ has: 'split:sarFileSplitInfo:release',
+ show: (record) => {
+ // 创建人(更改权限更改的是这个字段)是当前登录人,且状态为编辑中可以发布
+ return record.createBy === this.userInfo.username && record.splitStatus === SplitStatus.EDITING.value
+ }
+ },
+ // 撤回
+ {
+ text: this.$t('withdraw'),
+ clickEvent: 'handleWithdraw',
+ has: 'split:sarFileSplitInfo:release',
+ show: (record) => {
+ // 创建人(更改权限更改的是这个字段)是当前登录人,且状态为已发布可以撤回
+ return record.createBy === this.userInfo.username && record.splitStatus === SplitStatus.RELEASED.value
+ }
},
// 查看
{
@@ -123,25 +126,33 @@ export default {
{
text: this.$t('edit'),
clickEvent: 'handleEdit',
- has: 'split:sarFileSplitItems:edit'
+ has: 'split:sarFileSplitItems:edit',
+ show: (record) => {
+ // 创建人(更改权限更改的是这个字段)是当前登录人,且状态为编辑中可以编辑
+ return record.createBy === this.userInfo.username && record.splitStatus === SplitStatus.EDITING.value
+ }
},
// 删除
{
text: this.$t('delete'),
clickEvent: 'handleDelete',
- has: 'split:sarFileSplitInfo:delete'
+ has: 'split:sarFileSplitInfo:delete',
+ show: (record) => {
+ // 创建人(更改权限更改的是这个字段)是当前登录人,且状态为编辑中可以删除
+ return record.createBy === this.userInfo.username && record.splitStatus === SplitStatus.EDITING.value
+ }
}
],
columns: [
// 标准号
{
- dataIndex: 'standardNumber',
+ dataIndex: 'serialNumber',
title: this.$t('standardSelect.standardNumber'),
width: 150
},
// 标准名称
{
- dataIndex: 'standardName',
+ dataIndex: 'title',
title: this.$t('standardSelect.standardName'),
width: 150
},
@@ -155,17 +166,17 @@ export default {
{
dataIndex: 'fileName',
title: this.$t('fileName'),
- width: 150
+ width: 180
},
// 拆分状态
{
- dataIndex: '5',
+ dataIndex: 'splitStatus_dictText',
title: this.$t('docTool.split.splitState'),
width: 150
},
// 编辑人
{
- dataIndex: '6',
+ dataIndex: 'author',
title: this.$t('docTool.split.editor'),
width: 150
},
@@ -187,18 +198,15 @@ export default {
title: this.$t('operation'),
fixed: 'right',
width: 150,
- scopedSlots: { customRender: 'operation' }
+ scopedSlots: { customRender: 'action' }
}
],
url: {
list: '/split/sarFileSplitInfo/page', // 表格数据
- deleteBatch: '', // 批量删除
- deleteUrl: '',
+ deleteBatch: '/split/sarFileSplitInfo/deleteBatch', // 批量删除
+ deleteUrl: '/split/sarFileSplitInfo/delete',
backDocument: '' // 回传至文档库
- },
- dataSource: [
- { id: 1 }
- ]
+ }
}
},
methods: {
@@ -232,6 +240,29 @@ export default {
}
})
},
+ /**
+ * TODO 撤回
+ * @param id
+ */
+ handleWithdraw ({ id }) {
+ this.$confirm({
+ title: this.$t('confirmWithdraw'),
+ content: this.$t('confirmWithdrawContent'),
+ onOk: () => {
+ this.loading = true
+ withdraw({ id }).then(res => {
+ if (res.success) {
+ this.$message.success(res.message)
+ this.modalFormOk()
+ } else {
+ this.$message.warn(res.message)
+ }
+ }).finally(() => {
+ this.loading = false
+ })
+ }
+ })
+ },
// 编辑
handleEdit (record) {
this.$router.push({
@@ -262,6 +293,33 @@ export default {
if (num === 1) {
this.$refs.tableData.$emit('searchGetData')
}
+ },
+ /**
+ * 更改权限
+ */
+ handleChangePermission () {
+ if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
+ this.$message.warning(this.$t('selectARecord'))
+ return
+ }
+ this.$refs.userSelectModal.open()
+ },
+ continueChangePermission (id) {
+ this.loading = true
+ const params = {
+ ids: this.selectedRowKeys.join(','),
+ createBy: id
+ }
+ changePermission(params).then(res => {
+ if (res.success) {
+ this.$message.success(res.message)
+ this.modalFormOk()
+ } else {
+ this.$message.warning(res.message)
+ }
+ }).finally(() => {
+ this.loading = false
+ })
}
}
}
diff --git a/src/views/documentTool/documentSplit/DocumentSplitDetail.vue b/src/views/documentTool/documentSplit/DocumentSplitDetail.vue
index 7e19e6d7..3171ed02 100644
--- a/src/views/documentTool/documentSplit/DocumentSplitDetail.vue
+++ b/src/views/documentTool/documentSplit/DocumentSplitDetail.vue
@@ -158,10 +158,11 @@
-
- {{ record.iterms_conditions && record.iterms_conditions !== 'null' ? record.iterms_conditions.replace(/<.*?>/ig, ' ') : ''
- }}
+
+
+
+ {{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
+
@@ -205,6 +206,7 @@ import {
getClauseTreeData
} from '../../../api/documentToolApi.js'
import Search from '../../../components/customField/Search.vue'
+import { isHasPermission } from '../../../utils/hasPermission.js'
export default {
name: 'DocumentSplitDetail',
@@ -236,9 +238,9 @@ export default {
fullWidth: '',
parameter: {},
administrators: false,
- showAction: this.isCanOperate,
+ showAction: false,
flag: '4', // 查询要用到
-
+ operateSlotName: 'action',
getQueryConditionFunc: getDocSplitSearch,
getTableHeaderFunc: getDocSplitTableHeader,
treeData: [],
@@ -247,15 +249,23 @@ export default {
mouseInNodeKey: null, // 鼠标悬浮的节点key值
// 操作栏
operationList: [
+ // 编辑
{
text: this.$t('edit'),
- clickEvent: 'handleEdit',
- has: 'split:sarFileSplitItems:update'
+ clickEvent: 'handleEdit'
+ // has: 'split:sarFileSplitItems:update'
},
+ // 复制
+ {
+ text: this.$t('copy'),
+ clickEvent: 'handleEdit'
+ // has: 'split:sarFileSplitItems:update'
+ },
+ // 删除
{
text: this.$t('delete'),
- clickEvent: 'handleDelete',
- has: 'split:sarFileSplitItems:delete'
+ clickEvent: 'handleDelete'
+ // has: 'split:sarFileSplitItems:delete'
}
],
url: {
@@ -265,26 +275,32 @@ export default {
delete: '/split/sarFileSplitItems/batchDeleteItems', // 删除
deleteBatch: '/split/sarFileSplitItems/batchDeleteItems', // 批量删除
downTemplateUrl: '/split/sarFileSplitItems/exportTemplate' // 模板下载
- }
+ },
+ disabledMixinsCreate: true,
+ tableSlotField: ['Item_content']
}
},
computed: {
- isCanOperate () {
- return !!(this.$route.query.createBy === this.userInfo.username || this.administrators)
- },
// 页面标题是标准名称
pageTitle () {
return this.$route.query.standardName
},
...mapGetters(['userInfo'])
},
- created () {
+ mounted () {
+ this.operateColumn.scopedSlots.customRender = 'action'
+ this.showAction = this.$route.query.createBy === this.userInfo.username || this.administrators
+ this.infoId = this.$route.query.infoId
this.filters = {
menu_id: this.menuId,
info_id: this.infoId
}
- },
- mounted () {
+ this.getTableHeader()
+ this.loadData()
+ // 过滤没有权限的按钮
+ if (this.needFilterTableBtn) {
+ this.operationList = this.operationList.filter(item => !item.has || isHasPermission(item.has))
+ }
this.administrators = false
if (this.userInfo.userRoleList && this.userInfo.userRoleList.length > 0) {
this.userInfo.userRoleList.forEach(res => {
@@ -340,7 +356,6 @@ export default {
getClauseTreeData(params).then(res => {
if (res.success) {
this.treeData = res.result || []
- console.log(this.treeData)
}
}).finally(() => {
this.loading = false
diff --git a/src/views/documentTool/documentSplit/modules/SplitClauseDetail.vue b/src/views/documentTool/documentSplit/modules/SplitClauseDetail.vue
index 12046797..e4bfe61d 100644
--- a/src/views/documentTool/documentSplit/modules/SplitClauseDetail.vue
+++ b/src/views/documentTool/documentSplit/modules/SplitClauseDetail.vue
@@ -2,6 +2,7 @@
{
diff --git a/src/views/workCenter/NewProcess.vue b/src/views/workCenter/NewProcess.vue
index a25f5e18..d10e5f11 100644
--- a/src/views/workCenter/NewProcess.vue
+++ b/src/views/workCenter/NewProcess.vue
@@ -25,7 +25,7 @@ export default {
},
{ // 标准征求意见流程
title: this.$t('workCenter.newProcess.annotateTheConsultationProcess'),
- path: ''
+ path: '/workCenter/StandardConsultationProcess'
},
{ // 项目合规评估流程
title: this.$t('workCenter.newProcess.projectComplianceAssessmentProcess'),
diff --git a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue
new file mode 100644
index 00000000..9bb221bf
--- /dev/null
+++ b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
{{ $t('processInformation') }}
+
+
+
+
+
+ event.target.value = event.target.value.trim()"
+ :maxLength="50"
+ disabled
+ v-decorator="['nodeName']" />
+
+
+
+
+
+
+
+
+
+
+
+ event.target.value = event.target.value.trim()"
+ :maxLength="500"
+ type="textarea"
+ v-decorator="['nodeName']" />
+
+
+
+
+
{{ $t('basicServiceInformation') }}
+
+
+
+
+
+
+
+
+
+
+
+ event.target.value = event.target.value.trim()"
+ :maxLength="50"
+ disabled
+ v-decorator="['nodeName']" />
+
+
+
+
+
+
+
+
+ {{ this.$t('workCenter.standardConsultationProcess.selectText') }}
+
+
+
+
+
+
+
+
+
+
+
{{ $t('turnTo') }}
+
+
{{ $t('preservation') }}
+
+
{{ $t('submit') }}
+
+
{{ $t('agree') }}
+
+
{{ $t('reject') }}
+
+
+
+
+
+
+
diff --git a/src/views/workCenter/standardConsultationProcess/modules/SelectStandardFileModal.vue b/src/views/workCenter/standardConsultationProcess/modules/SelectStandardFileModal.vue
new file mode 100644
index 00000000..111a2e47
--- /dev/null
+++ b/src/views/workCenter/standardConsultationProcess/modules/SelectStandardFileModal.vue
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+