[update] 修改企标制修订流程
This commit is contained in:
+2
-2
@@ -122,14 +122,14 @@ export default {
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
data.advices = this.dataSource
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate () {
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
data.advices = this.dataSource
|
||||
return data
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
|
||||
+41
-43
@@ -2,59 +2,57 @@
|
||||
<div>
|
||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="collapsible-panel-form">
|
||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<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">
|
||||
<!-- 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">
|
||||
<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 class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isOpenComment')">
|
||||
{{ $t('workCenter.enStandardRevision.isOpenComment') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="adviceFlag">
|
||||
<a-radio-group v-model="formInline.adviceFlag">
|
||||
<a-radio :value="1">
|
||||
{{ $t('yes') }}
|
||||
</a-radio>
|
||||
<a-radio :value="0">
|
||||
{{ $t('not') }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 部门联络人 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required" v-if="rules.contactUser[0].required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')">
|
||||
<a-form-model-item class="item-model" prop="adviceFlag">
|
||||
<a-radio-group v-model="formInline.adviceFlag">
|
||||
<a-radio :value="1">
|
||||
{{ $t('yes') }}
|
||||
</a-radio>
|
||||
<a-radio :value="0">
|
||||
{{ $t('not') }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 部门联络人 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required" v-if="rules.contactUser[0].required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')">
|
||||
{{ $t('workCenter.enStandardRevision.departmentalLiaison') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="contactUser">
|
||||
<user-selection v-model="formInline.contactUser"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departmentalLiaison')"
|
||||
:disabled="disabled"
|
||||
filedName="contactUser"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.contactUser_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="contactUser">
|
||||
<user-selection v-model="formInline.contactUser"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departmentalLiaison')"
|
||||
:disabled="disabled"
|
||||
filedName="contactUser"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.contactUser_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
@@ -123,7 +121,7 @@ export default {
|
||||
let data = {}
|
||||
await this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = Object.assign({}, this.formInline)
|
||||
data = Object.assign({}, this.formInline)
|
||||
} else {
|
||||
data = false
|
||||
}
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ export default {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
// 给表单赋值,在线编辑不知道要怎么赋值?
|
||||
this.formInline = Object.assign(data)
|
||||
this.formInline = Object.assign({}, data)
|
||||
// 给表单赋值
|
||||
this.$nextTick(() => {
|
||||
this.$refs.baseInfoForm.initData(data)
|
||||
|
||||
+5
-6
@@ -292,8 +292,8 @@ export default {
|
||||
initData (data) {
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
this.drafterDataSource = data.otherDraftUserVOS
|
||||
// this.dataSource =
|
||||
// this.formInline =
|
||||
this.dataSource = data.inspectContents || []
|
||||
this.formInline = Object.assign({}, data)
|
||||
// 给表单赋值
|
||||
this.$nextTick(() => {
|
||||
this.$refs.baseInfoForm.initData(data)
|
||||
@@ -302,9 +302,8 @@ export default {
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
data.formInline = this.formInline
|
||||
const data = Object.assign({}, this.formInline)
|
||||
data.inspectContents = this.dataSource || []
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
@@ -317,7 +316,7 @@ export default {
|
||||
// 每一个的整改部门都填了
|
||||
// 有数据可以抛出
|
||||
data = Object.assign({}, this.formInline)
|
||||
data.inspectContents = this.dataSource
|
||||
data.inspectContents = this.dataSource || []
|
||||
} else {
|
||||
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
|
||||
data = false
|
||||
|
||||
@@ -124,8 +124,8 @@ export default {
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
data.formInline = this.$refs.baseInfoForm.formInline
|
||||
data.otherDraftUserVOS = this.dataSource
|
||||
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.formInline)
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
|
||||
+3
-1
@@ -119,6 +119,8 @@ export default {
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出
|
||||
const data = {}
|
||||
data.otherDraftUserVOS = this.dataSource
|
||||
return this.dataSource
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
@@ -138,7 +140,7 @@ export default {
|
||||
this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseUploadStandard'))
|
||||
data = false
|
||||
} else {
|
||||
data.dataSource = this.dataSource
|
||||
data.otherDraftUserVOS = this.dataSource
|
||||
}
|
||||
} else {
|
||||
data = false
|
||||
|
||||
@@ -299,7 +299,17 @@ export default {
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.reviewMeetingDetails = this.dataSource
|
||||
const arr = []
|
||||
for (const item in this.dataSource) {
|
||||
if (item % 3 === 0 && this.dataSource[item].evaluateScore && this.dataSource[item].deductionScoreReason) {
|
||||
// 是有评分和扣分理由的行
|
||||
arr.push({
|
||||
...this.dataSource[item],
|
||||
evaluateItem: ((item % 3) + 1) + ''
|
||||
})
|
||||
}
|
||||
}
|
||||
data.reviewMeetingDetails = arr
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
|
||||
Reference in New Issue
Block a user