[update] 修改UAT问题:企标制修订流程征求意见对象填写意见节点增加有无意见字段,有意见才显示征求意见表格及操作按钮
This commit is contained in:
@@ -164,7 +164,10 @@ module.exports = {
|
||||
confirmIsInsertSignature: '确认是否已插入签章',
|
||||
confirmIsInsertSignatureCont: '本节点需要前往在线编辑页面插入签章,请前往在线编辑页面确认是否已经插入签章,检查签章页无误后再行提交。',
|
||||
confirmIsInsertSignatureOkText: '前往在线编辑页面',
|
||||
confirmIsInsertSignatureCancelText: '确认签章页无误并提交'
|
||||
confirmIsInsertSignatureCancelText: '确认签章页无误并提交',
|
||||
haveNoOpinion: '有无意见',
|
||||
have: '有',
|
||||
noHave: '无'
|
||||
},
|
||||
// 企标更改流程
|
||||
enStandardChange: {
|
||||
|
||||
+100
-46
@@ -1,49 +1,74 @@
|
||||
<template>
|
||||
<div>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="form-flex-box">
|
||||
<!-- 标准文本 -->
|
||||
<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">
|
||||
<p>{{ $t('enterpriseStandard') }}</p>
|
||||
<a-button type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 有无意见 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text title-text-long">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.haveNoOpinion')">
|
||||
{{ $t('workCenter.enStandardRevision.haveNoOpinion') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="haveNoOpinion">
|
||||
<a-radio-group v-model="formInline.haveNoOpinion" :disabled="disabled" @change="reviewMeetingFlagChange">
|
||||
<a-radio value="1">
|
||||
{{ $t('workCenter.enStandardRevision.have') }}
|
||||
</a-radio>
|
||||
<a-radio value="0">
|
||||
{{ $t('workCenter.enStandardRevision.noHave') }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
<template v-if="formInline.haveNoOpinion === '1'">
|
||||
<!-- 操作区域 -->
|
||||
<div v-if="!disabled" class="table-operator">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
|
||||
{{ $t('newlyAdded') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<p>{{ $t('enterpriseStandard') }}</p>
|
||||
<a-button type="primary" @click="onlineEditView">{{ $t('view') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 操作区域 -->
|
||||
<div v-if="!disabled" class="table-operator">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" :disabled="disabled">
|
||||
{{ $t('newlyAdded') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="uid"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
<div>
|
||||
<j-table
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="uid"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 操作栏 -->
|
||||
<div slot="action" slot-scope="{record}" class="action-span-cell">
|
||||
<a v-if="!disabled" @click="handleEdit(record)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
|
||||
<a-divider v-if="!disabled" type="vertical" />
|
||||
<a v-if="!disabled" @click="handleDelete(record.uid)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
||||
</div>
|
||||
<!-- 操作栏 -->
|
||||
<div slot="action" slot-scope="{record}" class="action-span-cell">
|
||||
<a v-if="!disabled" @click="handleEdit(record)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
|
||||
<a-divider v-if="!disabled" type="vertical" />
|
||||
<a v-if="!disabled" @click="handleDelete(record.uid)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
|
||||
</div>
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
</j-table>
|
||||
</div>
|
||||
</template>
|
||||
<comment-modal ref="commentModal" @ok="modalFormOk"></comment-modal>
|
||||
</div>
|
||||
</template>
|
||||
@@ -71,6 +96,17 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
formInline: {},
|
||||
rules: {
|
||||
// 有无意见
|
||||
haveNoOpinion: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.enStandardRevision.haveNoOpinion') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
/* 分页参数 */
|
||||
ipagination: {
|
||||
current: 1,
|
||||
@@ -126,9 +162,18 @@ export default {
|
||||
onEditFile: '' // 在线编辑的文件id
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
const formInline = {}
|
||||
formInline.haveNoOpinion = '1'
|
||||
this.formInline = Object.assign({}, formInline)
|
||||
},
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.formInline = Object.assign({}, data)
|
||||
if (!this.formInline.haveNoOpinion) {
|
||||
this.formInline.haveNoOpinion = '1'
|
||||
}
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
this.dataSource = data.advices.map(item => {
|
||||
const uidGenerator = () => {
|
||||
@@ -148,7 +193,7 @@ export default {
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
const data = Object.assign({}, this.formInline)
|
||||
data.advices = this.dataSource
|
||||
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
|
||||
// 在线编辑文件id
|
||||
@@ -156,15 +201,20 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate () {
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.advices = this.dataSource
|
||||
return data
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
return false
|
||||
}
|
||||
async getDataValidate () {
|
||||
let data = {} // 要返回的数据
|
||||
await this.$refs.ruleForm.validate(valid => {
|
||||
if (this.formInline.haveNoOpinion === '1' && this.dataSource && this.dataSource.length > 0) {
|
||||
data = Object.assign({}, this.formInline)
|
||||
data.advices = this.dataSource
|
||||
} else if (this.formInline.haveNoOpinion === '1' && (!this.dataSource || this.dataSource.length <= 0)) {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
data = false
|
||||
} else {
|
||||
data = Object.assign({}, this.formInline)
|
||||
}
|
||||
})
|
||||
return data
|
||||
},
|
||||
handleTableChange (pagination) {
|
||||
this.ipagination = pagination
|
||||
@@ -212,6 +262,10 @@ export default {
|
||||
// 在线编辑的查看
|
||||
onlineEditView () {
|
||||
this.$emit('onlineEditView', this.onEditFile)
|
||||
},
|
||||
reviewMeetingFlagChange () {
|
||||
console.log('------change', this.formInline)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user