对接法规月报

This commit is contained in:
qq787203167
2022-07-04 15:31:32 +08:00
parent c9057a5370
commit a71e10b794
8 changed files with 374 additions and 125 deletions
+3
View File
@@ -1075,4 +1075,7 @@ module.exports = {
TheEngineerAndCertification:'The regulatory engineer and Certification Engineer of cannot be empty',
bringInTheProjectInterface:'Bring in the project interface',
theCurrentListSaved:'The current list data has been submitted and cannot be temporarily saved',
defaultTemplate:'Default template',
newRequestCommentListTemplate:'New request for comment list template',
NewReleasedStandardTemplate:'New released standard template',
}
+3
View File
@@ -1079,4 +1079,7 @@ module.exports = {
requiredParametersEmpty:'必填参数不能为空',
bringInTheProjectInterface:'带入工程接口人',
theCurrentListSaved:'当前列表数据已全部提交无法进行暂存',
defaultTemplate:'默认模板',
newRequestCommentListTemplate:'新征求意见清单模板',
NewReleasedStandardTemplate:'新发布标准模板',
}
@@ -90,7 +90,8 @@
return {
//url传参严格按照当前命名
url: {
deleteBatch: ''
deleteBatch: '/report/lawsMonthlyReportWriteEO/deleteBatch',
list:'/report/lawsMonthlyReportWriteEO/page',
},
loading: false,
dataSource: [],
@@ -103,7 +104,7 @@
{
title: this.$t('chapterContents'),
align: 'center',
dataIndex: 'chapterContents',
dataIndex: 'memoriesChapterName',
width: 170
},
{
@@ -124,21 +125,21 @@
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'regulatoryContact'
dataIndex: 'lawsContact'
},
{
title: this.$t('completedBy'),
align: 'center',
ellipsis: true,
width: 170,
dataIndex: 'completedBy'
dataIndex: 'createBy'
},
{
title: this.$t('exportStatus'),
align: 'center',
ellipsis: true,
width: 170,
dataIndex: 'exportStatus'
dataIndex: 'exportStateName'
},
{
title: this.$t('operation'),
@@ -183,7 +184,26 @@
this.getList()
},
getList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
this.getList()
return
}
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
monthlyTitleTemplateClick() {
this.$refs.fillTableRef.getData()
@@ -7,10 +7,10 @@
<span class="title-text-text"
:title="$t('title')">{{$t('title')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="titleCn">
<a-input class="box-input"
:disabled="false"
v-model="formInline.title"
v-model="formInline.titleCn"
:placeholder="$t('PleaseEnter')+$t('title')"/>
</a-form-model-item>
</div>
@@ -21,10 +21,10 @@
<span class="title-text-text"
:title="$t('englishTitle')">{{$t('englishTitle')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="titleEn">
<a-input class="box-input"
:disabled="false"
v-model="formInline.englishTitle"
v-model="formInline.titleEn"
:placeholder="$t('PleaseEnter')+$t('englishTitle')"/>
</a-form-model-item>
</div>
@@ -59,7 +59,7 @@
:title="$t('vehicleType')">{{$t('vehicleType')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input" v-model="formInline.vehicleType"
<j-multi-select-tag class="box-input" v-model="formInline.applyCar"
:placeholder="$t('PleaseSelect')+$t('vehicleType')"
:type="'select'"
:triggerChange="false" :dictCode="'car_type'"/>
@@ -75,7 +75,7 @@
:title="$t('scopeOfApplication')">{{$t('scopeOfApplication')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input" v-model="formInline.shi4_yong4_fan4_wei2"
<j-multi-select-tag class="box-input" v-model="formInline.applyScope"
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
:type="'select'"
:triggerChange="false" :dictCode="'apply_scope'"/>
@@ -89,7 +89,7 @@
:title="$t('status')">{{$t('status')}}</span>
</div>
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" v-model="formInline.status"
<j-dict-select-tag class="box-input" v-model="formInline.state"
@input="handleInput('status')"
:placeholder="$t('PleaseSelect')+$t('status')"
:type="'select'"
@@ -106,11 +106,11 @@
:title="$t('usage')">{{$t('usage')}}</span>
</div>
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" v-model="formInline.usage"
<j-dict-select-tag class="box-input" v-model="formInline.useMethod"
@input="handleInput('usage')"
:placeholder="$t('PleaseSelect')+$t('usage')"
:type="'select'"
:triggerChange="false" :dictCode="'usage'"/>
:triggerChange="false" :dictCode="'yong4_fa3'"/>
</a-form-model-item>
</div>
</a-col>
@@ -120,10 +120,10 @@
<span class="title-text-text"
:title="$t('implementationModel')">{{$t('implementationModel')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="implementCar">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.implementationModel"
v-model="formInline.implementCar"
:placeholder="$t('PleaseEnter')+$t('implementationModel')"/>
</a-form-model-item>
</div>
@@ -136,10 +136,10 @@
<span class="title-text-text"
:title="$t('releaseDate')">{{$t('releaseDate')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="issueTime">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.releaseDate"
v-model="formInline.issueTime"
:placeholder="$t('PleaseEnter')+$t('releaseDate')"/>
</a-form-model-item>
</div>
@@ -150,10 +150,10 @@
<span class="title-text-text"
:title="$t('ImplementationDate')">{{$t('ImplementationDate')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="newCarImplementTime">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.ImplementationDate"
v-model="formInline.newCarImplementTime"
:placeholder="$t('PleaseEnter')+$t('ImplementationDate')"/>
</a-form-model-item>
</div>
@@ -166,10 +166,10 @@
<span class="title-text-text"
:title="$t('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="productionCarImplementTime">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.vehicleInProductionDate"
v-model="formInline.productionCarImplementTime"
:placeholder="$t('PleaseEnter')+$t('vehicleInProductionDate')"/>
</a-form-model-item>
</div>
@@ -181,10 +181,10 @@
<div class="title-text">
<span class="title-text-text" :title="$t('primaryCoverageCn')">{{$t('primaryCoverageCn')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="contentCn">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('primaryCoverageCn')"
v-model.trim="formInline.useExplain" :rows="4"/>
v-model.trim="formInline.contentCn" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
@@ -195,10 +195,10 @@
<div class="title-text">
<span class="title-text-text" :title="$t('primaryCoverageEn')">{{$t('primaryCoverageEn')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="contentEn">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('primaryCoverageEn')"
v-model.trim="formInline.useExplain" :rows="4"/>
v-model.trim="formInline.contentEn" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
@@ -209,10 +209,10 @@
<div class="title-text">
<span class="title-text-text" :title="$t('workProgressCn')">{{$t('workProgressCn')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="workProgressCn">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('workProgressCn')"
v-model.trim="formInline.useExplain" :rows="4"/>
v-model.trim="formInline.workProgressCn" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
@@ -223,10 +223,10 @@
<div class="title-text">
<span class="title-text-text" :title="$t('workProgressEn')">{{$t('workProgressEn')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="workProgressEn">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('workProgressEn')"
v-model.trim="formInline.useExplain" :rows="4"/>
v-model.trim="formInline.workProgressEn" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
@@ -238,10 +238,11 @@
<span class="title-text-text" :title="$t('regulatoryContact')">{{$t('regulatoryContact')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-input class="box-input"
:disabled="false"
v-model="formInline.regulatoryContact"
:placeholder="$t('PleaseEnter')+$t('regulatoryContact')"/>
<PersonnelSelection
:query="{db_field_name:'lawsContact',db_field_txt:$t('regulatoryContact')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.lawsContactName"/>
</a-form-model-item>
</div>
</a-col>
@@ -252,7 +253,7 @@
<div class="title-text">
<span class="title-text-text" :title="$t('link')">{{$t('link')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="link">
<a-input class="box-input"
:disabled="false"
v-model="formInline.link"
@@ -265,32 +266,93 @@
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { mapGetters } from 'vuex'
import { getAction, postAction, downloadFile } from '@/api/manage'
export default {
name: 'defaultTemplate',
props: ['formInlineQuery'],
components: {
PersonnelSelection
},
data() {
return {
rules: {
name: [
{
required: true,
message: this.$t('VirtualListName') + this.$t('cannotEmpty'),
trigger: 'blur'
},
titleCn: [
{
max: 100,
message: this.$t('VirtualListName') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
message: this.$t('title') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
useExplain: [
titleEn: [
{
required: true,
message: this.$t('instructionForUse') + this.$t('cannotEmpty'),
max: 100,
message: this.$t('englishTitle') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
},
}
],
productionCarImplementTime: [
{
max: 500,
message: this.$t('instructionForUse') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
max: 100,
message: this.$t('vehicleInProductionDate') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
newCarImplementTime: [
{
max: 100,
message: this.$t('ImplementationDate') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
issueTime: [
{
max: 100,
message: this.$t('releaseDate') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
implementCar: [
{
max: 100,
message: this.$t('implementationModel') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
link: [
{
max: 100,
message: this.$t('link') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
workProgressEn: [
{
max: 300,
message: this.$t('workProgressEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
workProgressCn: [
{
max: 300,
message: this.$t('workProgressEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
contentEn: [
{
max: 300,
message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
contentCn: [
{
max: 300,
message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
@@ -301,14 +363,55 @@
}
},
mounted() {
this.getSysCategoryTree()
this.$nextTick(() => {
if (this.formInlineQuery.id) {
this.formInline = JSON.parse(JSON.stringify(this.formInlineQuery))
if(this.formInline.technologyTerritory){
this.formInline.technologyTerritory = this.formInline.technologyTerritory.split(',')
}
this.formInline = { ...this.formInline }
} else {
this.formInline = {}
this.formInline.lawsContactName = this.userInfo().username
this.formInline.lawsContact = this.userInfo().id
this.formInline = { ...this.formInline }
}
})
},
methods: {
...mapGetters(['userInfo']),
getSysCategoryTree() {
getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
if (res.success) {
this.CategoryTreeList = res.result
} else {
this.CategoryTreeList = []
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
getData(callback) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let formInline = JSON.parse(JSON.stringify(this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
callback && callback(formInline)
}
})
}
}
}
@@ -15,12 +15,13 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('fillInTheMonth')">{{$t('fillInTheMonth')}}</span>
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('fillInTheMonth')">{{$t('fillInTheMonth')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="month">
<a-month-picker class="box-input"
v-model="formInline.fillInTheMonth"
v-model="formInline.month"
:placeholder="$t('fillInTheMonth')"/>
</a-form-model-item>
</div>
@@ -35,34 +36,33 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('chapterContents')">{{$t('chapterContents')}}</span>
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('chapterContents')">{{$t('chapterContents')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select :placeholder="$t('PleaseSelect')+$t('chapterContents')"
:disabled="disabled"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="formInline.chapterContents">
<a-select-option v-for="(item, key) in chapterContentsList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<a-form-model-item class="itemModel-multi" prop="memoriesChapter">
<a-tree-select
tree-node-filter-prop="title"
v-model="formInline.memoriesChapter"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="chapterContentsList"
tree-checkable
:placeholder="$t('PleaseSelect')+$t('chapterContents')"
/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('contentTemplate')">{{$t('contentTemplate')}}</span>
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('contentTemplate')">{{$t('contentTemplate')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel" prop="contentTemplate">
<a-select :placeholder="$t('PleaseSelect')+$t('contentTemplate')"
:disabled="disabled"
class="box-input"
@@ -81,9 +81,12 @@
</div>
</a-col>
</a-row>
<defaultTemplate v-if="formInline.contentTemplate == 1"/>
<solicitOpinions v-else-if="formInline.contentTemplate == 2"/>
<releaseStandard v-else-if="formInline.contentTemplate == 3"/>
<defaultTemplate :formInlineQuery="formInline" ref="defaultTemplateRef"
v-if="formInline.contentTemplate == '1'"/>
<solicitOpinions :formInlineQuery="formInline " ref="solicitOpinionsRef"
v-else-if="formInline.contentTemplate == '2'"/>
<releaseStandard :formInlineQuery="formInline" ref="releaseStandardRef"
v-else-if="formInline.contentTemplate == '3'"/>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -98,6 +101,7 @@
import defaultTemplate from './defaultTemplate'
import solicitOpinions from './solicitOpinions'
import releaseStandard from './releaseStandard'
import { getAction, postAction, downloadFile } from '@/api/manage'
export default {
name: 'fillAdd',
@@ -109,28 +113,25 @@
data() {
return {
rules: {
name: [
month: [
{
required: true,
message: this.$t('VirtualListName') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('VirtualListName') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
message: this.$t('fillInTheMonth') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
useExplain: [
memoriesChapter: [
{
required: true,
message: this.$t('instructionForUse') + this.$t('cannotEmpty'),
trigger: 'blur'
},
message: this.$t('chapterContents') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
contentTemplate: [
{
max: 500,
message: this.$t('instructionForUse') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
trigger: 'blur'
required: true,
message: this.$t('contentTemplate') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
@@ -142,40 +143,66 @@
chapterContentsList: [],
contentTemplateList: [
{
id: 1,
text: '默认模板'
id: '1',
text: this.$t('defaultTemplate')
},
{
id: 2,
text: '新征求意见清单模板'
id: '2',
text: this.$t('newRequestCommentListTemplate')
},
{
id: 3,
text: '新发布标准模板'
id: '3',
text: this.$t('NewReleasedStandardTemplate')
}
]
],
url: {
add: '/report/lawsMonthlyReportWriteEO/add',
edit: '/report/lawsMonthlyReportWriteEO/edit',
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
}
}
},
mounted() {
},
methods: {
getTree() {
let query = {
pageNo: this.pageNo,
pageSize: 1000
}
getAction('/report/lawsMonthlyReportTitleTemplateEO/page', query).then((res) => {
if (res.success) {
this.chapterContentsList = res.result.records || []
this.chapterContentsList.forEach(res => {
})
} else {
this.chapterContentsList = []
}
})
},
add() {
this.getTree()
this.title = this.$t('addContent')
this.visible = true
this.disabled = false
this.$nextTick(() => {
this.formInline = {}
this.formInline.contentTemplate = 1
this.formInline.contentTemplate = '1'
this.formInline = { ...this.formInline }
this.$refs.ruleForm.clearValidate()
})
},
edit(row) {
this.getTree()
this.title = this.$t('editContent')
this.visible = true
this.disabled = false
this.$nextTick(() => {
this.formInline = row
if (this.formInline.memoriesChapter) {
this.formInline.memoriesChapter = this.formInline.memoriesChapter.split(',')
}
this.$refs.ruleForm.clearValidate()
})
},
@@ -192,7 +219,50 @@
this.visible = false
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let text = ''
if (this.$refs.defaultTemplateRef) {
text = 'defaultTemplateRef'
} else if (this.$refs.solicitOpinionsRef) {
text = 'solicitOpinionsRef'
} else if (this.$refs.releaseStandardRef) {
text = 'releaseStandardRef'
}
this.$refs[text].getData((val) => {
this.confirmLoading = true
let url = ''
if (this.formInline.id) {
url = this.url.edit
} else {
url = this.url.add
}
let formInline = JSON.parse(JSON.stringify(this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
let query = Object.assign(val, {
month: formInline.month,
memoriesChapter: formInline.memoriesChapter,
contentTemplate: formInline.contentTemplate
})
postAction(url, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('fillTableAddForm')
} else {
this.confirmLoading = false
this.$message.warning(this.$t('operationFailed'))
}
})
})
}
})
}
}
}
@@ -53,8 +53,8 @@
<a-select-option v-for="(item, key) in ParentList"
:key="item.id"
:value="item.id">
<span style="display: inline-block;width: 100%" :title="item.title ">
{{ item.title }}
<span style="display: inline-block;width: 100%" :title="item.titleCn ">
{{ item.titleCn }}
</span>
</a-select-option>
</a-select>
@@ -21,7 +21,7 @@
<a-form-model-item class="itemModel" prop="standardNo">
<a-input class="box-input"
:disabled="false"
v-model="formInline.standardNo"
v-model="formInline.standardNumber"
:placeholder="$t('PleaseEnter')+$t('standardNo')"/>
</a-form-model-item>
</div>
@@ -63,10 +63,10 @@
<a-form-model-item class="itemModel">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('releaseDate')"
@change="dateChange('releaseDate')"
@change="dateChange('issueTime',index)"
:getCalendarContainer="(trigger) => trigger.parentNode"
format="YYYY-MM-DD"
v-model="formInline['releaseDate']"
v-model="formInline['issueTime']"
:disabled="disabled"
style="width: 100%"/>
</a-form-model-item>
@@ -82,10 +82,10 @@
<a-form-model-item class="itemModel">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('implemenDate')"
@change="dateChange('implemenDate')"
@change="dateChange('implementTime',index)"
:getCalendarContainer="(trigger) => trigger.parentNode"
format="YYYY-MM-DD"
v-model="formInline['implemenDate']"
v-model="formInline['implementTime']"
:disabled="disabled"
style="width: 100%"/>
</a-form-model-item>
@@ -101,19 +101,34 @@
export default {
name: 'releaseStandard',
props:['formInlineQuery'],
data() {
return {
rules: {},
formInline: {},
CategoryTreeList: [],
disabled: false,
dataList: [
{ id: 1 }
]
dataList: []
}
},
mounted() {
this.$nextTick(() => {
if (this.formInlineQuery.id) {
this.formInline = JSON.parse(JSON.stringify(this.formInlineQuery))
this.formInline = { ...this.formInline }
} else {
this.dataList = [
{
standardNumber: '',
standardNameCn: '',
standardNameEn: '',
issueTime: '',
implementTime:'',
}
]
this.dataList = [...this.dataList]
}
})
},
methods: {
handleInput(value) {
@@ -124,7 +139,11 @@
},
addData() {
this.dataList.push({
id: 2
standardNumber: '',
standardNameCn: '',
standardNameEn: '',
issueTime: '',
implementTime:'',
})
this.dataList = [...this.dataList]
},
@@ -133,7 +152,14 @@
this.dataList = [...this.dataList]
},
dateChange(item) {
this.formInline[item] = this.formInline[item] ? moment(this.formInline[item]).format('YYYY-MM-DD') : ''
this.dataList[index][item] = this.dataList[index][item] ? moment(this.dataList[index][item]).format('YYYY-MM-DD') : ''
},
getData(callback) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
callback && callback(this.formInline)
}
})
}
}
}
@@ -21,7 +21,7 @@
<a-form-model-item class="itemModel" prop="planNoChinese">
<a-input class="box-input"
:disabled="false"
v-model="formInline.planNoChinese"
v-model="item.planNumberCn"
:placeholder="$t('PleaseEnter')+$t('planNoChinese')"/>
</a-form-model-item>
</div>
@@ -35,7 +35,7 @@
<a-form-model-item class="itemModel" prop="standardNameCn">
<a-input class="box-input"
:disabled="false"
v-model="formInline.standardNameCn"
v-model="item.standardNameCn"
:placeholder="$t('PleaseEnter')+$t('standardNameCn')"/>
</a-form-model-item>
</div>
@@ -50,7 +50,7 @@
<a-form-model-item class="itemModel">
<a-input class="box-input"
:disabled="false"
v-model="formInline.standardNameEn"
v-model="item.standardNameEn"
:placeholder="$t('PleaseEnter')+$t('standardNameEn')"/>
</a-form-model-item>
</div>
@@ -63,10 +63,10 @@
<a-form-model-item class="itemModel">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('deadlineForComments')"
@change="dateChange('deadlineForComments')"
@change="dateChange('expirationDate',index)"
:getCalendarContainer="(trigger) => trigger.parentNode"
format="YYYY-MM-DD"
v-model="formInline['deadlineForComments']"
v-model="item['expirationDate']"
:disabled="disabled"
style="width: 100%"/>
</a-form-model-item>
@@ -82,19 +82,33 @@
export default {
name: 'solicitOpinions',
props: ['formInlineQuery'],
data() {
return {
rules: {},
formInline: {},
CategoryTreeList: [],
disabled: false,
dataList: [
{ id: 1 }
]
dataList: []
}
},
mounted() {
this.$nextTick(() => {
if (this.formInlineQuery.id) {
this.formInline = JSON.parse(JSON.stringify(this.formInlineQuery))
this.formInline = { ...this.formInline }
} else {
this.dataList = [
{
planNumberCn: '',
standardNameCn: '',
standardNameEn: '',
expirationDate: ''
}
]
this.dataList = [...this.dataList]
}
})
},
methods: {
handleInput(value) {
@@ -105,7 +119,10 @@
},
addData() {
this.dataList.push({
id: 2
planNumberCn: '',
standardNameCn: '',
standardNameEn: '',
expirationDate: ''
})
this.dataList = [...this.dataList]
},
@@ -113,8 +130,15 @@
this.dataList.pop()
this.dataList = [...this.dataList]
},
dateChange(item) {
this.formInline[item] = this.formInline[item] ? moment(this.formInline[item]).format('YYYY-MM-DD') : ''
dateChange(item, index) {
this.dataList[index][item] = this.dataList[index][item] ? moment(this.dataList[index][item]).format('YYYY-MM-DD') : ''
},
getData(callback) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
callback && callback(this.formInline)
}
})
}
}
}