布局问题知识库
This commit is contained in:
+408
@@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<div class="doc-detail">
|
||||
<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">
|
||||
<a-icon type="arrow-left" style="margin-right: 6px;"/>
|
||||
</span>
|
||||
{{$t('newlyAdded')}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 68px;background: #fff">
|
||||
<div class="detail-content" style="padding: 24px">
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<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-select :placeholder="$t('PleaseSelect')+$t('displayPermission')"
|
||||
@change="projectNameChange"
|
||||
v-model="formInline.projectNameId">
|
||||
<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}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<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">
|
||||
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('authorizedUser')}"
|
||||
:isSingleChoice="true"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.studioEngineerName"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<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-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.title"
|
||||
:placeholder="$t('PleaseEnter')+$t('title')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('category')">{{$t('category')}}</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('category')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'project_status'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('problemClassification')">{{$t('problemClassification')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="vehiclePlatform">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.vehiclePlatform"
|
||||
:placeholder="$t('PleaseEnter')+$t('problemClassification')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<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"
|
||||
:disabled="disabled"
|
||||
@input="handleInput('projectStatus')"
|
||||
:placeholder="$t('PleaseSelect')+$t('market')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'project_status'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('documentNumber')">{{$t('documentNumber')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="vehiclePlatform">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.vehiclePlatform"
|
||||
:placeholder="$t('PleaseEnter')+$t('documentNumber')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('documentTitle')">{{$t('documentTitle')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'digitalPlatform'">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.digitalPlatform"
|
||||
:placeholder="$t('PleaseEnter')+$t('documentTitle')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"></span>
|
||||
</div>
|
||||
<a-button class="box-button" type="primary" @click="bringInDocumentInformationClick">
|
||||
{{$t('bringInDocumentInformation')}}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24" style="height: 380px">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text">{{$t('content')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="vehiclePlatform">
|
||||
<quill-editor
|
||||
style="height: 300px"
|
||||
:content="formInline.content"
|
||||
:options="editorOption"
|
||||
@change="onEditorChange($event)"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('enclosure')">{{$t('enclosure')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload('enclosure')">
|
||||
{{ (formInline.enclosure === 'null' || formInline.enclosure === ''
|
||||
||
|
||||
formInline.enclosure == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
import 'quill/dist/quill.core.css'
|
||||
import 'quill/dist/quill.snow.css'
|
||||
import 'quill/dist/quill.bubble.css'
|
||||
import { quillEditor } from 'vue-quill-editor'
|
||||
|
||||
export default {
|
||||
name: 'problemKnowledgeBaseAdd',
|
||||
components: {
|
||||
PersonnelSelection,
|
||||
uploadFile,
|
||||
quillEditor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
rules: {},
|
||||
disabled: false,
|
||||
projectNameList: [],
|
||||
content: '<h2>I am Example</h2>',
|
||||
editorOption: {
|
||||
// Some Quill options...
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
editor() {
|
||||
return this.$refs.myQuillEditor.quill
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
|
||||
},
|
||||
methods: {
|
||||
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() {
|
||||
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 上传文件的回调 */
|
||||
uploadSuccess(data) {
|
||||
let attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.doc-detail {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
|
||||
.doc-detail-wrap {
|
||||
.doc-detail-header {
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
line-height: 68px;
|
||||
padding: 0 0 0 32px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px #eff1f3 solid;
|
||||
z-index: 1000;
|
||||
background: #fff;
|
||||
|
||||
.doc-detail-title {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
line-height: 68px;
|
||||
}
|
||||
|
||||
.doc-detail-right {
|
||||
width: 800px;
|
||||
line-height: 68px;
|
||||
display: flex;
|
||||
|
||||
.doc-detail-btn {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-box {
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
height: 80px;
|
||||
color: #000F16;
|
||||
line-height: 80px;
|
||||
}
|
||||
|
||||
.processBackground-text {
|
||||
font-size: 16px;
|
||||
color: #000F16;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.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: 48px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
height: 40px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
height: 38px;
|
||||
width: calc(100% - 100px);
|
||||
line-height: 38px;
|
||||
background: #fff;
|
||||
border: 1px #00B3BE solid;
|
||||
color: #00B3BE;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user