add 标准宣贯流程

This commit is contained in:
danshihao
2023-11-03 10:32:52 +08:00
parent 5eeee151b1
commit bee2d9bd7e
7 changed files with 549 additions and 4 deletions
@@ -0,0 +1,217 @@
<template>
<internal-detail-page :title="pageTitle" :content-padding="0">
<!-- 标题右侧tab -->
<template v-slot:titleRightCustom>
<div class="table-operator-tab">
<!-- 基础信息 -->
<a class="switch-item" :class="switchValue === 'base' ? 'table-operator-tab-active' : ''"
@click="switchChange('base')">{{ $t('basicInformation') }}
</a>
<!-- 人员信息 -->
<a class="switch-item" :class="switchValue === 'user' ? 'table-operator-tab-active' : ''"
@click="switchChange('user')">{{ $t('personalInformation') }}
</a>
</div>
</template>
<!--基本信息-->
<div class="detail-page-scroll-content" v-show="switchValue === 'base'">
<!-- 流程信息 -->
<div class="process-part-title">{{ $t('processInformation') }}</div>
<a-form :form="processInfoForm">
<a-row>
<a-col :span="12">
<!-- 流程名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('processName')">
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="50"
:disabled="disabled || processDisabled"
v-decorator="['processName', validatorRules.processName]" />
</a-form-item>
</a-col>
<a-col :span="12">
<!-- 截止日期 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('expirationDate')">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
style="width: 100%"
:disabled="disabled || processDisabled"
value-format="YYYY-MM-DD"
v-decorator="['expirationDate']" />
</a-form-item>
</a-col>
<a-col :span="24">
<!-- 流程说明 -->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('processExplain')">
<a-textarea :placeholder="$t('pleaseEnter') + $t('processExplain')"
:maxLength="500"
:rows="4"
:disabled="disabled || processDisabled"
v-decorator="['processExplain']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
<!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<base-info-form/>
<!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
<a-form :form="approvalInfoForm">
<!--备注-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('remarks')">
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500"
:rows="4"
v-decorator="['remarks', validatorRules.remarks]" />
</a-form-item>
<!--附件-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
<j-upload v-decorator="['file']" return-id />
</a-form-item>
</a-form>
</div>
<!-- 人员信息 -->
<div v-if="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list :url="url">
<personnel-info slot="personnelInfo" :data="personnelInfoData" :currentNode="currentNode"></personnel-info>
</process-detail-list>
</div>
<div class="detail-page-bottom-operate-box">
<a-button type="primary" :loading="loading" @click="handleSave" ghost><i class="iconfont icon-save" />{{ $t('preservation') }}</a-button>
<a-button type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
<a-button type="primary" :loading="loading" @click="handleAgree" icon="check-circle">{{ $t('agree') }}</a-button>
</div>
</internal-detail-page>
</template>
<script>
import PersonnelInfo from '@comp/PersonnelInfo'
import ProcessDetailList from '@comp/ProcessDetailList'
import InternalDetailPage from '@comp/InternalDetailPage'
import BaseInfoForm from '@views/workCenter/standardPromotionProcess/modules/BaseInfoForm'
// 人员信息
const approvalPersonalInfo = [ // 人员信息的数据
{
id: 1,
nodeName: '稽查负责人申请延期',
nodeRoleName: '稽查负责人',
canChoose: false,
userList: `系统管理员`
},
{
id: 2,
nodeName: '负责人主管级领导审批',
nodeRoleName: '负责人主管级领导',
canChoose: true,
chooseType: 'radio',
// chooseSource: 'contactManage',
fieldName: 'contactUser'
},
{
id: 3,
nodeName: '稽查联络人评估',
nodeRoleName: '稽查联络人',
canChoose: false,
chooseType: 'checkbox',
// chooseSource: 'contactManage',
fieldName: 'contactUser'
}
]
export default {
name: 'StandardPromotionProcess',
components: { BaseInfoForm, PersonnelInfo, ProcessDetailList, InternalDetailPage },
data () {
return {
loading: false,
switchValue: 'base',
disabled: false,
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
longLabelCol: {
xs: { span: 24 },
sm: { span: 2 }
},
longWrapperCol: {
xs: { span: 24 },
sm: { span: 22 }
},
currentNode: '1',
personnelInfoData: [], // 人员信息数据
validatorRules: {
// 流程名称
processName: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
],
validateTrigger: 'blur'
},
// 授权到期日期
authExpirationDate: {
rules: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.permissionApplicationProcess.authExpirationDate') }
],
validateTrigger: 'change'
},
// 备注
remarks: {
rules: [
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
],
validateTrigger: 'blur'
}
},
processInfoForm: this.$form.createForm(this),
baseInfoForm: this.$form.createForm(this),
approvalInfoForm: this.$form.createForm(this),
url: {
list: '' // 人员信息右侧表的分页查询接口
}
}
},
computed: {
pageTitle () {
return this.$t('flowCenter') + this.$route.meta.title
},
processDisabled () {
return +this.currentNode > 1
}
},
methods: {
switchChange (value) {
this.switchValue = value
},
handleSave () {
// if (this.loading) return
},
handleSubmit () {
if (this.loading) return
this.currentNode = +this.currentNode + 1 + ''
},
handleAgree () {
if (this.loading) return
this.currentNode = +this.currentNode + 1 + ''
}
},
mounted () {
this.personnelInfoData = approvalPersonalInfo
}
}
</script>
<style scoped>
</style>