[update] 修改企标制修订流程

This commit is contained in:
lideqin
2024-01-03 18:36:41 +08:00
parent a1e2403095
commit d0e22cd06b
15 changed files with 1104 additions and 35 deletions
+5
View File
@@ -43,6 +43,9 @@ const getPersonInfoList = (params) => getAction('/activiti/getNodeList', params)
// 获取标准左侧树列表(标准体系)
const getTreeList = (params) => getAction('/laws/standard/lawsTreeNode/enterprise', params)
// 内部工作组,左侧树查询
const getWorkGroupTreeList = (params) => getAction('/sys/lawsWorkingGroup/list', params)
// 标准入库/变更流程------------
// 国内法规标准-获取表单模型
const getDomesticStandardFormModal = (params) => getAction('/laws/standard/domestic/getFormModel', params)
@@ -263,6 +266,8 @@ export {
getPersonInfoList,
getTreeList,
getWorkGroupTreeList,
getDomesticStandardFormModal,
getOverseasStandardForm,
queryStandardECProcessData,
+20
View File
@@ -127,4 +127,24 @@
/* ant表单样式 */
.ant-form-item {
font-size: 0.24rem;
}
// 所有的form表单下 required 必填项 前面加红字提示
.required {
/deep/ .van-cell__title {
span {
display: inline-block;
line-height: 100%;
vertical-align: middle;
}
span::before{
content: '*';
display: inline-block;
height: 100%;
line-height: 100%;
vertical-align: middle;
margin-right: 0.12rem;
color: #E63636;
}
}
}
+8 -1
View File
@@ -46,6 +46,7 @@ module.exports = {
no: '否',
standardText: '标准文本',
look: '查看',
pleaseEnterPersonnelInfo: '请完整填写人员信息',
// 标准法规入库/变更流程
standardEntryOrChange: {
source: '来源',
@@ -142,7 +143,13 @@ module.exports = {
good: '优良',
excellent: '优秀',
grade: '评分',
groundsForDemerit: '扣分理由'
groundsForDemerit: '扣分理由',
pleaseEnterAllMarkItem: '请填写所有评分项',
isOpenComment: '是否开启征求意见',
departmentalLiaison: '部门联络人',
deadlineForComments: '征求意见截止日期',
workingGroup: '工作组',
deadlineNeedGreaterThan: '征求意见截止日期需要比征求意见稿计划完成日期早'
},
// 企标复审流程
esRecheck: {
+54 -4
View File
@@ -32,7 +32,17 @@
<van-icon class="iconfont" class-prefix="icon" name="circle" />
</template>
<h3>{{ item.nodeName }}</h3>
<p>{{ item.linkUserIds_dictText }}</p>
<p v-if="!item.canChoose">{{ item.linkUserIds_dictText }}</p>
<div v-else>
<select-user-field v-if="item.chooseSource === 'user'"
class="no-label"
v-model="item.linkUserIds"
:type="item.chooseType"
:checkedNames="item.linkUserIds_dictText"
:fieldName="item.variableName"
@selectNameChange="nameChange"
input-type="textarea" />
</div>
</van-step>
</van-steps>
</div>
@@ -48,9 +58,11 @@
<script>
import { getPersonInfoList } from '@/api/api'
import SelectUserField from '@/components/SelectUserField'
export default {
name: 'ProcessCommonLayout',
components: { SelectUserField },
props: {
// 加载效果
loading: {
@@ -63,6 +75,14 @@ export default {
type: String,
required: false,
default: ''
},
// 人员信息可以修改的字段
canChooseFields: {
type: Array,
required: false,
default: () => {
return []
}
}
},
data () {
@@ -96,7 +116,24 @@ export default {
if (res.success) {
console.log(res.result)
// 处理人员信息数据,判断每个节点是否能选人
this.personnelInfoData = res.result
this.personnelInfoData = res.result.map(item => {
return {
...item,
canChoose: this.canChooseFields.includes(item.variableName),
chooseType: item.variableType === 'string' ? 'radio' : 'checkbox'
}
})
}
})
},
// 从草稿进来填过的人员需要回显
draftInitPersonInfo (personInfoObj) {
this.personnelInfoData = this.personnelInfoData.map(item => {
return {
...item,
linkUserIds: personInfoObj[item.variableName] || item.linkUserIds,
linkUserIds_dictText: personInfoObj[item.variableName + '_dictText'],
userList: personInfoObj[item.variableName + '_dictText']
}
})
},
@@ -105,10 +142,12 @@ export default {
const personnelObj = {}
for (const item of this.personnelInfoData) {
// 该属性还没有人就给他赋值
if ((item.canChoose || item.sort === 1) && !personnelObj[item.variableName]) {
if (!personnelObj[item.variableName]) {
personnelObj[item.variableName] = item.linkUserIds
personnelObj[item.variableName + '_dictText'] = item.linkUserIds_dictText || item.userList
}
}
console.log(personnelObj)
return personnelObj
},
// 有校验的获取人员对象
@@ -116,7 +155,7 @@ export default {
let personnelObj = {}
for (const item of this.personnelInfoData) {
// 该属性还没有人就给他赋值
if ((item.canChoose || item.sort === 1) && !personnelObj[item.variableName]) {
if (item.canChoose && !personnelObj[item.variableName]) {
personnelObj[item.variableName] = item.linkUserIds
}
}
@@ -125,6 +164,11 @@ export default {
personnelObj = false
}
return personnelObj
},
nameChange (value, fieldName) {
console.log(value, fieldName)
this.personnelInfoData.find(item => item.variableName === fieldName).linkUserIds_dictText = value
this.personnelInfoData.find(item => item.variableName === fieldName).userList = value
}
}
}
@@ -230,4 +274,10 @@ export default {
display: none;
}
}
.no-label {
/deep/ .van-cell__title {
display: none;
}
}
</style>
+455
View File
@@ -0,0 +1,455 @@
<template>
<van-popup class="history-list-popup" v-model="isShow" position="right" :style="{ width: '100%', height: '100%' }">
<!-- 增加一个标题-->
<custom-header :title="$t('selectUser')" :leftArrow="true" :handle-left="handleLeft"></custom-header>
<div class="list-container">
<van-search
v-model="realnameOrUsername"
show-action
input-align="center"
placeholder="请输入姓名/工号"
@search="onSearch">
<template #action>
<div @click="onSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu :close-on-click-overlay="false" :close-on-click-outside="false">
<!-- 内部工作组 -->
<van-dropdown-item :title="selectedWorkGroup" ref="workGroupDropdownItem">
<van-cascader
v-model="workingGroupId"
title="请选择内部工作组"
:options="workGroupList"
:closeable="false"
:show-header="false"
:field-names="{text: 'name', value: 'id', children: 'subset'}"
@change="handleWorkGroupChange" />
<div class="dropdown-operate-box">
<van-button @click="handleClearDepart" class="dropdown-confirm-btn" type="primary" round plain size="small">清空</van-button>
<van-button @click="handleConfirmDepart" class="dropdown-confirm-btn" type="primary" round size="small">确定</van-button>
</div>
</van-dropdown-item>
<!--角色-->
<van-dropdown-item :title="selectedRole" ref="roleDropdownItem">
<van-picker
ref="rolePicker"
show-toolbar
toolbar-position="bottom"
:columns="rolesList"
@confirm="handleConfirmRole"
@cancel="handleCancelRole">
<template v-slot:default>
<div class="dropdown-operate-box">
<van-button @click="handleClearRole" class="dropdown-confirm-btn" type="primary" round plain size="small">清空
</van-button>
<van-button @click="confirmRole" class="dropdown-confirm-btn" type="primary" round size="small">确定</van-button>
</div>
</template>
</van-picker>
</van-dropdown-item>
</van-dropdown-menu>
<van-list
v-model="loading"
:finished="listFinished"
:finished-text="listData.length > 0 ? '没有更多了' : '暂无数据'"
@load="onLoadMore"
:immediate-check="false">
<van-checkbox-group v-if="type === 'checkbox'" v-model="checkedArr" ref="checkboxGroup">
<van-swipe-cell
v-for="(item, index) in listData"
:key="index"
:name="index"
stop-propagation
:before-close="handleBeforeClose">
<div class="item-box">
<van-checkbox :name="item.id" @click="checkboxClick(item)" shape="square" :disabled="readonly"></van-checkbox>
<div class="item-container">
<div class="item-title">
{{ item.realname }}({{ item.username }})
</div>
<div class="item-content">
<div class="item-content-item">
<span class="label">角色:</span>
<span class="text">{{ item.userRoleName }}</span>
</div>
<div class="item-content-item">
<span class="label">岗位:</span>
<span class="text">{{ item.userPostName }}</span>
</div>
</div>
</div>
</div>
</van-swipe-cell>
</van-checkbox-group>
<van-radio-group v-else v-model="checkedArr" ref="checkboxGroup">
<van-swipe-cell
v-for="(item, index) in listData"
:key="index"
:name="index"
stop-propagation
:before-close="handleBeforeClose">
<div class="item-box">
<van-radio :name="item.id" @click="checkboxClick(item)" :disabled="readonly"></van-radio>
<div class="item-container">
<div class="item-title">
{{ item.realname }}({{ item.username }})
</div>
<div class="item-content">
<div class="item-content-item">
<span class="label">角色:</span>
<span class="text">{{ item.userRoleName }}</span>
</div>
<div class="item-content-item">
<span class="label">岗位:</span>
<span class="text">{{ item.userPostName }}</span>
</div>
</div>
</div>
</div>
</van-swipe-cell>
</van-radio-group>
</van-list>
<!-- 底部的按钮 -->
<div class="bottom-button-container">
<div class="bottom-btn bottom-justify-div">
<van-button size="small" color="#C6C7CA" native-type="button" plain :disabled="disabled" @click="resetFunc">重置
</van-button>
<van-button v-if="type === 'checkbox'" size="small" color="#E63636" native-type="button" :disabled="disabled" @click="checkAll">
全选
</van-button>
<van-button size="small" color="#E63636" native-type="button" :disabled="disabled" @click="confirmFunc()">确定
</van-button>
<van-button size="small" color="#C6C7CA" native-type="button" plain :disabled="disabled" @click="hide()">取消
</van-button>
</div>
</div>
</div>
</van-popup>
</template>
<script>
import CustomHeader from '@/components/CustomHeader'
import ListMixin from '@/mixins/ListMixin'
import { getWorkGroupTreeList, queryAllRole } from '@/api/api'
export default {
name: 'SelectUserByWorkGroup',
components: { CustomHeader },
mixins: [ListMixin],
props: {
selectedData: {
type: String,
required: false,
default: () => {
return ''
}
},
// 一些其他的查询参数
filterData: {
type: Object,
required: false,
default: () => {
return {}
}
},
readonly: {
type: Boolean,
required: false,
default: false
},
type: {
type: String,
required: false,
default: 'radio'
}
},
data () {
return {
realname: '', // 搜索框数据
realnameOrUsername: null, // 搜索框数据(姓名和工号一起搜索改的)
isShow: false,
loading: false, // 加载数据的标识,
listFinished: false, // 完成加载的标识
refreshing: false, // 下拉刷新的标志
listData: [], // 列表页的数据
listCount: 0, // 所有数据的数量
/* 分页的配置 */
ipagination: {
pageNo: 1,
pageSize: 10
},
url: {
list: '/act/user/workGroupPage'
},
checkedArr: [],
selectedDataArr: [],
selectedWorkGroup: '内部工作组', // 回显在页面上的选中部门的名字
selectedRole: '角色', // 回显在页面上的选中角色的名字
workGroupList: [], // 内部工作组数据
workingGroupId: null, // 查询时候传给后端的参数
tempSelectedWorkGroup: {}, // change的时候记录一下选中的内部工作组
rolesList: [], // 角色下拉框
roleName: null // 查询时候传给后端的参数
}
},
computed: {
disabled () {
return this.listData.length === 0 || this.readonly
}
},
methods: {
open () {
this.isShow = true
this.initData()
this.getListData()
this.getWorkGroup()
this.initRoleList()
},
checkboxClick (item) {
console.log(item)
if (this.type === 'checkbox') {
if (this.checkedArr.includes(item.id)) {
console.log('------------增加了数据------------')
// 说明是增加了数据,为了顺序和列表顺序保持一致,用循环设置
const arr = []
for (const i of this.listData) {
if (this.checkedArr.includes(i.id)) {
arr.push(i)
}
}
this.selectedDataArr = arr
} else {
console.log('------------删除了数据------------')
// 说明是删除了数据
this.selectedDataArr = this.selectedDataArr.filter(i => i.id !== item.id)
}
} else {
this.selectedDataArr = [item]
}
console.log(this.selectedDataArr)
},
handleCheckedArr () {
// 清空选中的数据
if (this.type === 'checkbox') {
if (this.selectedData) {
this.checkedArr = this.selectedData.split(',')
} else {
this.checkedArr = []
}
} else {
if (this.selectedData) {
this.checkedArr = this.selectedData
} else {
this.checkedArr = ''
}
}
},
// 初始化数据
initData () {
this.ipagination.pageNo = 1
this.listData = []
this.listFinished = false
this.refreshing = false
this.loading = true
this.handleCheckedArr()
},
// 重置按钮点击的方法
resetFunc () {
this.checkedArr = []
},
checkAll () {
this.$refs.checkboxGroup.toggleAll(true)
this.selectedDataArr = [...this.listData]
},
// 确定 按钮触发的方法
confirmFunc () {
console.log(this.checkedArr)
// 先判断是否选择数据,没有提示
if ((this.type === 'checkbox' && this.checkedArr.length === 0) || (this.type === 'radio' && (!this.checkedArr || this.checkedArr.length === 0))) {
this.$message('请至少选择一条数据')
return
}
if (this.type === 'checkbox') {
this.$emit('selected-change', this.checkedArr.join(','))
} else {
this.$emit('selected-change', this.checkedArr)
}
this.$emit('selected-change-name', this.selectedDataArr.map(item => item.realname + '(' + item.username + ')').join(','))
this.hide()
},
onSearch () {
if (this.realname) {
this.filters.realname = this.realname
} else {
this.filters.realname = null
}
this.filters.realnameOrUsername = this.realnameOrUsername || null
this.filters.workingGroupId = this.workingGroupId
this.filters.userRoleName = this.roleName
this.ipagination.pageNo = 1
this.getListData()
},
handleLeft () {
this.hide()
},
hide () {
this.isShow = false
},
// 获取内部工作组
getWorkGroup () {
getWorkGroupTreeList().then((res) => {
if (res.success) {
this.workGroupList = res.result
} else {
this.workGroupList = []
}
})
},
handleWorkGroupChange ({ value, selectedOptions }) {
this.tempSelectedWorkGroup = selectedOptions.find(tt => tt.id === value) || {}
console.log(this.tempSelectedWorkGroup)
},
handleConfirmDepart () {
this.$refs.workGroupDropdownItem.toggle()
this.selectedWorkGroup = this.tempSelectedWorkGroup.name
},
handleClearDepart () {
this.$refs.workGroupDropdownItem.toggle()
this.selectedWorkGroup = '组织机构'
this.tempSelectedWorkGroup = {}
this.workingGroupId = null
},
// 初始化角色字典
initRoleList () {
queryAllRole().then((res) => {
if (res.success) {
this.rolesList = res.result.map((item) => {
return { text: item.roleName, value: item.id }
})
}
})
},
confirmRole () {
this.$refs.rolePicker.confirm()
},
handleClearRole () {
this.$refs.roleDropdownItem.toggle()
this.selectedRole = '角色'
this.roleName = null
},
handleConfirmRole (value) {
this.$refs.roleDropdownItem.toggle()
this.roleName = value.text
this.selectedRole = value.text
},
handleCancelRole () {
this.$refs.roleDropdownItem.toggle()
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/list.less';
@import '~@assets/less/common.less';
.history-list-popup {
background: @global-bg;
display: flex;
flex-direction: column;
}
.list-container {
flex: 1;
display: flex;
flex-direction: column;
height: 0;
}
.van-list {
padding: @pad-base;
flex: 1;
overflow: auto;
}
// 中间内容
.item-box {
background: #FFFFFF;
padding: 0.24rem;
display: flex;
align-items: center;
border-bottom: 1px solid #C9CDD4;
border-radius: 0;
.van-checkbox {
display: block;
margin: 0 20px 0 0;
}
.van-radio {
display: block;
margin: 0 20px 0 0;
}
/deep/ .van-checkbox__icon--checked {
.van-icon {
background: @primary-color;
border-color: @primary-color;
}
}
/deep/ .van-radio__icon--checked {
.van-icon {
background: @primary-color;
border-color: @primary-color;
}
}
}
.item-container {
flex: 1;
}
// 底部按钮
.bottom-button-container {
height: 1.28rem;
line-height: 1.28rem;
padding: 0 0.2rem;
background: #FFFFFF;
}
.bottom-justify-div {
height: 100%;
display: flex;
align-items: center;
justify-content: space-around;
gap: 0.2rem;
.van-button {
height: 0.8rem;
flex: 1;
}
/deep/ .van-button--plain {
color: #898989 !important;
}
}
.dropdown-operate-box {
width: 100%;
display: flex;
padding: 0.24rem;
justify-content: space-between;
}
.dropdown-confirm-btn {
width: calc(50% - 0.12rem);
}
/deep/ .van-picker__toolbar {
height: auto;
}
</style>
@@ -0,0 +1,125 @@
<template>
<div>
<van-field
v-model="selectedDataNames"
:label="label"
:placeholder="$t('pleaseSelect') + label"
readonly
rows="1"
autosize
:rules="rules"
type="textarea"
@click="handleSelect"
>
</van-field>
<select-user-by-work-group
ref="evaluatePersonSelectedList"
:selected-data="value"
:filter-data="filterData"
@selected-change="selectedChange"
@selected-change-name="selectedChangeName"
v-bind="$attrs"
:readonly="readonly"
></select-user-by-work-group>
</div>
</template>
<script>
import SelectUserByWorkGroup from '@/components/SelectUserByWorkGroup'
export default {
name: 'SelectUserByWorkGroupField',
components: { SelectUserByWorkGroup },
props: {
// 选中的多个id 以逗号“,”拼接
value: {
type: String,
required: true,
default: () => {
return ''
}
},
// 一些其他的查询参数
filterData: {
type: Object,
required: false,
default: () => {
return {}
}
},
readonly: {
type: Boolean,
required: false,
default: false
},
checkedNames: {
type: String,
required: false,
default: () => {
return ''
}
},
label: {
type: String,
required: false,
default: '人员'
},
fieldName: {
type: String,
required: false,
default: ''
},
// 校验信息
rules: {
type: [Array, null],
required: false,
default: null
}
},
watch: {
checkedNames: {
immediate: true,
// deep: true,
handler (val) {
this.selectedDataNames = val
}
},
rules: {
immediate: true,
handler (val) {
console.log(val)
}
}
},
data () {
return {
selectedDataNames: ''
}
},
methods: {
handleSelect () {
if (this.readonly) {
return
}
this.$nextTick(() => {
this.$refs.evaluatePersonSelectedList.open()
})
},
// 选择人员组件 选择后返回的方法
selectedChange (value) {
this.$emit('select', value)
},
selectedChangeName (value) {
this.selectedDataNames = value
this.$emit('selectNameChange', value, this.fieldName)
}
},
model: {
prop: 'value',
event: 'select'
}
}
</script>
<style scoped>
</style>
+3 -3
View File
@@ -3,7 +3,7 @@
<van-field
v-model="selectedDataNames"
:label="label"
:placeholder="$t('pleaseSelect') + label"
:placeholder="$t('pleaseSelect') + (label ? label : '')"
readonly
rows="1"
autosize
@@ -59,7 +59,7 @@ export default {
}
},
label: {
type: String,
type: [String, Boolean],
required: false,
default: '人员'
},
@@ -80,7 +80,7 @@ export default {
immediate: true,
// deep: true,
handler (val) {
this.selectedDataNames = val
this.selectedDataNames = val || ''
}
},
rules: {
+9 -9
View File
@@ -144,20 +144,20 @@ export const EsRevisionNodes = new EsEnums({
mainDrafterSend: { text: '主起草人起草分发', value: 'Activity_0v98tow' },
otherDrafterUploadStandard: { text: '其他起草人上传企标', value: 'Activity_1d2la4l' },
mainDrafterAllUploadMinute: { text: '主起草人汇总上传会议纪要', value: 'Activity_1dz3u0m' },
standardizationAudit: { text: '标准化审核', value: 'Activity_0m576ex' },
scorerMark: { text: '评分人打分', value: 'Activity_1qhpnpa' },
standardizationConfirmIsStartAdvice: { text: '标准化确认是否开启征求意见', value: 'Activity_1siuksf' },
contactSend: { text: '部所联络人下发', value: 'Activity_1ns6olf' },
standardizationAudit: { text: '标准化审核', value: 'Activity_0m576ex', isMobile: true },
scorerMark: { text: '评分人打分', value: 'Activity_1qhpnpa', isMobile: true },
standardizationConfirmIsStartAdvice: { text: '标准化确认是否开启征求意见', value: 'Activity_1siuksf', isMobile: true },
contactSend: { text: '部所联络人下发', value: 'Activity_1ns6olf', isMobile: true },
takeAdviceObjectEnterAdvice: { text: '征求意见对象填写意见', value: 'Activity_04m430n' },
contactAll: { text: '部所联络人汇总数据', value: 'Activity_1riqzkp' },
contactLeaderApproval: { text: '部门联络人主管级领导审批', value: 'Activity_1ralk8e' },
mainDrafterAll: { text: '主起草人汇总', value: 'Activity_1hb9aun' },
mainDrafterUploadMinute: { text: '主起草人上传会议纪要', value: 'Activity_11uuyg0' },
otherDrafterProofread: { text: '其他起草人校对', value: 'Activity_1seways' },
leaderApproval: { text: '主管级领导审批', value: 'Activity_1l028rz' },
standardizationApproval: { text: '标准化审批', value: 'Activity_0uxua0b' },
relatedDeptLeaderCountersign: { text: '相关部门领导会签', value: 'Activity_05pybsc' },
allEngineerApproval: { text: '总工程师审批', value: 'Activity_1yr56ac' },
otherDrafterProofread: { text: '其他起草人校对', value: 'Activity_1seways', isMobile: true },
leaderApproval: { text: '主管级领导审批', value: 'Activity_1l028rz', isMobile: true },
standardizationApproval: { text: '标准化审批', value: 'Activity_0uxua0b', isMobile: true },
relatedDeptLeaderCountersign: { text: '相关部门领导会签', value: 'Activity_05pybsc', isMobile: true },
allEngineerApproval: { text: '总工程师审批', value: 'Activity_1yr56ac', isMobile: true },
mainDrafterPublish: { text: '主起草人发布', value: 'Activity_0n0h60s' }
})
@@ -1,5 +1,10 @@
<template>
<process-common-layout ref="processCommonLayout" class="page-box" :processKey="ProcessKey.ES_EDIT.value" :loading="loading">
<process-common-layout
ref="processCommonLayout"
class="page-box"
:processKey="ProcessKey.ES_EDIT.value"
:canChooseFields="personInfoCanChooseFields"
:loading="loading">
<template v-slot:process>
<!-- 流程信息 -->
<div class="process-part">
@@ -52,12 +57,24 @@
ref="baseInfoRef"
></scorer-mark-base-info>
<!-- 6标准化确认是否开启征求意见 -->
<confirm-whether-comment-base-info
v-if="currentNode === 6"
ref="baseInfoRef"
></confirm-whether-comment-base-info>
<!-- 7部所联络人下发 -->
<depart-liaison-issue-base-info
v-if="currentNode === 7"
ref="baseInfoRef"
></depart-liaison-issue-base-info>
<!-- 13其他起草人校对 -->
<!-- 14主管级领导审批 -->
<!-- 15标准化审批 -->
<!-- 16相关部门领导会签 -->
<!-- 17总工程师审批 -->
<only-online-edit-base-info
v-else
ref="baseInfoRef"
></only-online-edit-base-info>
<!-- 流程审批信息 -->
<div class="process-part">
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -134,7 +151,7 @@ import SelectUser from '@/components/SelectUser'
import CalendarField from '@/components/CalendarField'
import StandardizationCheckBaseInfo
from '@/views/workCenter/enterpriseStandardRevision/module/StandardizationCheckBaseInfo'
import { EsRevisionNodes, ProcessKey } from '@/enums/commonEnums'
import {EsInitChangeNodes, EsRevisionNodes, ProcessKey} from '@/enums/commonEnums'
import {
enStandardEditSave,
enStandardEditTurnTo,
@@ -143,16 +160,29 @@ import {
enStandardEditGetDataById
} from '@/api/api'
import ScorerMarkBaseInfo from "@/views/workCenter/enterpriseStandardRevision/module/ScorerMarkBaseInfo";
import ConfirmWhetherCommentBaseInfo
from "@/views/workCenter/enterpriseStandardRevision/module/ConfirmWhetherCommentBaseInfo";
import DepartLiaisonIssueBaseInfo
from "@/views/workCenter/enterpriseStandardRevision/module/DepartLiaisonIssueBaseInfo";
import OnlyOnlineEditBaseInfo from "@/views/workCenter/enterpriseStandardRevision/module/OnlyOnlineEditBaseInfo";
export default {
name: 'EnterpriseStandardRevision',
components: {
OnlyOnlineEditBaseInfo,
DepartLiaisonIssueBaseInfo,
ConfirmWhetherCommentBaseInfo,
ScorerMarkBaseInfo,
StandardizationCheckBaseInfo,
ProcessCommonLayout,
SelectUser,
CalendarField
},
computed: {
personInfoCanChooseFields () {
return this.currentNode === 7 ? ['adviceUserList'] : []
}
},
mounted () {
// 初始化节点
const nodeId = this.$route.query.nodeId
@@ -245,7 +275,25 @@ export default {
enStandardEditGetDataById(this.$route.query.taskId).then(res => {
if (res.success) {
const result = res.result
this.processInfoForm = result.common
// 有草稿json按草稿进来的回显
if (result.infoJsonStr) {
// 初始化流程信息
const prcObj = Object.assign({}, result)
prcObj.dueTime = result.processDueDate
prcObj.prcMes = result.processDescription
// 初始化流程审批信息
prcObj.commitText = result.handleText
prcObj.commitFile = result.handleFile
this.processInfoForm = Object.assign({}, prcObj)
result.data = JSON.parse(result.infoJsonStr).data
// 如果是节点1的保存回显人员信息
if (this.currentNode === 7) {
this.$refs.processCommonLayout.draftInitPersonInfo(JSON.parse(result.infoJsonStr).personnelObj)
}
console.log(result.data)
} else {
this.processInfoForm = result.common
}
this.baseInfoForm = result.data
this.$nextTick(() => {
this.$refs.baseInfoRef.initData(this.baseInfoForm)
@@ -299,6 +347,7 @@ export default {
// 保存
handleSave () {
if (this.loading) return
const personnelObj = this.$refs.processCommonLayout.getDataObj()
// 需要传给后端的
const paramObj = {}
// 流程信息
@@ -326,7 +375,7 @@ export default {
// 业务基本信息和人员信息
paramObj.infoJsonStr = JSON.stringify({
data: Object.assign({}, baseInfo),
// personnelObj: personnelObj
personnelObj: personnelObj
})
}
} else {
@@ -433,17 +482,17 @@ export default {
let personnelObj = {}
if (this.currentNode === 7) {
// 说明是部所联络人下发节点,需要传人员信息
personnelObj = this.$refs.personnelInfo.getDataObjVerify()
personnelObj = this.$refs.processCommonLayout.getDataObjVerify()
if (!personnelObj) {
this.activeTab = 'person'
this.$refs.processCommonLayout.activeTab = 'person'
return
}
}
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
this.$refs.processForm.validate().then(async () => {
const data = await this.$refs.baseInfoRef.getDataValidate()
if (!approvalErr && data) {
if (data) {
const param = {} // 需要传给后端的数据
param.common = Object.assign({}, approvalValues)
param.common = Object.assign({}, this.processInfoForm)
param.common.taskId = this.$route.query.taskId
param.data = data
if (this.currentNode === 7) {
@@ -461,13 +510,21 @@ export default {
this.loading = false
})
} else {
this.activeTab = 'basic'
this.$refs.processCommonLayout.activeTab = 'basic'
}
})
},
goBack () {
this.$router.go(-1)
}
},
// 组件内路由拦截
beforeRouteEnter (to, from, next) {
// 如果不是移动端支持的节点,就跳转NoMobile
if (!EsRevisionNodes.propertyOfValue('isMobile', to.query.nodeId)) {
next({ path: '/noMobile' })
}
next()
}
}
</script>
@@ -93,6 +93,9 @@ export default {
initData (data) {
this.formInline = JSON.parse(data.businessJson)
},
getData () {
return Object.assign({}, this.formInline)
},
// 获取部门列表数据
initDepartmentList () {
getDepartmentList().then(res => {
@@ -0,0 +1,111 @@
<template>
<div>
<base-info-form ref="baseInfoForm"></base-info-form>
<van-form
ref="baseInfoFormRef"
input-align="right"
error-message-align="right"
:readonly="readonly"
>
<!-- 是否开启征求意见 -->
<picker-field
:rules="baseInfoRule.adviceFlag"
:label="$t('enStandardRevision.isOpenComment')"
:placeholder="$t('pleaseSelect') + $t('enStandardRevision.isOpenComment')"
:columnData="isColumnData"
v-model="formInline.adviceFlag" />
<!-- 部门联络人 -->
<select-user-field
:rules="baseInfoRule.contactUser"
:label="$t('enStandardRevision.departmentalLiaison')"
v-model="formInline.contactUser"
fieldName="contactUser"
@selectNameChange="userNameChange"
:checkedNames="formInline.contactUser_dictText"
type="checkbox"
/>
</van-form>
</div>
</template>
<script>
import BaseInfoForm from './BaseInfoForm'
import PickerField from '@/components/PickerField'
import SelectUserField from '@/components/SelectUserField'
export default {
name: 'ConfirmWhetherCommentBaseInfo',
components: { BaseInfoForm, PickerField, SelectUserField },
data () {
return {
readonly: false,
// 是否可进行评审会下拉数据
isColumnData: [
{ name: this.$t('yes'), value: '1', text: this.$t('yes') },
{ name: this.$t('no'), value: '0', text: this.$t('no') }
],
baseInfoRule: {
// 部门联络人
contactUser: [
{
required: true,
message: this.$t('pleaseSelect') + this.$t('enStandardRevision.departmentalLiaison'),
trigger: 'change'
}
]
},
formInline: {}
}
},
watch: {
// 是否开启征求意见
'formInline.adviceFlag': {
handler (val) {
if (val && val === '1') {
// 开启征求意见,部门联络人必填
this.rules.contactUser[0].required = true
} else {
this.rules.contactUser[0].required = false
}
}
}
},
methods: {
initData (data) {
this.formInline = Object.assign({}, data)
if (!this.formInline.adviceFlag) {
this.formInline.adviceFlag = '1'
}
// 给表单赋值
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
console.log(this.formInline)
// 把数据抛出,在线编辑不知道要不要抛
const data = Object.assign({}, this.formInline)
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
async getDataValidate () {
let data = {} // 要返回的数据
await this.$refs.baseInfoFormRef.validate().then(() => {
data = Object.assign({}, this.formInline)
}).catch((errorInfo) => {
data = false
console.log(errorInfo)
})
return data
},
userNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,114 @@
<template>
<div>
<base-info-form ref="baseInfoForm"></base-info-form>
<van-form
ref="baseInfoFormRef"
input-align="right"
error-message-align="right"
:readonly="readonly"
>
<!-- 征求意见截止日期 -->
<calendar-field
:rules="baseInfoRule.adviceDeadline"
:placeholder="$t('pleaseSelect') + $t('enStandardRevision.deadlineForComments')"
:label="$t('enStandardRevision.deadlineForComments')"
v-model="formInline.adviceDeadline"
type="date"
/>
<!-- 工作组 -->
<select-user-by-work-group-field
:rules="baseInfoRule.workGroup"
:label="$t('enStandardRevision.workingGroup')"
v-model="formInline.workGroup"
fieldName="workGroup"
@selectNameChange="userNameChange"
:checkedNames="formInline.workGroup_dictText"
type="checkbox"
/>
</van-form>
</div>
</template>
<script>
import BaseInfoForm from './BaseInfoForm'
import CalendarField from '@/components/CalendarField'
import SelectUserByWorkGroupField from '@/components/SelectUserByWorkGroupField'
export default {
name: 'DepartLiaisonIssueBaseInfo',
components: {
SelectUserByWorkGroupField,
BaseInfoForm,
CalendarField
},
data () {
return {
readonly: false,
baseInfoRule: {
// 征求意见截止日期
adviceDeadline: [
{
required: true,
message: this.$t('pleaseSelect') + this.$t('enStandardRevision.deadlineForComments')
}
],
// 工作组
workGroup: [
{
required: true,
message: this.$t('pleaseSelect') + this.$t('enStandardRevision.workingGroup')
}
]
},
formInline: {}
}
},
methods: {
initData (data) {
this.formInline = Object.assign({}, data)
// 给表单赋值
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = Object.assign({}, this.formInline)
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
async getDataValidate () {
let data = {} // 要返回的数据
await this.$refs.baseInfoFormRef.validate().then(() => {
console.log(JSON.parse(this.formInline.businessJson).solicitationDraftPlanCompleteDate)
// 有征求意见稿计划完成日期和征求意见截止日期,需要征求意见截止日期比计划完成日期早
if (JSON.parse(this.formInline.businessJson).solicitationDraftPlanCompleteDate && this.formInline.adviceDeadline) {
const planDate = new Date(Date.parse(JSON.parse(this.formInline.businessJson).solicitationDraftPlanCompleteDate))
const deadlineDate = new Date(Date.parse(this.formInline.adviceDeadline))
if (deadlineDate < planDate) {
// 截止日期比完成日期早
data = Object.assign({}, this.formInline)
} else {
this.$message(this.$t('enStandardRevision.deadlineNeedGreaterThan'))
data = false
}
} else {
data = Object.assign({}, this.formInline)
}
}).catch((errorInfo) => {
data = false
console.log(errorInfo)
})
return data
},
userNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,48 @@
<template>
<div>
<!-- 业务基本信息 -->
<base-info-form ref="baseInfoForm"></base-info-form>
<!-- 标准文本 -->
<div class="process-part process-right-box">
<div class="process-part-title">{{ $t('standardText') }}</div>
<van-button plain color="#E63636">{{ $t('look') }}</van-button>
</div>
</div>
</template>
<script>
import BaseInfoForm from './BaseInfoForm'
export default {
name: 'OnlyOnlineEditBaseInfo',
components: { BaseInfoForm },
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表单赋值
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
})
},
getData () {
const data = {}
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
return data
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.process-right-box {
display: flex;
justify-content: space-between;
align-items: center;
/deep/ .van-button {
width: 1.22rem;
height: 0.57rem;
margin: 0 0.32rem 0.24rem 0;
font-size: 0.28rem;
}
}
</style>
@@ -18,6 +18,7 @@
<a-table :columns="columns" :dataSource="item.scoreRange" :pagination="false"></a-table>
<!-- 评分 -->
<van-field :label="$t('enStandardRevision.grade')"
class="required rate-label"
type="textarea"
autosize
readonly
@@ -28,6 +29,10 @@
<van-stepper
:rules="[{required: true}]"
v-model="item.evaluateScore"
:min="item.min"
:max="item.max"
default-value="0"
integer
/>
</template>
</van-field>
@@ -42,7 +47,7 @@
:placeholder="$t('pleaseEnter')"
:border="false"
input-align="left"
class="vertical-form-item"/>
class="vertical-form-item required rate-label"/>
</div>
</div>
</template>
@@ -58,7 +63,9 @@ const fixDataSourse = [
'发布日期、生效日期、引用文件章节、图表等内容是否齐全、准确、清晰。',
scoreRange: [
{ common: '0~5', good: '6~10', excellent: '11~15' }
]
],
min: 0,
max: 15
},
{
id: 4,
@@ -67,7 +74,9 @@ const fixDataSourse = [
'引用标准、技术要求、试验检测方法等各个方面是否符合/严于法律法规、国家标准、行业标准等要求。',
scoreRange: [
{ common: '0~20', good: '21~35', excellent: '36~45' }
]
],
min: 0,
max: 45
},
{
id: 7,
@@ -75,7 +84,9 @@ const fixDataSourse = [
desc: '评估标准文件的应用范围是否明确、适用,是否与研发工艺、质量、生产、采购等环节相符合。',
scoreRange: [
{ common: '0~3', good: '4~6', excellent: '7~10' }
]
],
min: 0,
max: 10
},
{
id: 10,
@@ -84,7 +95,9 @@ const fixDataSourse = [
'(比如设计规范模版、释放规范模版、产品技术条件模版)所规定的要素和环节。',
scoreRange: [
{ common: '0~5', good: '6~10', excellent: '11~15' }
]
],
min: 0,
max: 15
},
{
id: 13,
@@ -92,7 +105,9 @@ const fixDataSourse = [
desc: '评估标准文件的可读性是否良好,是否有错别字,是否易于阅读和理解。',
scoreRange: [
{ common: '0~2', good: '3~4', excellent: '5' }
]
],
min: 0,
max: 5
},
{
id: 16,
@@ -100,7 +115,9 @@ const fixDataSourse = [
desc: '评估标准文件的权威性是否足够,是否得到了相关方的认可和信任,是否得到了有效的贯彻和执行。',
scoreRange: [
{ common: '0~3', good: '4~6', excellent: '7~10' }
]
],
min: 0,
max: 10
}
]
@@ -149,6 +166,38 @@ export default {
this.$refs.baseInfoForm.initData(data)
})
},
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
data.reviewMeetingDetails = this.dataSource
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () {
let hasErr = false
const arr = []
for (const item in this.dataSource) {
if (!(this.dataSource[item].evaluateScore + '') || !this.dataSource[item].deductionScoreReason) {
hasErr = true
break
} else {
// 是有评分和扣分理由的行
arr.push({
...this.dataSource[item],
evaluateItem: (Number(item) + 1) + ''
})
}
}
let data = {} // 需要返回的数据
if (hasErr) {
this.$message(this.$t('enStandardRevision.pleaseEnterAllMarkItem'))
data = false
} else {
data.reviewMeetingDetails = arr
}
return data
}
}
}
</script>
@@ -183,4 +232,29 @@ export default {
color: #888888;
margin: 0 0.32rem;
}
// 评分和扣分理由的label
.rate-label {
/deep/ .van-field__label {
font-size: 0.3rem;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: rgba(29,33,41,0.9) !important;
}
}
// 步进器样式
/deep/ .van-stepper {
.van-stepper__minus {
background: transparent;
}
.van-stepper__plus {
background: transparent;
}
.van-stepper__input {
background: transparent;
border: 0.01rem solid #C9CDD4;
border-radius: 0.04rem;
}
}
</style>
@@ -144,7 +144,7 @@ export default {
return data
},
userNameChange (value, fieldName) {
this.formInline[fieldName + 'dictText'] = value
this.formInline[fieldName + '_dictText'] = value
},
// 是否可进行评审会
reviewMeetingFlagChange () {