对接文档对比
This commit is contained in:
+216
-39
@@ -3,7 +3,7 @@
|
||||
<div class="doc-detail-wrap">
|
||||
<div class="doc-detail-header" style="position: fixed;top: 0">
|
||||
<div class="doc-detail-title">
|
||||
<span style="line-height: 66px;display: inline-block;float: left">
|
||||
<span style="line-height: 66px;display: inline-block;float: left;cursor: pointer" @click="backClick">
|
||||
<a-icon type="arrow-left" style="margin-right: 6px;"/>
|
||||
</span>
|
||||
{{$t('newlyAdded')}}
|
||||
@@ -19,28 +19,28 @@
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('displayPermission')">{{$t('displayPermission')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="projectNameId">
|
||||
<a-form-model-item class="itemModel" prop="showPermissions">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('displayPermission')"
|
||||
@change="projectNameChange"
|
||||
v-model="formInline.projectNameId">
|
||||
@change="showPermissionsChange"
|
||||
v-model="formInline.showPermissions">
|
||||
<a-select-option v-for="(item, key) in projectNameList"
|
||||
:key="key"
|
||||
:value="item.id">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
||||
{{ item.projectName}}
|
||||
: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>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-col :span="8" v-if="isDisplay">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('authorizedUser')">{{$t('authorizedUser')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="yearNameId">
|
||||
<a-form-model-item class="itemModel" prop="studioEngineerName">
|
||||
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('authorizedUser')}"
|
||||
:isSingleChoice="true"
|
||||
:personneQuery="formInline"
|
||||
@@ -57,7 +57,7 @@
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('title')">{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="title">
|
||||
<a-form-model-item class="itemModel" prop="title">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.title"
|
||||
@@ -72,13 +72,17 @@
|
||||
<span class="title-text-text"
|
||||
:title="$t('problemClassification')">{{$t('problemClassification')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="projectStatus">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
|
||||
:disabled="disabled"
|
||||
@input="handleInput('projectStatus')"
|
||||
:placeholder="$t('PleaseSelect')+$t('problemClassification')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'project_status'"/>
|
||||
<a-form-model-item class="itemModel" prop="problemType">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
|
||||
v-model="formInline.problemType">
|
||||
<a-select-option v-for="(item, key) in problemTypeList"
|
||||
:key="key"
|
||||
:value="item.id">
|
||||
<span style="display: inline-block;width: 100%" :title="item.problemLabel ">
|
||||
{{item.problemLabel}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -88,13 +92,13 @@
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('market')">{{$t('market')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="projectStatus">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
|
||||
<a-form-model-item class="itemModel" prop="targetMarket">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.targetMarket"
|
||||
:disabled="disabled"
|
||||
@input="handleInput('projectStatus')"
|
||||
@input="handleInput('targetMarket')"
|
||||
:placeholder="$t('PleaseSelect')+$t('market')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'project_status'"/>
|
||||
:triggerChange="false" :dictCode="'region'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -105,10 +109,10 @@
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('standardNo')">{{$t('standardNo')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="vehiclePlatform">
|
||||
<a-form-model-item class="itemModel" prop="standNumber">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.vehiclePlatform"
|
||||
:disabled="true"
|
||||
v-model="formInline.standNumber"
|
||||
:placeholder="$t('PleaseEnter')+$t('standardNo')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -150,10 +154,10 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('enclosure')">
|
||||
{{ (formInline.enclosure === 'null' || formInline.enclosure === ''
|
||||
@click="clickButtonToUpload('accessoryFile')">
|
||||
{{ (formInline.accessoryFile === 'null' || formInline.accessoryFile === ''
|
||||
||
|
||||
formInline.enclosure == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
formInline.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
@@ -161,9 +165,14 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<div class="submit-button">
|
||||
<a-button class="box-button" type="primary" @click="submit">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('pleaseWaitWhileRunning')}}</JLoading>
|
||||
<listAddModel ref="listAddModelRef" @listAddModelForm="listAddModelForm"/>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -175,6 +184,7 @@
|
||||
import 'quill/dist/quill.core.css'
|
||||
import 'quill/dist/quill.snow.css'
|
||||
import 'quill/dist/quill.bubble.css'
|
||||
import listAddModel from './listAddModel'
|
||||
import { quillEditor } from 'vue-quill-editor'
|
||||
|
||||
export default {
|
||||
@@ -182,14 +192,72 @@
|
||||
components: {
|
||||
PersonnelSelection,
|
||||
uploadFile,
|
||||
quillEditor
|
||||
quillEditor,
|
||||
listAddModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
rules: {},
|
||||
loading: false,
|
||||
problemTypeList: [],
|
||||
rules: {
|
||||
showPermissions: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('displayPermission') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
studioEngineerName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('authorizedUser') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
title: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('title') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('title') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
problemType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('problemClassification') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
targetMarket: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('market') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
url: {
|
||||
add: '/problemKnowledgeBase/problemKnowledgeBaseEO/add',
|
||||
edit: '/problemKnowledgeBase/problemKnowledgeBaseEO/edit'
|
||||
},
|
||||
isDisplay: false,
|
||||
disabled: false,
|
||||
projectNameList: [],
|
||||
projectNameList: [
|
||||
{
|
||||
value: 'Open',
|
||||
name: this.$t('OpenOne')
|
||||
},
|
||||
{
|
||||
value: 'Privacy',
|
||||
name: this.$t('Privacy')
|
||||
}
|
||||
],
|
||||
content: '<h2>I am Example</h2>',
|
||||
editorOption: {
|
||||
// Some Quill options...
|
||||
@@ -203,34 +271,92 @@
|
||||
},
|
||||
mounted() {
|
||||
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
|
||||
this.getBase()
|
||||
if (this.$route.query.id) {
|
||||
this.queryById()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getBase() {
|
||||
getAction('/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.problemTypeList = res.result || []
|
||||
} else {
|
||||
this.problemTypeList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
queryById() {
|
||||
let query = {
|
||||
id: this.$route.query.id
|
||||
}
|
||||
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.formInline = res.result || {}
|
||||
this.formInline = { ...this.formInline }
|
||||
if (this.formInline.showPermissions == 'Privacy'){
|
||||
this.isDisplay = true
|
||||
}else{
|
||||
this.isDisplay = false
|
||||
}
|
||||
} else {
|
||||
this.formInline = {}
|
||||
}
|
||||
})
|
||||
},
|
||||
backClick() {
|
||||
this.$router.push({
|
||||
path: '/problemknowledgeBase'
|
||||
})
|
||||
}
|
||||
,
|
||||
showPermissionsChange(event) {
|
||||
if (event == 'Open') {
|
||||
this.isDisplay = false
|
||||
} else {
|
||||
this.isDisplay = true
|
||||
}
|
||||
}
|
||||
,
|
||||
onEditorBlur(quill) {
|
||||
console.log('editor blur!', quill)
|
||||
},
|
||||
}
|
||||
,
|
||||
onEditorFocus(quill) {
|
||||
console.log('editor focus!', quill)
|
||||
},
|
||||
}
|
||||
,
|
||||
onEditorReady(quill) {
|
||||
console.log('editor ready!', quill)
|
||||
},
|
||||
}
|
||||
,
|
||||
onEditorChange({ quill, html, text }) {
|
||||
console.log('editor change!', quill, html, text)
|
||||
this.content = html
|
||||
},
|
||||
}
|
||||
,
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
}
|
||||
,
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
}
|
||||
,
|
||||
bringInDocumentInformationClick() {
|
||||
|
||||
},
|
||||
this.$refs.listAddModelRef.addModel(this.formInline)
|
||||
}
|
||||
,
|
||||
listAddModelForm(id, number) {
|
||||
this.formInline.standNumber = number
|
||||
this.formInline.bussDocumentLibraryId = id
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
,
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
@@ -242,7 +368,8 @@
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
,
|
||||
/** 上传文件的回调 */
|
||||
uploadSuccess(data) {
|
||||
let attIdList = []
|
||||
@@ -255,6 +382,47 @@
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
,
|
||||
submit() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
this.loading = true
|
||||
this.confirmLoading = true
|
||||
let url = ''
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
} else {
|
||||
url = this.url.add
|
||||
}
|
||||
formInline.permissionUserList = []
|
||||
if (formInline.showPermissions == 'Privacy') {
|
||||
let studioEngineer = formInline.studioEngineer.split(',')
|
||||
studioEngineer.forEach(res => {
|
||||
formInline.permissionUserList.push({
|
||||
userId: res
|
||||
})
|
||||
})
|
||||
}
|
||||
postAction(url, formInline).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loading = false
|
||||
if (this.$route.query.id) {
|
||||
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: '/problemknowledgeBase'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -381,4 +549,13 @@
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
text-align: right;
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user