修改禅道已知bug

This commit is contained in:
qq787203167
2022-08-18 10:23:24 +08:00
parent 6c192e4783
commit 3cf78ccaee
4 changed files with 406 additions and 60 deletions
@@ -93,6 +93,8 @@
v-else-if="formInline.contentTemplate == '2' && isTrue"/>
<releaseStandard :formInlineQuery="formInline" ref="releaseStandardRef" :disabled="disabled"
v-else-if="formInline.contentTemplate == '3' && isTrue"/>
<industryTemplate :formInlineQuery="formInline" ref="industryTemplateRef" :disabled="disabled"
v-else-if="formInline.contentTemplate == '4' && isTrue"/>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -109,6 +111,7 @@
import defaultTemplate from './defaultTemplate'
import solicitOpinions from './solicitOpinions'
import releaseStandard from './releaseStandard'
import industryTemplate from './industryTemplate'
import addModel from './addModel'
import { getAction, postAction, downloadFile } from '@/api/manage'
import moment from 'moment'
@@ -119,6 +122,7 @@
defaultTemplate,
solicitOpinions,
releaseStandard,
industryTemplate,
addModel
},
data() {
@@ -166,6 +170,10 @@
{
id: '3',
text: this.$t('NewReleasedStandardTemplate')
},
{
id: '4',
text: this.$t('industryInformationDynamicTemplate')
}
],
url: {
@@ -266,6 +274,8 @@
text = 'solicitOpinionsRef'
} else if (this.$refs.releaseStandardRef) {
text = 'releaseStandardRef'
}else if (this.$refs.industryTemplateRef) {
text = 'industryTemplateRef'
}
this.$refs[text].getData((val) => {
this.confirmLoading = true
@@ -0,0 +1,326 @@
<template>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('title')">{{$t('title')}}</span>
</div>
<a-form-model-item class="itemModel" prop="titleCn">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.titleCn"
:placeholder="$t('PleaseEnter')+$t('title')"/>
</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('englishTitle')">{{$t('englishTitle')}}</span>
</div>
<a-form-model-item class="itemModel" prop="titleEn">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.titleEn"
:placeholder="$t('PleaseEnter')+$t('englishTitle')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('relatedFields')">{{$t('relatedFields')}}</span>
</div>
<a-form-model-item class="itemModel" prop="relatedAreasCn">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.relatedAreasCn"
:placeholder="$t('PleaseEnter')+$t('relatedFields')"/>
</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('relatedFieldsEn')">{{$t('relatedFieldsEn')}}</span>
</div>
<a-form-model-item class="itemModel" prop="relatedAreasEn">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.relatedAreasEn"
:placeholder="$t('PleaseEnter')+$t('relatedFieldsEn')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('source')">{{$t('source')}}</span>
</div>
<a-form-model-item class="itemModel" prop="sourceCn">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.sourceCn"
:placeholder="$t('PleaseEnter')+$t('source')"/>
</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('sourceEn')">{{$t('sourceEn')}}</span>
</div>
<a-form-model-item class="itemModel" prop="sourceEn">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.sourceEn"
:placeholder="$t('PleaseEnter')+$t('sourceEn')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('date')">{{$t('date')}}</span>
</div>
<a-form-model-item class="itemModel" prop="time">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.time"
:placeholder="$t('PleaseEnter')+$t('date')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('primaryCoverageCn')">{{$t('primaryCoverageCn')}}</span>
</div>
<a-form-model-item class="itemModel" prop="contentCn">
<a-textarea
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('primaryCoverageCn')"
v-model.trim="formInline.contentCn" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('primaryCoverageEn')">{{$t('primaryCoverageEn')}}</span>
</div>
<a-form-model-item class="itemModel" prop="contentEn">
<a-textarea
:disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('primaryCoverageEn')"
v-model.trim="formInline.contentEn" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('link')">{{$t('link')}}</span>
</div>
<a-form-model-item class="itemModel" prop="link">
<a-input class="box-input"
:disabled="disabled"
v-model.trim="formInline.link"
:placeholder="$t('PleaseEnter')+$t('link')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</template>
<script>
import { mapGetters } from 'vuex'
import { getAction, postAction, downloadFile } from '@/api/manage'
export default {
name: 'industryTemplate',
props: ['formInlineQuery', 'disabled'],
data() {
return {
rules: {
titleCn: [
{
max: 500,
message: this.$t('title') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
trigger: 'blur'
}
],
titleEn: [
{
max: 500,
message: this.$t('englishTitle') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
trigger: 'blur'
}
],
relatedAreasEn: [
{
max: 100,
message: this.$t('relatedFieldsEn') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
relatedAreasCn: [
{
max: 100,
message: this.$t('relatedFields') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
sourceCn: [
{
max: 100,
message: this.$t('source') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
sourceEn: [
{
max: 100,
message: this.$t('sourceEn') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
time: [
{
max: 100,
message: this.$t('date') + 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'
}
],
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'
}
]
},
formInline: {},
CategoryTreeList: []
}
},
mounted() {
this.$nextTick(() => {
if (this.formInlineQuery.id) {
this.formInline = JSON.parse(JSON.stringify(this.formInlineQuery))
this.formInline = { ...this.formInline }
} else {
this.formInline = {}
this.formInline = { ...this.formInline }
}
})
},
methods: {
...mapGetters(['userInfo']),
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)
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
</style>