[update] 企标更改流程和流程中心接口修改

This commit is contained in:
lideqin
2023-10-26 10:39:06 +08:00
parent c2ddd676fd
commit d6ecca66a0
13 changed files with 547 additions and 30 deletions
+1
View File
@@ -162,6 +162,7 @@ module.exports = {
batchReject: '批量驳回',
pleaseSelectDistributeData: '请选择要分发的数据',
deadline: '截止时间',
submitAddAdd: '提交并新增',
// 树右键
treeRight: {
addFolder: 'Create New Folder',
+7
View File
@@ -157,6 +157,13 @@ module.exports = {
relevantFile: '关联文件',
degreeOfBidAcquisition: '采标程度',
adoptInternationalStandardNumber: '采用国际标准号',
revisedOpinionContent: '修改意见内容',
beforeUpdate: '修改前',
afterUpdate: '修改后',
updateReason: '修改理由',
lookUpdateBeforeContent: '查看修改前内容',
proposingDepartment: '提出部门',
introducer: '提出人'
},
// 流程配置
processConfig: {
+7
View File
@@ -157,6 +157,13 @@ module.exports = {
relevantFile: '关联文件',
degreeOfBidAcquisition: '采标程度',
adoptInternationalStandardNumber: '采用国际标准号',
revisedOpinionContent: '修改意见内容',
beforeUpdate: '修改前',
afterUpdate: '修改后',
updateReason: '修改理由',
lookUpdateBeforeContent: '查看修改前内容',
proposingDepartment: '提出部门',
introducer: '提出人'
},
// 流程配置
processConfig: {
+1
View File
@@ -165,6 +165,7 @@ module.exports = {
batchReject: '批量驳回',
pleaseSelectDistributeData: '请选择要分发的数据',
deadline: '截止时间',
submitAddAdd: '提交并新增',
// 树右键
treeRight: {
addFolder: '新增文件夹',
@@ -58,6 +58,7 @@
<!-- 节点3起草人主管级领导审批 -->
<!-- 节点4标准化审批 -->
<!-- 节点5起草人主管级上一级领导审批 -->
<approve-base-info v-else ref="baseInfoRef"></approve-base-info>
<!-- 流程审批信息 -->
<div class="process-part-title" v-if="!onlyLook">{{ $t('processApprovalInformation') }}</div>
@@ -124,6 +125,7 @@ import {
getProcessDataById
} from '@/api/workCenter'
import MainDrafterInitBaseInfo from './modules/MainDrafterInitBaseInfo'
import ApproveBaseInfo from './modules/ApproveBaseInfo'
// 人员信息
const personalInfo = [ // 人员信息的数据
@@ -171,6 +173,7 @@ const personalInfo = [ // 人员信息的数据
export default {
name: 'EnterpriseStandardChangeFlow',
components: {
ApproveBaseInfo,
MainDrafterInitBaseInfo,
InternalDetailPage,
ProcessDetailList,
@@ -450,6 +453,6 @@ export default {
}
</script>
<style scoped>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,170 @@
<template>
<div>
<base-info-form ref="baseInfoForm" :disabled="true"></base-info-form>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading">
<!-- 修改前 -->
<template v-slot:beforeUpdate="{text, record}">
<a-button type="primary" @click="beforeUpdateClick(record)">{{ $t('workCenter.enStandardChange.lookUpdateBeforeContent') }}</a-button>
</template>
</j-table>
</div>
<!-- 标准文本 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
{{ $t('workCenter.enStandardRevision.standardText') }}
</span>
</div>
<a-form-model-item class="item-model">
<div class="online-edit-wrapper">
<!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
</div>
</a-form-model-item>
</div>
</div>
</template>
<script>
import BaseInfoForm from './BaseInfoForm'
import JTable from '@/components/jero/JTable'
export default {
name: 'ApproveBaseInfo',
components: { BaseInfoForm, JTable },
props: {
disabled: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 条款号
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center',
width: 180,
dataIndex: 'clauseNumber',
scopedSlots: { customRender: 'text' }
},
{ // 条款名称
title: this.$t('workCenter.enStandardRevision.clauseName'),
align: 'center',
width: 180,
dataIndex: 'clauseName',
scopedSlots: { customRender: 'text' }
},
{ // 修改意见内容
title: this.$t('workCenter.enStandardChange.revisedOpinionContent'),
children: [
{ // 修改前
title: this.$t('workCenter.enStandardChange.beforeUpdate'),
align: 'center',
width: 180,
dataIndex: 'beforeUpdate',
scopedSlots: { customRender: 'beforeUpdate' }
},
{ // 修改后
title: this.$t('workCenter.enStandardChange.afterUpdate'),
align: 'center',
width: 180,
dataIndex: 'afterUpdate',
scopedSlots: { customRender: 'text' }
},
{ // 修改理由
title: this.$t('workCenter.enStandardChange.updateReason'),
align: 'center',
width: 180,
dataIndex: 'updateReason',
scopedSlots: { customRender: 'text' }
}
]
},
{ // 提出部门
title: this.$t('workCenter.enStandardChange.proposingDepartment'),
align: 'center',
width: 180,
dataIndex: 'proposingDepartment',
scopedSlots: { customRender: 'text' }
},
{ // 提出人
title: this.$t('workCenter.enStandardChange.introducer'),
align: 'center',
width: 180,
dataIndex: 'introducer',
scopedSlots: { customRender: 'text' }
}
],
dataSource: [],
loading: false
}
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.formInline = this.$refs.baseInfoForm.formInline
data.dataSource = this.dataSource
return data
},
// 修改前按钮点击
beforeUpdateClick (record) {
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.online-edit-wrapper {
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
p {
margin-bottom: 0;
height: 100%;
}
.ant-btn {
margin-right: 20px;
}
}
</style>
@@ -1,6 +1,6 @@
<template>
<div>
<base-info-form :disabled="disabled"></base-info-form>
<base-info-form ref="baseInfoForm" :disabled="disabled"></base-info-form>
<!-- 标准文本 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
@@ -36,13 +36,9 @@
:pagination="false"
:loading="loading">
<!-- 企标编号/企标名称 -->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
<!-- 修改前 -->
<template v-slot:beforeUpdate="{text, record}">
<a-button type="primary" @click="beforeUpdateClick(record)">{{ $t('workCenter.enStandardChange.lookUpdateBeforeContent') }}</a-button>
</template>
<!-- 操作栏 -->
@@ -55,17 +51,18 @@
</j-table>
</div>
<comment-modal ref="commentModal" @ok="modalFormOk"></comment-modal>
<update-list-modal ref="updateListModal" @ok="modalFormOk"></update-list-modal>
</div>
</template>
<script>
import BaseInfoForm from './BaseInfoForm'
import CommentModal from '../../enterpriseStandardRevision/modules/CommentModal'
import JTable from '@/components/jero/JTable'
import UpdateListModal from './UpdateListModal'
export default {
name: 'MainDrafterInitBaseInfo',
components: { BaseInfoForm, CommentModal },
components: { BaseInfoForm, JTable, UpdateListModal },
props: {
disabled: {
type: Boolean,
@@ -101,15 +98,29 @@ export default {
scopedSlots: { customRender: 'text' }
},
{ // 修改意见内容
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
title: this.$t('workCenter.enStandardChange.revisedOpinionContent'),
children: [
{ // 修改前
title: this.$t('workCenter.enStandardRevision.clauseName'),
title: this.$t('workCenter.enStandardChange.beforeUpdate'),
align: 'center',
width: 180,
dataIndex: 'clauseName',
dataIndex: 'beforeUpdate',
scopedSlots: { customRender: 'beforeUpdate' }
},
{ // 修改后
title: this.$t('workCenter.enStandardChange.afterUpdate'),
align: 'center',
width: 180,
dataIndex: 'afterUpdate',
scopedSlots: { customRender: 'text' }
},
{ // 修改理由
title: this.$t('workCenter.enStandardChange.updateReason'),
align: 'center',
width: 180,
dataIndex: 'updateReason',
scopedSlots: { customRender: 'text' }
}
]
},
{
@@ -124,25 +135,54 @@ export default {
}
},
methods: {
// 新增征求意见
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
this.data = data
// 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource =
// 给表单赋值
// this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline =
// })
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.formInline = this.$refs.baseInfoForm.formInline
data.dataSource = this.dataSource
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate (callback) {
this.$refs.baseInfoForm.$refs.ruleForm.validate(valid => {
if (valid) {
const data = {}
data.formInline = this.$refs.baseInfoForm.formInline
data.dataSource = this.dataSource
callback(data)
}
})
},
// 新增修改单
handleAdd () {
// 不知道左侧要预览哪个文件
const file = ''
this.$refs.commentModal.title = this.$t('newlyAdded')
this.$refs.commentModal.add(file)
this.$refs.updateListModal.title = this.$t('newlyAdded')
this.$refs.updateListModal.add(file)
},
// 征求意见的编辑
// 修改单的编辑
handleEdit (record, index) {
// 不知道左侧要预览哪个文件
const file = ''
this.$refs.commentModal.title = this.$t('edit')
this.$refs.commentModal.edit(file, record, index)
this.$refs.updateListModal.title = this.$t('edit')
this.$refs.updateListModal.edit(file, record, index)
},
// 征求意见的删除
// 修改单的删除
handleDelete (index) {
this.dataSource.splice(index, 1)
},
// 征求意见新增编辑完成
// 修改单新增编辑完成
modalFormOk (value, index) {
console.log(value, index)
if (index || index === 0) {
@@ -152,11 +192,29 @@ export default {
// 没有下标, 是新增
this.dataSource.push(value)
}
},
// 修改前按钮点击
beforeUpdateClick (record) {
}
}
}
</script>
<style scoped>
<style scoped lang="less">
@import '~@assets/less/common.less';
.online-edit-wrapper {
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
p {
margin-bottom: 0;
height: 100%;
}
.ant-btn {
margin-right: 20px;
}
}
</style>
@@ -0,0 +1,243 @@
<template>
<j-modal
:title="title"
:maskClosable="true"
:width="500"
:closable="true"
@cancel="handleCancel"
fullscreen
:visible="visible">
<div class="content">
<!-- 左侧文件预览 -->
<div class="content-left">
<iframe v-if="iframeSrc" :src="iframeSrc" width="100%" frameborder="0"></iframe>
<a-empty class="empty-file" v-else description="当前文件类型暂不支持预览"></a-empty>
</div>
<!-- 右侧表单区域 -->
<div class="content-right">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<!-- 条款号 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.clauseNumber')">
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.clauseNumber')"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'clauseNumber', validatorRules.clauseNumber ]" />
</a-form-item>
<!-- 条款名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.clauseName')">
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.clauseName')"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'clauseName', validatorRules.clauseName ]" />
</a-form-item>
<!-- 修改意见内容(包括修改理由和依据) -->
<a-form-item :label="$t('workCenter.enStandardRevision.contentOfRevisedOpinion')"></a-form-item>
<!-- 修改后 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardChange.afterUpdate')">
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardChange.afterUpdate')"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'afterUpdate', validatorRules.afterUpdate ]" />
</a-form-item>
<!-- 修改理由 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardChange.updateReason')">
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardChange.updateReason')"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'updateReason', validatorRules.updateReason ]" />
</a-form-item>
</a-form>
</a-spin>
</div>
</div>
<!-- 操作按钮 -->
<template slot="footer">
<a-button :loading="confirmLoading" @click="handleCancel">
{{ $t('cancel') }}
</a-button>
<a-button type="primary" :loading="confirmLoading" @click="handleSubmitAddAdd">
{{ $t('submitAddAdd') }}
</a-button>
<a-button type="primary" :loading="confirmLoading" @click="handleOk">
{{ $t('submit') }}
</a-button>
</template>
</j-modal>
</template>
<script>
import pick from 'lodash.pick'
import { getFileInfo } from '@/api/api'
import { previewPdf } from '@/utils/previewPdf'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
const Base64 = require('js-base64').Base64
export default {
name: 'UpdateListModal',
data () {
return {
title: '',
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 18 }
},
validatorRules: {
// 条款号
clauseNumber: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.clauseNumber') }
],
validateTrigger: 'blur'
},
// 条款名称
clauseName: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.clauseName') }
],
validateTrigger: 'blur'
},
// 修改后
afterUpdate: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardChange.afterUpdate') }
],
validateTrigger: 'blur'
},
// 修改理由
updateReason: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardChange.updateReason') }
],
validateTrigger: 'blur'
}
},
index: undefined, // 编辑的表格的下标
iframeSrc: '' // 左侧预览的路径
}
},
methods: {
add (file) {
this.getFileInfo(file).then(res => {
this.handlePreview(res)
})
this.visible = true
this.form.resetFields()
},
edit (file, record, index) {
this.getFileInfo(file).then(res => {
this.handlePreview(res)
})
this.visible = true
this.index = index
this.form.resetFields()
this.model = Object.assign({}, record)
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'clauseNumber', 'clauseName', 'afterUpdate', 'updateReason'))
})
},
getFileInfo (fileId) {
return new Promise(resolve => {
let fileInfo
getFileInfo({ id: fileId }).then(res => {
if (res.success) {
fileInfo = res.result
}
}).finally(() => {
resolve(fileInfo)
})
})
},
handlePreview (file) {
const fileSuffix = file.fileName ? file.fileName.split('.')[file.fileName.split('.').length - 1].toLowerCase() : ''
if (fileSuffix === 'pdf') {
// pdf预览
const url = previewPdf(file.id)
this.iframeSrc = url
} else if (fileSuffix === 'docx') {
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
// word文件仍使用KKFile进行预览
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
this.iframeSrc = url
}
},
close () {
this.visible = false
this.model = {}
this.index = undefined
this.iframeSrc = ''
},
handleCancel () {
this.close()
},
// 提交并新增
handleSubmitAddAdd () {
if (this.confirmLoading) return
this.form.validateFields((err, values) => {
if (!err) {
this.confirmLoading = true
const param = Object.assign({}, values)
console.log(param)
this.$emit('ok', param, this.index)
this.form.resetFields()
this.model = {}
this.confirmLoading = false
}
})
},
handleOk () {
if (this.confirmLoading) return
this.form.validateFields((err, values) => {
if (!err) {
this.confirmLoading = true
const param = Object.assign({}, values)
console.log(param)
this.$emit('ok', param, this.index)
this.close()
this.confirmLoading = false
}
})
}
}
}
</script>
<style scoped lang="less">
.content {
width: 100%;
height: 100%;
display: flex;
.content-left {
width: 60%;
height: 100%;
overflow-y: scroll;
iframe {
height: calc(100% - 20px) !important;
}
}
.content-right {
width: 40%;
height: 100%;
overflow-y: scroll;
}
}
.empty-file {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
</style>
@@ -6,7 +6,6 @@
:closable="true"
@cancel="handleCancel"
fullscreen
@ok="handleOk"
:visible="visible">
<div class="content">
<!-- 左侧文件预览 -->
@@ -44,6 +43,19 @@
</div>
</div>
<!-- 操作按钮 -->
<template slot="footer">
<a-button :loading="confirmLoading" @click="handleCancel">
{{ $t('cancel') }}
</a-button>
<a-button type="primary" :loading="confirmLoading" @click="handleSubmitAddAdd">
{{ $t('submitAddAdd') }}
</a-button>
<a-button type="primary" :loading="confirmLoading" @click="handleOk">
{{ $t('submit') }}
</a-button>
</template>
</j-modal>
</template>
@@ -154,6 +166,21 @@ export default {
handleCancel () {
this.close()
},
// 提交并新增
handleSubmitAddAdd () {
if (this.confirmLoading) return
this.form.validateFields((err, values) => {
if (!err) {
this.confirmLoading = true
const param = Object.assign({}, values)
console.log(param)
this.$emit('ok', param, this.index)
this.form.resetFields()
this.model = {}
this.confirmLoading = false
}
})
},
handleOk () {
if (this.confirmLoading) return
this.form.validateFields((err, values) => {
@@ -142,7 +142,7 @@ export default {
}
],
url: {
list: '/process/center/doneTaskList'
list: '/workCenter/getCompletedList'
}
}
},
@@ -103,7 +103,7 @@ export default {
}
],
url: {
list: '/process/center/draftList'
list: '/workCenter/getDraftList'
}
}
},
@@ -162,7 +162,7 @@ export default {
}
],
url: {
list: '/process/center/sendTaskList'
list: '/workCenter/getSentList'
}
}
},
@@ -129,7 +129,7 @@ export default {
}
],
url: {
list: '/process/center/todoTaskList'
list: '/workCenter/getTodoList'
},
currentTurnTo: {} // 当前转办
}