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

This commit is contained in:
lideqin
2023-12-22 16:23:06 +08:00
parent 74f54c59cd
commit 370b6abef6
15 changed files with 360 additions and 352 deletions
@@ -377,6 +377,7 @@ export default {
func = enStandardEditGetDataDraft func = enStandardEditGetDataDraft
params = param params = param
} }
this.loading = true
func(params).then(res => { func(params).then(res => {
if (res.success) { if (res.success) {
this.model = res.result this.model = res.result
@@ -393,6 +394,8 @@ export default {
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}).finally(() => {
this.loading = false
}) })
}, },
switchChange (value) { switchChange (value) {
@@ -492,6 +495,7 @@ export default {
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => { this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
const data = await this.$refs.baseInfoRef.getDataValidate() const data = await this.$refs.baseInfoRef.getDataValidate()
if (!err && !approvalErr && data) { if (!err && !approvalErr && data) {
this.loading = true
const param = {} // 需要传给后端的数据 const param = {} // 需要传给后端的数据
param.common = { ...values, ...approvalValues } param.common = { ...values, ...approvalValues }
param.flowUser = personnelObj param.flowUser = personnelObj
@@ -558,14 +562,9 @@ export default {
const data = await this.$refs.baseInfoRef.getDataValidate() const data = await this.$refs.baseInfoRef.getDataValidate()
if (!approvalErr && data) { if (!approvalErr && data) {
const param = {} // 需要传给后端的数据 const param = {} // 需要传给后端的数据
param.common = approvalValues param.common = Object.assign({}, approvalValues)
if (data.dataSource && data.dataSource.length > 0) { param.common.taskId = this.$route.query.taskId
param.dataList = data.dataSource.map(item => { param.data = data
return { ...item, ...data.formInline }
})
} else {
param.dataList = [data.formInline]
}
enStandardEditAgree(param).then(res => { enStandardEditAgree(param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
@@ -180,7 +180,7 @@
</div> </div>
</template> </template>
</div> </div>
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file> <upload-file ref="uploadFile" @change="uploadFileChange" :disabled="disabled" :return-url="false"></upload-file>
</a-form-model> </a-form-model>
</a-spin> </a-spin>
</template> </template>
@@ -216,6 +216,11 @@ export default {
type: String, type: String,
required: false, required: false,
default: '' default: ''
},
disabled: {
type: Boolean,
required: false,
default: false
} }
}, },
watch: { watch: {
@@ -22,7 +22,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.clauseNumber')" <a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.clauseNumber')"
:maxLength="50" :maxLength="50"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'clauseNumber', validatorRules.clauseNumber ]" /> v-decorator.trim="[ 'clauseNum', validatorRules.clauseNum ]" />
</a-form-item> </a-form-item>
<!-- 条款名称 --> <!-- 条款名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.clauseName')"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.enStandardRevision.clauseName')">
@@ -36,7 +36,7 @@
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.contentOfRevisedOpinion')" <a-input :placeholder="$t('pleaseEnter') + $t('workCenter.enStandardRevision.contentOfRevisedOpinion')"
:maxLength="50" :maxLength="50"
@change="event => event.target.value = event.target.value.trim()" @change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'contentOfRevisedOpinion', validatorRules.contentOfRevisedOpinion ]" /> v-decorator.trim="[ 'editAdvice', validatorRules.editAdvice ]" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-spin> </a-spin>
@@ -87,7 +87,7 @@ export default {
}, },
validatorRules: { validatorRules: {
// 条款号 // 条款号
clauseNumber: { clauseNum: {
rules: [ rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.clauseNumber') } { required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.clauseNumber') }
], ],
@@ -101,7 +101,7 @@ export default {
validateTrigger: 'blur' validateTrigger: 'blur'
}, },
// 修改意见内容(包括修改理由和依据) // 修改意见内容(包括修改理由和依据)
contentOfRevisedOpinion: { editAdvice: {
rules: [ rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion') } { required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion') }
], ],
@@ -129,7 +129,7 @@ export default {
this.form.resetFields() this.form.resetFields()
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'clauseNumber', 'clauseName', 'contentOfRevisedOpinion')) this.form.setFieldsValue(pick(this.model, 'clauseNum', 'clauseName', 'editAdvice'))
}) })
}, },
getFileInfo (fileId) { getFileInfo (fileId) {
@@ -39,7 +39,7 @@
<div slot="action" slot-scope="{record, index}" class="action-span-cell"> <div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a> <a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a> <a @click="handleDelete(index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
</div> </div>
</j-table> </j-table>
@@ -81,7 +81,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.clauseNumber'), title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'clauseNumber', dataIndex: 'clauseNum',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 条款名称 { // 条款名称
@@ -95,7 +95,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'), title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
align: 'center', align: 'center',
width: 300, width: 300,
dataIndex: 'contentOfRevisedOpinion', dataIndex: 'editAdvice',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ {
@@ -112,11 +112,11 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值? // 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource = this.dataSource = data.advices
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
@@ -26,12 +26,12 @@
{{ $t('workCenter.enStandardRevision.isOpenComment') }} {{ $t('workCenter.enStandardRevision.isOpenComment') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="isOpenComment"> <a-form-model-item class="item-model" prop="adviceFlag">
<a-radio-group v-model="formInline.isOpenComment"> <a-radio-group v-model="formInline.adviceFlag">
<a-radio :value="1"> <a-radio :value="1">
{{ $t('yes') }} {{ $t('yes') }}
</a-radio> </a-radio>
<a-radio :value="2"> <a-radio :value="0">
{{ $t('not') }} {{ $t('not') }}
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
@@ -40,18 +40,18 @@
<!-- 部门联络人 --> <!-- 部门联络人 -->
<div class="box-title-text form-flex-item"> <div class="box-title-text form-flex-item">
<div class="title-text"> <div class="title-text">
<span class="required" v-if="rules.departmentalLiaison[0].required">*</span> <span class="required" v-if="rules.contactUser[0].required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')"> <span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')">
{{ $t('workCenter.enStandardRevision.departmentalLiaison') }} {{ $t('workCenter.enStandardRevision.departmentalLiaison') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="departmentalLiaison"> <a-form-model-item class="item-model" prop="contactUser">
<user-selection v-model="formInline.departmentalLiaison" <user-selection v-model="formInline.contactUser"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departmentalLiaison')" :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departmentalLiaison')"
:disabled="disabled" :disabled="disabled"
filedName="departmentalLiaison" filedName="contactUser"
@nameChange="userSelectNameChange" @nameChange="userSelectNameChange"
:nameStr="formInline.departmentalLiaison_dictText" :nameStr="formInline.contactUser_dictText"
type="checkbox"/> type="checkbox"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -79,7 +79,7 @@ export default {
formInline: {}, formInline: {},
rules: { rules: {
// 部门联络人 // 部门联络人
departmentalLiaison: [ contactUser: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.departmentalLiaison') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.departmentalLiaison') + this.$t('cannotEmpty'),
@@ -91,13 +91,13 @@ export default {
}, },
watch: { watch: {
// 是否开启征求意见 // 是否开启征求意见
'formInline.isOpenComment': { 'formInline.adviceFlag': {
handler (val) { handler (val) {
if (val && val === 1) { if (val && val === 1) {
// 开启征求意见,部门联络人必填 // 开启征求意见,部门联络人必填
this.rules.departmentalLiaison[0].required = true this.rules.contactUser[0].required = true
} else { } else {
this.rules.departmentalLiaison[0].required = false this.rules.contactUser[0].required = false
} }
} }
} }
@@ -106,17 +106,16 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
// 给表单赋值,在线编辑不知道要怎么赋值? // 给表单赋值,在线编辑不知道要怎么赋值?
// this.formInline = this.formInline = Object.assign({}, data)
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = Object.assign({}, this.formInline)
data.formInline = this.formInline
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -124,7 +123,7 @@ export default {
let data = {} let data = {}
await this.$refs.ruleForm.validate(valid => { await this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
data.formInline = this.formInline const data = Object.assign({}, this.formInline)
} else { } else {
data = false data = false
} }
@@ -50,13 +50,13 @@
{{ $t('workCenter.enStandardRevision.departLiaisonLeader') }} {{ $t('workCenter.enStandardRevision.departLiaisonLeader') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="departLiaisonLeader"> <a-form-model-item class="item-model" prop="contactUserLeader">
<user-selection v-model="formInline.departLiaisonLeader" <user-selection v-model="formInline.contactUserLeader"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departLiaisonLeader')" :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departLiaisonLeader')"
:disabled="disabled" :disabled="disabled"
filedName="departLiaisonLeader" filedName="contactUserLeader"
@nameChange="userSelectNameChange" @nameChange="userSelectNameChange"
:nameStr="formInline.departLiaisonLeader_dictText" :nameStr="formInline.contactUserLeader_dictText"
type="radio"/> type="radio"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -101,7 +101,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.clauseNumber'), title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'clauseNumber', dataIndex: 'clauseNum',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 条款名称 { // 条款名称
@@ -115,14 +115,14 @@ export default {
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'), title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
align: 'center', align: 'center',
width: 300, width: 300,
dataIndex: 'contentOfRevisedOpinion', dataIndex: 'editAdvice',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 意见提出人 { // 意见提出人
title: this.$t('workCenter.enStandardRevision.proposer'), title: this.$t('workCenter.enStandardRevision.proposer'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'proposer', dataIndex: 'createUserId_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ {
@@ -136,7 +136,7 @@ export default {
formInline: {}, formInline: {},
rules: { rules: {
// 部门联络人主管级领导 // 部门联络人主管级领导
departLiaisonLeader: [ contactUserLeader: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.departLiaisonLeader') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.departLiaisonLeader') + this.$t('cannotEmpty'),
@@ -150,17 +150,18 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值? // 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource = this.dataSource = data.advices
this.formInline = Object.assign({}, data)
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = Object.assign({}, this.formInline)
data.dataSource = this.dataSource data.advices = this.dataSource
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -169,8 +170,8 @@ export default {
await this.$refs.ruleForm.validate(valid => { await this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
if (this.dataSource && this.dataSource.length > 0) { if (this.dataSource && this.dataSource.length > 0) {
data.dataSource = this.dataSource data = Object.assign({}, this.formInline)
data.formInline = this.formInline data.advices = this.dataSource
} else { } else {
this.$message.warning(this.$t('addAtLeastOneRowOfData')) this.$message.warning(this.$t('addAtLeastOneRowOfData'))
data = false data = false
@@ -101,17 +101,16 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
// 给表单赋值,在线编辑不知道要怎么赋值? // 给表单赋值,在线编辑不知道要怎么赋值?
// this.formInline = this.formInline = Object.assign(data)
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = Object.assign({}, this.formInline)
data.formInline = this.formInline
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -119,7 +118,7 @@ export default {
let data = {} let data = {}
await this.$refs.ruleForm.validate(valid => { await this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
data.formInline = this.formInline data = Object.assign({}, this.formInline)
} else { } else {
data = false data = false
} }
@@ -81,7 +81,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.clauseNumber'), title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'clauseNumber', dataIndex: 'clauseNum',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 条款名称 { // 条款名称
@@ -95,14 +95,14 @@ export default {
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'), title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
align: 'center', align: 'center',
width: 300, width: 300,
dataIndex: 'contentOfRevisedOpinion', dataIndex: 'editAdvice',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 意见提出人 { // 意见提出人
title: this.$t('workCenter.enStandardRevision.proposer'), title: this.$t('workCenter.enStandardRevision.proposer'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'proposer', dataIndex: 'createUserId_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ {
@@ -119,24 +119,24 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值? // 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource = this.dataSource = data.advices
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = {}
data.dataSource = this.dataSource data.advices = this.dataSource
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () { getDataValidate () {
if (this.dataSource && this.dataSource.length > 0) { if (this.dataSource && this.dataSource.length > 0) {
const data = {} const data = {}
data.dataSource = this.dataSource data.advices = this.dataSource
return data return data
} else { } else {
this.$message.warning(this.$t('addAtLeastOneRowOfData')) this.$message.warning(this.$t('addAtLeastOneRowOfData'))
@@ -74,7 +74,7 @@ export default {
title: this.$t('workCenter.enStandardRevision.clauseNumber'), title: this.$t('workCenter.enStandardRevision.clauseNumber'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'clauseNumber', dataIndex: 'clauseNum',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 条款名称 { // 条款名称
@@ -88,24 +88,24 @@ export default {
title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'), title: this.$t('workCenter.enStandardRevision.contentOfRevisedOpinion'),
align: 'center', align: 'center',
width: 300, width: 300,
dataIndex: 'contentOfRevisedOpinion', dataIndex: 'editAdvice',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 意见提出人 { // 意见提出人
title: this.$t('workCenter.enStandardRevision.proposer'), title: this.$t('workCenter.enStandardRevision.proposer'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'proposer', dataIndex: 'createUserId_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 处理意见 { // 处理意见
title: this.$t('workCenter.enStandardRevision.handlingSuggestion'), title: this.$t('workCenter.enStandardRevision.handlingSuggestion'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'handlingSuggestion', dataIndex: 'handleAdvice',
customRender: (text, row, index) => { customRender: (text, row, index) => {
const obj = { const obj = {
children: <a-select v-model={this.dataSource[index].deductionScoreReason} children: <a-select v-model={this.dataSource[index].handleAdvice}
placeholder={this.$t('pleaseSelect')} class={'handle-suggest-select'} placeholder={this.$t('pleaseSelect')} class={'handle-suggest-select'}
options={this.handlingSuggestionOption} options={this.handlingSuggestionOption}
/>, />,
@@ -145,19 +145,18 @@ export default {
methods: { methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
this.data = data
// 给表格赋值,在线编辑不知道要怎么赋值? // 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource = this.dataSource = data.advices
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = {}
data.dataSource = this.dataSource data.advices = this.dataSource
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -175,7 +174,7 @@ export default {
this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseEnterAllMarkItem')) this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseEnterAllMarkItem'))
data = false data = false
} else { } else {
data.dataSource = this.dataSource data.advices = this.dataSource
} }
return data return data
}, },
@@ -128,7 +128,7 @@
<div slot="action" slot-scope="{record, index}" class="action-span-cell"> <div slot="action" slot-scope="{record, index}" class="action-span-cell">
<a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a> <a @click="handleEdit(record, index)" class="table-ope-btn" :disabled="disabled">{{ $t('edit') }}</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDelete(record.id, index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a> <a @click="handleDelete(index)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
</div> </div>
</j-table> </j-table>
@@ -312,10 +312,13 @@ export default {
let data = {} let data = {}
await this.$refs.ruleForm.validate(valid => { await this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
if (this.dataSource && this.dataSource.length > 0) { if (this.formInline.inspectFlag === 1 && this.dataSource && this.dataSource.length > 0) {
// 有数据可以抛出 // 有数据可以抛出
data.dataSource = this.dataSource data = Object.assign({}, this.formInline)
data.formInline = this.formInline data.inspectContents = this.dataSource
} else if (this.formInline.inspectFlag === 0) {
// 有数据可以抛出
data = Object.assign({}, this.formInline)
} else { } else {
this.$message.warning(this.$t('addAtLeastOneRowOfData')) this.$message.warning(this.$t('addAtLeastOneRowOfData'))
data = false data = false
@@ -102,9 +102,9 @@ export default {
// 给表单赋值,在线编辑不知道要怎么赋值? // 给表单赋值,在线编辑不知道要怎么赋值?
// this.formInline = // this.formInline =
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
@@ -2,164 +2,162 @@
<div> <div>
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form> <base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm"> <a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form"> <div class="form-flex-box">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head"> <!-- 会议纪要 -->
<!-- 会议纪要 --> <div class="box-title-text form-flex-item">
<div class="box-title-text form-flex-item"> <div class="title-text">
<div class="title-text"> <span class="required">*</span>
<span class="required">*</span> <span class="title-text-text" :title="$t('workCenter.enStandardRevision.meetingSummary')">
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.meetingSummary')">
{{ $t('workCenter.enStandardRevision.meetingSummary') }} {{ $t('workCenter.enStandardRevision.meetingSummary') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="meetingSummary">
<a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('meetingSummary')">
{{
(formInline.meetingSummary === 'null' || formInline.meetingSummary === ''
|| formInline.meetingSummary === null || formInline.meetingSummary === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div> </div>
<!-- 授权部门 --> <a-form-model-item class="item-model" prop="meetingSummary">
<div class="box-title-text form-flex-item"> <a-button type="primary" class="button-text" style="width: 200px" @click="clickButtonToUpload('meetingSummary')">
<div class="title-text"> {{
<span class="required">*</span> (formInline.meetingSummary === 'null' || formInline.meetingSummary === ''
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.authorizationDepart')"> || formInline.meetingSummary === null || formInline.meetingSummary === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
<!-- 授权部门 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enterpriseInitChangePlan.authorizationDepart')">
{{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }} {{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="authorizationDepart">
<j-select-depart v-model="formInline.authorizationDepart"
:disabled="disabled"
:backDepart="true" />
</a-form-model-item>
</div> </div>
<!-- 参会人员 --> <a-form-model-item class="item-model" prop="authorizationDepart">
<div class="box-title-text form-flex-item"> <j-select-depart v-model="formInline.authorizationDepart"
<div class="title-text"> :disabled="disabled"
<span class="required">*</span> :backDepart="true" />
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.conferee')"> </a-form-model-item>
</div>
<!-- 参会人员 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.conferee')">
{{ $t('workCenter.enStandardRevision.conferee') }} {{ $t('workCenter.enStandardRevision.conferee') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="conferee">
<user-selection v-model="formInline.conferee"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.conferee')"
:disabled="disabled"
filedName="conferee"
@nameChange="userSelectNameChange"
:nameStr="formInline.conferee_dictText"
type="checkbox"/>
</a-form-model-item>
</div> </div>
<!-- 校对人其他起草人 --> <a-form-model-item class="item-model" prop="meetingUsers">
<div class="box-title-text form-flex-item"> <user-selection v-model="formInline.meetingUsers"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.conferee')"
<span class="required">*</span> :disabled="disabled"
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.proofreader')"> filedName="meetingUsers"
@nameChange="userSelectNameChange"
:nameStr="formInline.meetingUsers_dictText"
type="checkbox"/>
</a-form-model-item>
</div>
<!-- 校对人其他起草人 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.proofreader')">
{{ $t('workCenter.enStandardRevision.proofreader') }} {{ $t('workCenter.enStandardRevision.proofreader') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="proofreader">
<user-selection v-model="formInline.proofreader"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.proofreader')"
:disabled="disabled"
filedName="proofreader"
@nameChange="userSelectNameChange"
:nameStr="formInline.proofreader_dictText"
type="checkbox"/>
</a-form-model-item>
</div> </div>
<!-- 审批人主管级领导 --> <a-form-model-item class="item-model" prop="proofreader">
<div class="box-title-text form-flex-item"> <user-selection v-model="formInline.proofreader"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.proofreader')"
<span class="required">*</span> :disabled="disabled"
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.approverLeader')"> filedName="proofreader"
@nameChange="userSelectNameChange"
:nameStr="formInline.proofreader_dictText"
type="checkbox"/>
</a-form-model-item>
</div>
<!-- 审批人主管级领导 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.approverLeader')">
{{ $t('workCenter.enStandardRevision.approverLeader') }} {{ $t('workCenter.enStandardRevision.approverLeader') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="approverLeader">
<user-selection v-model="formInline.approverLeader"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverLeader')"
:disabled="disabled"
filedName="approverLeader"
@nameChange="userSelectNameChange"
:nameStr="formInline.approverLeader_dictText"
type="checkbox"/>
</a-form-model-item>
</div> </div>
<!-- 审批人标准化 --> <a-form-model-item class="item-model" prop="approvalUser">
<div class="box-title-text form-flex-item"> <user-selection v-model="formInline.approvalUser"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverLeader')"
<span class="required">*</span> :disabled="disabled"
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.approverStandardization')"> filedName="approvalUser"
@nameChange="userSelectNameChange"
:nameStr="formInline.approvalUser_dictText"
type="checkbox"/>
</a-form-model-item>
</div>
<!-- 审批人标准化 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.approverStandardization')">
{{ $t('workCenter.enStandardRevision.approverStandardization') }} {{ $t('workCenter.enStandardRevision.approverStandardization') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="approverStandardization">
<user-selection v-model="formInline.approverStandardization"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverStandardization')"
:disabled="disabled"
filedName="approverStandardization"
@nameChange="userSelectNameChange"
:nameStr="formInline.approverStandardization_dictText"
type="radio"/>
</a-form-model-item>
</div> </div>
<!-- 会签相关部门领导 --> <a-form-model-item class="item-model" prop="approvalUserStandard">
<div class="box-title-text form-flex-item"> <user-selection v-model="formInline.approvalUserStandard"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverStandardization')"
<span class="required">*</span> :disabled="disabled"
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.countersign')"> filedName="approvalUserStandard"
@nameChange="userSelectNameChange"
:nameStr="formInline.approvalUserStandard_dictText"
type="radio"/>
</a-form-model-item>
</div>
<!-- 会签相关部门领导 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.countersign')">
{{ $t('workCenter.enStandardRevision.countersign') }} {{ $t('workCenter.enStandardRevision.countersign') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="countersign">
<user-selection v-model="formInline.countersign"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.countersign')"
:disabled="disabled"
filedName="countersign"
@nameChange="userSelectNameChange"
:nameStr="formInline.countersign_dictText"
type="radio"/>
</a-form-model-item>
</div> </div>
<!-- 审批总工程师 --> <a-form-model-item class="item-model" prop="relatedLeader">
<div class="box-title-text form-flex-item"> <user-selection v-model="formInline.relatedLeader"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.countersign')"
<span class="required">*</span> :disabled="disabled"
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.approverHeadEngineer')"> filedName="relatedLeader"
@nameChange="userSelectNameChange"
:nameStr="formInline.relatedLeader_dictText"
type="radio"/>
</a-form-model-item>
</div>
<!-- 审批总工程师 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.approverHeadEngineer')">
{{ $t('workCenter.enStandardRevision.approverHeadEngineer') }} {{ $t('workCenter.enStandardRevision.approverHeadEngineer') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="approverHeadEngineer">
<user-selection v-model="formInline.approverHeadEngineer"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverHeadEngineer')"
:disabled="disabled"
filedName="approverHeadEngineer"
@nameChange="userSelectNameChange"
:nameStr="formInline.approverHeadEngineer_dictText"
type="radio"/>
</a-form-model-item>
</div> </div>
<!-- 标准文本 --> <a-form-model-item class="item-model" prop="chiefEngineer">
<div class="box-title-text form-flex-item"> <user-selection v-model="formInline.chiefEngineer"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.approverHeadEngineer')"
:disabled="disabled"
filedName="chiefEngineer"
@nameChange="userSelectNameChange"
:nameStr="formInline.chiefEngineer_dictText"
type="radio"/>
</a-form-model-item>
</div>
<!-- 标准文本 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')"> <span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
{{ $t('workCenter.enStandardRevision.standardText') }} {{ $t('workCenter.enStandardRevision.standardText') }}
</span> </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>
<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>
</div> </div>
</a-form-model> </a-form-model>
@@ -205,7 +203,7 @@ export default {
} }
], ],
// 参会人员 // 参会人员
conferee: [ meetingUsers: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'),
@@ -221,7 +219,7 @@ export default {
} }
], ],
// 审批人(主管级领导) // 审批人(主管级领导)
approverLeader: [ approvalUser: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.approverLeader') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.approverLeader') + this.$t('cannotEmpty'),
@@ -229,7 +227,7 @@ export default {
} }
], ],
// 审批人(标准化) // 审批人(标准化)
approverStandardization: [ approvalUserStandard: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.approverStandardization') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.approverStandardization') + this.$t('cannotEmpty'),
@@ -237,7 +235,7 @@ export default {
} }
], ],
// 会签(相关部门领导) // 会签(相关部门领导)
countersign: [ relatedLeader: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.countersign') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.countersign') + this.$t('cannotEmpty'),
@@ -245,7 +243,7 @@ export default {
} }
], ],
// 审批(总工程师) // 审批(总工程师)
approverHeadEngineer: [ chiefEngineer: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.approverHeadEngineer') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.approverHeadEngineer') + this.$t('cannotEmpty'),
@@ -258,19 +256,17 @@ export default {
methods: { methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
this.data = data
// 给表单赋值,在线编辑不知道要怎么赋值? // 给表单赋值,在线编辑不知道要怎么赋值?
// this.formInline = this.formInline = Object.assign({}, data)
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = Object.assign({}, this.formInline)
data.uploadMinuteFormInline = this.formInline
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -278,7 +274,7 @@ export default {
let data = {} let data = {}
await this.$refs.ruleForm.validate(valid => { await this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
data.formInline = this.formInline data = Object.assign({}, this.formInline)
} else { } else {
data = false data = false
} }
@@ -287,11 +283,6 @@ export default {
}, },
// 点击文件上传 // 点击文件上传
clickButtonToUpload (fieldName) { clickButtonToUpload (fieldName) {
if (fieldName === 'uploadAttachment') {
this.fileMaxSize = 10
} else {
this.fileMaxSize = undefined
}
this.$refs.uploadFile.open(this.formInline[fieldName]) this.$refs.uploadFile.open(this.formInline[fieldName])
this.uploadName = fieldName this.uploadName = fieldName
}, },
@@ -11,11 +11,18 @@
:dataSource="dataSource" :dataSource="dataSource"
:pagination="false" :pagination="false"
:loading="loading"> :loading="loading">
<!-- 起草人 -->
<template slot="user" slot-scope="{record, text}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ record.operateType === '2' ? '我' : (text || global.emptyLine) }}</template>
<div class="table-text">{{ record.operateType === '2' ? '我' : (text || global.emptyLine) }}</div>
</a-tooltip>
</template>
<!-- 操作栏 --> <!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell"> <div slot="action" slot-scope="{record, index}" class="action-span-cell">
<!-- 上传企标 只能上传分配给自己的上传企标,到期未上传跳过该起草人操作列表显示- --> <!-- 上传企标 只能上传分配给自己的上传企标,到期未上传跳过该起草人操作列表显示- -->
<a v-if="record.drafter === userInfo.id && record.expirationDate < currentDate" <a v-if="record.operateType !== '1'"
@click="handleUploadStandard(record, index)" @click="handleUploadStandard(record, index)"
class="table-ope-btn" class="table-ope-btn"
:disabled="disabled" :disabled="disabled"
@@ -56,28 +63,28 @@ export default {
title: this.$t('workCenter.enStandardRevision.draftingUnit'), title: this.$t('workCenter.enStandardRevision.draftingUnit'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'draftingUnit_dictText', dataIndex: 'dept_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 起草人 { // 起草人
title: this.$t('workCenter.enStandardRevision.drafter'), title: this.$t('workCenter.enStandardRevision.drafter'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'drafter_dictText', dataIndex: 'user_dictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'user' }
}, },
{ // 起草范围 { // 起草范围
title: this.$t('workCenter.enStandardRevision.draftingScope'), title: this.$t('workCenter.enStandardRevision.draftingScope'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'draftingScope', dataIndex: 'scope',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 截止日期 { // 截止日期
title: this.$t('expirationDate'), title: this.$t('expirationDate'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'expirationDate', dataIndex: 'deadline',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 操作 { // 操作
@@ -281,17 +281,25 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值? // 给表格赋值,在线编辑不知道要怎么赋值?
// this.dataSource = if (data.reviewMeetingDetails) {
for (const i in fixDataSourse) {
this.dataSource[i] = { ...fixDataSourse[i] }
if (i % 3 === 0) {
this.dataSource[i].evaluateScore = data.reviewMeetingDetails[Math.floor(i / 3)].evaluateScore || ''
this.dataSource[i].deductionScoreReason = data.reviewMeetingDetails[Math.floor(i / 3)].deductionScoreReason || ''
}
}
}
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = {}
data.dataSource = this.dataSource data.reviewMeetingDetails = this.dataSource
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -311,7 +319,7 @@ export default {
data.dataSource = this.dataSource data.dataSource = this.dataSource
} }
return data return data
}, }
} }
} }
</script> </script>
@@ -3,113 +3,111 @@
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form> <base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm"> <a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form"> <div class="form-flex-box">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head"> <!-- 标准文本 -->
<!-- 标准文本 --> <div class="box-title-text form-flex-item">
<div class="box-title-text form-flex-item"> <div class="title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')"> <span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
{{ $t('workCenter.enStandardRevision.standardText') }} {{ $t('workCenter.enStandardRevision.standardText') }}
</span> </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>
<!-- 是否可进行评审会 --> <a-form-model-item class="item-model">
<div class="box-title-text form-flex-item"> <div class="online-edit-wrapper">
<div class="title-text title-text-long"> <!-- todo: 还不确定这里展示的是什么 -->
<p>企业标准</p>
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</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="title-text-text" :title="$t('workCenter.enStandardRevision.isCanAuditMeeting')"> <span class="title-text-text" :title="$t('workCenter.enStandardRevision.isCanAuditMeeting')">
{{ $t('workCenter.enStandardRevision.isCanAuditMeeting') }} {{ $t('workCenter.enStandardRevision.isCanAuditMeeting') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="isCanAuditMeeting">
<a-radio-group v-model="formInline.isCanAuditMeeting" @change="isCanAuditMeetingChange" :defaultValue="1">
<a-radio :value="1">
{{ $t('yes') }}
</a-radio>
<a-radio :value="2">
{{ $t('not') }}
</a-radio>
</a-radio-group>
</a-form-model-item>
</div> </div>
<template v-if="formInline.isCanAuditMeeting === 1"> <a-form-model-item class="item-model" prop="reviewMeetingFlag">
<!-- 评审人 --> <a-radio-group v-model="formInline.reviewMeetingFlag" @change="reviewMeetingFlagChange" :defaultValue="1">
<div class="box-title-text form-flex-item"> <a-radio :value="1">
<div class="title-text"> {{ $t('yes') }}
<span class="required">*</span> </a-radio>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.assessor')"> <a-radio :value="0">
{{ $t('not') }}
</a-radio>
</a-radio-group>
</a-form-model-item>
</div>
<template v-if="formInline.reviewMeetingFlag === 1">
<!-- 评审人 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.assessor')">
{{ $t('workCenter.enStandardRevision.assessor') }} {{ $t('workCenter.enStandardRevision.assessor') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="assessor">
<user-selection v-model="formInline.assessor"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.assessor')"
:disabled="disabled"
filedName="assessor"
@nameChange="userSelectNameChange"
:nameStr="formInline.assessor_dictText"
type="radio"/>
</a-form-model-item>
</div> </div>
<!-- 评分人 --> <a-form-model-item class="item-model" prop="reviewUser">
<div class="box-title-text form-flex-item"> <user-selection v-model="formInline.reviewUser"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.assessor')"
<span class="required">*</span> :disabled="disabled"
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.scorer')"> filedName="reviewUser"
@nameChange="userSelectNameChange"
:nameStr="formInline.reviewUser_dictText"
type="radio"/>
</a-form-model-item>
</div>
<!-- 评分人 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.scorer')">
{{ $t('workCenter.enStandardRevision.scorer') }} {{ $t('workCenter.enStandardRevision.scorer') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="scorer">
<user-selection v-model="formInline.scorer"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.scorer')"
:disabled="disabled"
filedName="scorer"
@nameChange="userSelectNameChange"
:nameStr="formInline.scorer_dictText"
type="checkbox"/>
</a-form-model-item>
</div> </div>
<!-- 评审日期 --> <a-form-model-item class="item-model" prop="raters">
<div class="box-title-text form-flex-item"> <user-selection v-model="formInline.raters"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.scorer')"
<span class="required">*</span> :disabled="disabled"
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.reviewDate')"> filedName="raters"
@nameChange="userSelectNameChange"
:nameStr="formInline.raters_dictText"
type="checkbox"/>
</a-form-model-item>
</div>
<!-- 评审日期 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.reviewDate')">
{{ $t('workCenter.enStandardRevision.reviewDate') }} {{ $t('workCenter.enStandardRevision.reviewDate') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="reviewDate">
<a-date-picker v-model="formInline.reviewDate"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.reviewDate')"
:showTime="false"
value-format="YYYY-MM-DD"
:disabled="disabled"></a-date-picker>
</a-form-model-item>
</div> </div>
<!-- 评审地点 --> <a-form-model-item class="item-model" prop="reviewDate">
<div class="box-title-text form-flex-item"> <a-date-picker v-model="formInline.reviewDate"
<div class="title-text"> :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.reviewDate')"
<span class="required">*</span> :showTime="false"
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.judgingVenue')"> value-format="YYYY-MM-DD"
:disabled="disabled"></a-date-picker>
</a-form-model-item>
</div>
<!-- 评审地点 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
<span class="required">*</span>
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.judgingVenue')">
{{ $t('workCenter.enStandardRevision.judgingVenue') }} {{ $t('workCenter.enStandardRevision.judgingVenue') }}
</span> </span>
</div>
<a-form-model-item class="item-model" prop="judgingVenue">
<a-input class="box-input"
v-model="formInline.judgingVenue"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardRevision.judgingVenue')" />
</a-form-model-item>
</div> </div>
</template> <a-form-model-item class="item-model" prop="reviewPlace">
</div> <a-input class="box-input"
v-model="formInline.reviewPlace"
:maxLength="50"
:disabled="disabled"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enStandardRevision.judgingVenue')" />
</a-form-model-item>
</div>
</template>
</div> </div>
</a-form-model> </a-form-model>
</div> </div>
@@ -134,7 +132,7 @@ export default {
formInline: {}, formInline: {},
rules: { rules: {
// 评审人 // 评审人
assessor: [ reviewUser: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.assessor') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.assessor') + this.$t('cannotEmpty'),
@@ -142,7 +140,7 @@ export default {
} }
], ],
// 评分人 // 评分人
scorer: [ raters: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.scorer') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.scorer') + this.$t('cannotEmpty'),
@@ -158,7 +156,7 @@ export default {
} }
], ],
// 评审地点 // 评审地点
judgingVenue: [ reviewPlace: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.judgingVenue') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.judgingVenue') + this.$t('cannotEmpty'),
@@ -170,25 +168,24 @@ export default {
}, },
mounted () { mounted () {
const formInline = {} const formInline = {}
formInline.isCanAuditMeeting = 1 formInline.reviewMeetingFlag = 1
this.formInline = Object.assign({}, formInline) this.formInline = Object.assign({}, formInline)
this.isCanAuditMeetingChange() this.reviewMeetingFlagChange()
}, },
methods: { methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值? // 给表格赋值,在线编辑不知道要怎么赋值?
// this.formInline = this.formInline = Object.assign({}, data)
// 给表单赋值 // 给表单赋值
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.baseInfoForm.formInline = this.$refs.baseInfoForm.initData(data)
// }) })
}, },
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = Object.assign({}, this.formInline)
data.formInline = this.formInline
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -196,7 +193,7 @@ export default {
let data = {} // 要返回的数据 let data = {} // 要返回的数据
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
data.formInline = this.formInline data = Object.assign({}, this.formInline)
} else { } else {
data = false data = false
} }
@@ -204,9 +201,9 @@ export default {
return data return data
}, },
// 是否可进行评审会 // 是否可进行评审会
isCanAuditMeetingChange () { reviewMeetingFlagChange () {
// 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击 // 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击
this.$emit('standardizationAuditIsMeeting', this.formInline.isCanAuditMeeting) this.$emit('standardizationAuditIsMeeting', this.formInline.reviewMeetingFlag)
} }
} }
} }