修改问题管理
This commit is contained in:
@@ -2024,4 +2024,8 @@ module.exports = {
|
|||||||
verificationTaskValidation: 'Verification task validation',
|
verificationTaskValidation: 'Verification task validation',
|
||||||
platformType: 'Platform Type',
|
platformType: 'Platform Type',
|
||||||
extensionItems:'Extension Items',
|
extensionItems:'Extension Items',
|
||||||
|
problemPriority:'Problem Priority',
|
||||||
|
high:'High',
|
||||||
|
centre:'Centre',
|
||||||
|
low:'Low',
|
||||||
}
|
}
|
||||||
@@ -3980,4 +3980,8 @@ module.exports = {
|
|||||||
verificationTaskValidation:'验证任务确认',
|
verificationTaskValidation:'验证任务确认',
|
||||||
platformType:'平台件类型',
|
platformType:'平台件类型',
|
||||||
extensionItems:'扩展任务数量',
|
extensionItems:'扩展任务数量',
|
||||||
|
problemPriority:'问题优先级',
|
||||||
|
high:'高',
|
||||||
|
centre:'中',
|
||||||
|
low:'低',
|
||||||
}
|
}
|
||||||
@@ -25,12 +25,12 @@
|
|||||||
<parameterCollectionProgress @currentStatus="currentStatus" :idList="[]"
|
<parameterCollectionProgress @currentStatus="currentStatus" :idList="[]"
|
||||||
v-if="activeKey == $t('parameterCollectionProgressManagement')"/>
|
v-if="activeKey == $t('parameterCollectionProgressManagement')"/>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane :key="$t('Problemanagement')" :tab="$t('Problemanagement')">
|
|
||||||
<nonConformance @currentStatus="currentStatus" v-if="activeKey == $t('Problemanagement')"/>
|
|
||||||
</a-tab-pane>
|
|
||||||
<a-tab-pane :key="$t('otastatus')" :tab="$t('otastatus')">
|
<a-tab-pane :key="$t('otastatus')" :tab="$t('otastatus')">
|
||||||
<otastatus @currentStatus="currentStatus" :idList="idList" v-if="activeKey == $t('otastatus')"/>
|
<otastatus @currentStatus="currentStatus" :idList="idList" v-if="activeKey == $t('otastatus')"/>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
<a-tab-pane :key="$t('Problemanagement')" :tab="$t('Problemanagement')">
|
||||||
|
<nonConformance @currentStatus="currentStatus" v-if="activeKey == $t('Problemanagement')"/>
|
||||||
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -89,6 +89,7 @@
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
::v-deep .ant-card-body {
|
::v-deep .ant-card-body {
|
||||||
padding: 0 0 24px 0;
|
padding: 0 0 24px 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,6 +165,17 @@
|
|||||||
{{result.problemState ? result.problemState : ''}}
|
{{result.problemState ? result.problemState : ''}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<span slot="problemPriority" slot-scope="text,result">
|
||||||
|
<span v-if="result.problemState == $t('red')">
|
||||||
|
{{$t('high')}}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="result.problemState == $t('yellow')">
|
||||||
|
{{$t('centre')}}
|
||||||
|
</span>
|
||||||
|
<span v-else-if="result.problemState == $t('green')">
|
||||||
|
{{$t('low')}}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
<!-- <span slot="problemType" slot-scope="text,result">-->
|
<!-- <span slot="problemType" slot-scope="text,result">-->
|
||||||
<!-- <span>{{result.flag== 'NEW'?result.problemType_dictText:result.problemType}}</span>-->
|
<!-- <span>{{result.flag== 'NEW'?result.problemType_dictText:result.problemType}}</span>-->
|
||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
@@ -296,6 +307,14 @@
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
scopedSlots: { customRender: 'CertificationProgress' }
|
scopedSlots: { customRender: 'CertificationProgress' }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('problemPriority'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'problemPriority',
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
scopedSlots: { customRender: 'problemPriority' }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('createTime'),
|
title: this.$t('createTime'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|||||||
@@ -0,0 +1,356 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-modal
|
||||||
|
:title="$t('progresstracking')"
|
||||||
|
:width="800"
|
||||||
|
:visible="visibletrack"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
:maskClosable="false"
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="Cancel"
|
||||||
|
>
|
||||||
|
<a-form-model :model="formInlinetracking" class="formAdd" :rules="rulestracking" ref="ruleFormtracking">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24" style="height: 417px">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('progresstracking')">
|
||||||
|
{{$t('progresstracking')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel itemModel-explain ql-snow"
|
||||||
|
style="height: 357px" prop="progressTracking">
|
||||||
|
<quill-editor
|
||||||
|
class="text-editor"
|
||||||
|
ref="myQuillEditorRef"
|
||||||
|
v-model="formInlinetracking.progressTracking"
|
||||||
|
:content="formInlinetracking.progressTracking"
|
||||||
|
style="height: 300px"
|
||||||
|
:options="editorOption"
|
||||||
|
@blur="quilleditorBlurTracking"
|
||||||
|
@change="onEditorChangeTracking($event)"
|
||||||
|
/>
|
||||||
|
<!-- <a-textarea :placeholder="$t('pleaseEnter')+$t('progresstracking')"-->
|
||||||
|
<!-- v-model="formInlinetracking.progressTracking"-->
|
||||||
|
<!-- style="width: 90%"-->
|
||||||
|
<!-- :maxLength="500"-->
|
||||||
|
<!-- :rows="4"/>-->
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-modal>
|
||||||
|
|
||||||
|
<a-upload
|
||||||
|
name="file"
|
||||||
|
id="iviewUp"
|
||||||
|
accept='.png,.jpg,.gif,.jpeg,.pjpeg,.pjp'
|
||||||
|
:multiple="false"
|
||||||
|
class="trackingUpload"
|
||||||
|
:action="uploadAction"
|
||||||
|
:headers="headers"
|
||||||
|
style="width: 0;display: none"
|
||||||
|
@change="handleChangeTracking"
|
||||||
|
>
|
||||||
|
</a-upload>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from 'axios'
|
||||||
|
import Vue from 'vue'
|
||||||
|
import 'quill/dist/quill.core.css'
|
||||||
|
import 'quill/dist/quill.snow.css'
|
||||||
|
import 'quill/dist/quill.bubble.css'
|
||||||
|
import { quillEditor } from 'vue-quill-editor'
|
||||||
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
|
||||||
|
const toolbarOptions = [
|
||||||
|
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
||||||
|
['blockquote', 'code-block'],
|
||||||
|
|
||||||
|
[{ 'header': 1 }, { 'header': 2 }], // custom button values
|
||||||
|
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
|
||||||
|
[{ 'script': 'sub' }, { 'script': 'super' }], // superscript/subscript
|
||||||
|
[{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent
|
||||||
|
[{ 'direction': 'rtl' }], // text direction
|
||||||
|
|
||||||
|
[{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
|
||||||
|
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
||||||
|
|
||||||
|
[{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
|
||||||
|
[{ 'font': [] }],
|
||||||
|
[{ 'align': [] }],
|
||||||
|
['link', 'image', 'video'],
|
||||||
|
['clean'] // remove formatting button
|
||||||
|
]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TrackingModel',
|
||||||
|
components: {
|
||||||
|
quillEditor
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
headers: {},
|
||||||
|
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
|
||||||
|
formInlinetracking: {},
|
||||||
|
editorOption: { // 富文本框配置
|
||||||
|
placeholder: '',
|
||||||
|
theme: 'snow', // or 'bubble'
|
||||||
|
modules: {
|
||||||
|
clipboard: {
|
||||||
|
// 粘贴版,处理粘贴时候带图片
|
||||||
|
matchers: [[Node.ELEMENT_NODE, this.handleCustomMatcher]]
|
||||||
|
},
|
||||||
|
toolbar: {
|
||||||
|
container: toolbarOptions, // 工具栏
|
||||||
|
handlers: {
|
||||||
|
'image': function(value) {
|
||||||
|
if (value) {
|
||||||
|
document.querySelector('.trackingUpload .ant-upload input').click()
|
||||||
|
} else {
|
||||||
|
this.quill.format('image', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
visibletrack: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
rulestracking: {
|
||||||
|
progressTracking: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('text') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||||
|
this.headers = { 'X-Access-Token': token }
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add() {
|
||||||
|
this.visibletrack = true
|
||||||
|
this.isDisplayIndex = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInlinetracking = {}
|
||||||
|
this.formInlinetracking = { ...this.formInlinetracking }
|
||||||
|
this.$refs.ruleFormtracking.clearValidate()
|
||||||
|
this.myQuillEditor()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onEditorChangeTracking({ quill, html, text }) {
|
||||||
|
this.formInlinetracking.progressTracking = html
|
||||||
|
},
|
||||||
|
quilleditorBlurTracking() {
|
||||||
|
this.$refs.ruleFormtracking.validateField('progressTracking')
|
||||||
|
},
|
||||||
|
handleCustomMatcher(node, Delta) {
|
||||||
|
let ops = []
|
||||||
|
Delta.ops.forEach(op => {
|
||||||
|
if (op.insert && typeof op.insert === 'string') {// 如果粘贴了图片,这里会是一个对象,如果是字符串则可以添加
|
||||||
|
ops.push({
|
||||||
|
insert: op.insert
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
Delta.ops = ops
|
||||||
|
return Delta
|
||||||
|
},
|
||||||
|
handleChangeTracking(info) {
|
||||||
|
let { file } = info
|
||||||
|
const status = info.file.status
|
||||||
|
if (status === 'done') {
|
||||||
|
let vm = this
|
||||||
|
let quill = this.$refs.myQuillEditorRef.quill
|
||||||
|
let length = quill.getSelection().index
|
||||||
|
let fileName = file.response.result.fileName
|
||||||
|
let index1 = fileName.lastIndexOf('.')
|
||||||
|
let index2 = fileName.length
|
||||||
|
let fileSuffix = fileName.substring(index1, index2)
|
||||||
|
// window._CONFIG['domianWebImgURL']
|
||||||
|
quill.insertEmbed(length, 'image', window._CONFIG['domianWebImgURL']+ '/sys/common/download/' + file.response.result.id + fileSuffix)
|
||||||
|
quill.setSelection(length + 1)
|
||||||
|
this.quillUpdateImg = false
|
||||||
|
} else if (status === 'uploading') {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
myQuillEditor() {
|
||||||
|
setTimeout(() => {
|
||||||
|
let quill = this.$refs.myQuillEditorRef.quill
|
||||||
|
this.$forceUpdate()
|
||||||
|
quill.root.addEventListener(
|
||||||
|
'paste',
|
||||||
|
(evt) => {
|
||||||
|
if (
|
||||||
|
evt.clipboardData &&
|
||||||
|
evt.clipboardData.files &&
|
||||||
|
evt.clipboardData.files.length
|
||||||
|
) {
|
||||||
|
evt.preventDefault();
|
||||||
|
[].forEach.call(evt.clipboardData.files, (file) => {
|
||||||
|
if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', file)
|
||||||
|
axios({
|
||||||
|
url: this.uploadAction,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data',
|
||||||
|
'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.data.success) {
|
||||||
|
let quill = this.$refs.myQuillEditorRef.quill
|
||||||
|
let length = quill.getSelection().index
|
||||||
|
let fileName = res.data.result.fileName
|
||||||
|
let index1 = fileName.lastIndexOf('.')
|
||||||
|
let index2 = fileName.length
|
||||||
|
let fileSuffix = fileName.substring(index1, index2)
|
||||||
|
// window._CONFIG['domianWebImgURL']
|
||||||
|
quill.insertEmbed(length, 'image', window._CONFIG['domianWebImgURL']+ '/sys/common/download/' + res.data.result.id)
|
||||||
|
quill.setSelection(length + 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
false
|
||||||
|
)
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
this.$refs.ruleFormtracking.validate(valid => {
|
||||||
|
if (valid){
|
||||||
|
this.$emit('TrackingModelForm',this.formInlinetracking.progressTracking)
|
||||||
|
this.visibletrack = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
Cancel() {
|
||||||
|
this.visibletrack = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.ant-select-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 100;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
height: 38px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-treenode-switcher-close {
|
||||||
|
width: 255px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-node-content-wrapper {
|
||||||
|
float: right;
|
||||||
|
margin-top: -2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-select-tree-title {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .itemModel-explain .ant-form-explain {
|
||||||
|
margin-top: 60px
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ql-snow .ql-picker {
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
v-model='formInline.psIssue'
|
v-model='formInline.psIssue'
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:placeholder="$t('PleaseEnter')+'PS-issue'"/>
|
:placeholder="$t('PleaseEnter')+'PS-issue'+$t('link')"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -176,11 +176,28 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="descriptions">
|
<a-form-model-item class="itemModel itemModel-explain ql-snow"
|
||||||
<a-input class="box-input"
|
prop="descriptions">
|
||||||
v-model='formInline.description'
|
<div style="width: calc(100% - 80px);display: inline-block">
|
||||||
:disabled="disabled"
|
<quill-editor
|
||||||
:placeholder="$t('PleaseEnter')+$t('descriptions')"/>
|
v-if="!isDescription"
|
||||||
|
class="text-editor"
|
||||||
|
ref="myQuillEditor"
|
||||||
|
@ready="onEditorReady($event)"
|
||||||
|
v-model="formInline.description"
|
||||||
|
:content="formInline.description"
|
||||||
|
style="height: 300px;"
|
||||||
|
:options="editorOption"
|
||||||
|
@blur="quilleditorBlur"
|
||||||
|
@change="onEditorChange($event)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span v-if="!isDescription" @click="putAwayClick" class="putAway">{{$t('putAway')}}</span>
|
||||||
|
<span v-if="isDescription" @click="putAwayClick" class="putAway">{{$t('open')}}</span>
|
||||||
|
<!-- <a-input class="box-input"-->
|
||||||
|
<!-- v-model='formInline.description'-->
|
||||||
|
<!-- :disabled="disabled"-->
|
||||||
|
<!-- :placeholder="$t('PleaseEnter')+$t('descriptions')"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -203,7 +220,9 @@
|
|||||||
<a-icon class="icon-text" @click="addClick(index)" style='margin-left: 10px;font-size: 18px;'
|
<a-icon class="icon-text" @click="addClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||||
v-if="formInline.fileLinkList.length - 1 == index"
|
v-if="formInline.fileLinkList.length - 1 == index"
|
||||||
type="plus"/>
|
type="plus"/>
|
||||||
<a-icon class="icon-text" v-if="formInline.fileLinkList.length > 1 && formInline.fileLinkList.length - 1 !== index" style='margin-left: 10px;font-size: 18px;'
|
<a-icon class="icon-text"
|
||||||
|
v-if="formInline.fileLinkList.length > 1 && formInline.fileLinkList.length - 1 !== index"
|
||||||
|
style='margin-left: 10px;font-size: 18px;'
|
||||||
@click="deleteClick(index)"
|
@click="deleteClick(index)"
|
||||||
type="minus"/>
|
type="minus"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -226,16 +245,34 @@
|
|||||||
:title="$t('progresstracking')">{{$t('progresstracking')}}</span>
|
:title="$t('progresstracking')">{{$t('progresstracking')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="progresstracking">
|
<a-form-model-item class="itemModel" prop="progresstracking">
|
||||||
<div v-for="(item,index) in formInline.progressTrackingList" :key="index">
|
<div style="width: 100%;display: flex;margin-bottom: 20px"
|
||||||
|
v-for="(item,index) in formInline.progressTrackingList" :key="index">
|
||||||
<!-- <span>{{item}}</span>-->
|
<!-- <span>{{item}}</span>-->
|
||||||
<a-input class="box-input"
|
<div style="width: calc(100% - 116px);display: inline-block">
|
||||||
style='width: 88%'
|
<quill-editor
|
||||||
v-model='item.progressTracking'
|
class="text-editor trackingClass"
|
||||||
|
ref="myQuillEditorRef"
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
:title='item.progressTracking'
|
v-if="!item.isDescription"
|
||||||
:placeholder="$t('PleaseEnter')+$t('progresstracking')"/>
|
v-model="item.progressTracking"
|
||||||
<a @click="addprogresstrackingClick(index)" style='margin-left: 10px' v-if="formInline.progressTrackingList.length - 1 == index">{{$t('newlyAdded')}}</a>
|
:content="item.progressTracking"
|
||||||
<a @click="deleteprogresstrackingClick(index,item)" v-if="formInline.progressTrackingList.length > 0" :disabled="disabled" style='margin-left: 10px' >{{$t('delete')}}</a>
|
style="width: 100%;height: 200px;display: inline-block"
|
||||||
|
:options="editorOption"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<!-- <a-input class="box-input"-->
|
||||||
|
<!-- style='width: 88%'-->
|
||||||
|
<!-- v-model='item.progressTracking'-->
|
||||||
|
<!-- :disabled="true"-->
|
||||||
|
<!-- :title='item.progressTracking'-->
|
||||||
|
<!-- :placeholder="$t('PleaseEnter')+$t('progresstracking')"/>-->
|
||||||
|
<a @click="addprogresstrackingClick(index)" style='margin-left: 10px'
|
||||||
|
v-if="formInline.progressTrackingList.length - 1 == index">{{$t('newlyAdded')}}</a>
|
||||||
|
<a @click="deleteprogresstrackingClick(index,item)"
|
||||||
|
v-if="formInline.progressTrackingList.length > 0" :disabled="disabled" style='margin-left: 10px'>{{$t('delete')}}</a>
|
||||||
|
|
||||||
|
<span v-if="!item.isDescription" @click="openClick(item)" class="putAway">{{$t('putAway')}}</span>
|
||||||
|
<span v-if="item.isDescription" @click="openClick(item)" class="putAway">{{$t('open')}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -249,11 +286,15 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('conculsion')">{{$t('conculsion')}}</span>
|
:title="$t('conculsion')">{{$t('conculsion')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" :prop="this.formInline.problemState == this.$t('green') ? 'conclusion' : ''">
|
<a-form-model-item class="itemModel"
|
||||||
<a-input class="box-input"
|
:prop="this.formInline.problemState == this.$t('green') ? 'conclusion' : ''">
|
||||||
v-model='formInline.conclusion'
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('conculsion')"
|
||||||
:disabled="disabled"
|
v-model="formInline.conclusion"
|
||||||
:placeholder="$t('PleaseEnter')+$t('conculsion')"/>
|
:rows="4"/>
|
||||||
|
<!-- <a-input class="box-input"-->
|
||||||
|
<!-- v-model='formInline.conclusion'-->
|
||||||
|
<!-- :disabled="disabled"-->
|
||||||
|
<!-- :placeholder="$t('PleaseEnter')+$t('conculsion')"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -276,7 +317,8 @@
|
|||||||
<a-icon class="icon-text" @click="addvidenceClick(index)" style='margin-left: 10px;font-size: 18px;'
|
<a-icon class="icon-text" @click="addvidenceClick(index)" style='margin-left: 10px;font-size: 18px;'
|
||||||
v-if="formInline.approvalEvidenceLinkList.length - 1 == index"
|
v-if="formInline.approvalEvidenceLinkList.length - 1 == index"
|
||||||
type="plus"/>
|
type="plus"/>
|
||||||
<a-icon class="icon-text" v-if="formInline.approvalEvidenceLinkList.length > 1 && formInline.approvalEvidenceLinkList.length - 1 !== index"
|
<a-icon class="icon-text"
|
||||||
|
v-if="formInline.approvalEvidenceLinkList.length > 1 && formInline.approvalEvidenceLinkList.length - 1 !== index"
|
||||||
style='margin-left: 10px;font-size: 18px;' @click="deletevidenceClick(index)"
|
style='margin-left: 10px;font-size: 18px;' @click="deletevidenceClick(index)"
|
||||||
type="minus" :disabled="disabled"/>
|
type="minus" :disabled="disabled"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -318,18 +360,41 @@
|
|||||||
{{$t('progresstracking')}}</span>
|
{{$t('progresstracking')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="progressTracking">
|
<a-form-model-item class="itemModel" prop="progressTracking">
|
||||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('progresstracking')"
|
<quill-editor
|
||||||
|
class="text-editor"
|
||||||
|
ref="myQuillEditor"
|
||||||
|
@ready="onEditorReady($event)"
|
||||||
v-model="formInlinetracking.progressTracking"
|
v-model="formInlinetracking.progressTracking"
|
||||||
style="width: 90%"
|
:content="formInlinetracking.progressTracking"
|
||||||
:maxLength="500"
|
style="height: 300px"
|
||||||
:rows="4"/>
|
:options="editorOption"
|
||||||
|
@blur="quilleditorBlur"
|
||||||
|
@change="onEditorChange($event)"
|
||||||
|
/>
|
||||||
|
<!-- <a-textarea :placeholder="$t('pleaseEnter')+$t('progresstracking')"-->
|
||||||
|
<!-- v-model="formInlinetracking.progressTracking"-->
|
||||||
|
<!-- style="width: 90%"-->
|
||||||
|
<!-- :maxLength="500"-->
|
||||||
|
<!-- :rows="4"/>-->
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<a-upload
|
||||||
|
name="file"
|
||||||
|
id="iviewUp"
|
||||||
|
accept='.png,.jpg,.gif,.jpeg,.pjpeg,.pjp'
|
||||||
|
:multiple="false"
|
||||||
|
:action="uploadAction"
|
||||||
|
:headers="headers"
|
||||||
|
style="width: 0;display: none"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
</a-upload>
|
||||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||||
|
<TrackingModel ref="TrackingModelRef" @TrackingModelForm="TrackingModelForm"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -339,12 +404,39 @@
|
|||||||
// import releaseStandard from './releaseStandard'
|
// import releaseStandard from './releaseStandard'
|
||||||
// import industryTemplate from './industryTemplate'
|
// import industryTemplate from './industryTemplate'
|
||||||
// import addModel from './a/ddModel'
|
// import addModel from './a/ddModel'
|
||||||
|
import 'quill/dist/quill.core.css'
|
||||||
|
import 'quill/dist/quill.snow.css'
|
||||||
|
import 'quill/dist/quill.bubble.css'
|
||||||
import Standardselection from '@/components/Standardselection/index'
|
import Standardselection from '@/components/Standardselection/index'
|
||||||
|
import TrackingModel from './TrackingModel'
|
||||||
import uploadFile from '@/components/uploadFile/file'
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
|
import { quillEditor } from 'vue-quill-editor'
|
||||||
import { getAction, postAction, putAction, downloadFile } from '@/api/manage'
|
import { getAction, postAction, putAction, downloadFile } from '@/api/manage'
|
||||||
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import axios from 'axios'
|
||||||
|
import Vue from 'vue'
|
||||||
|
|
||||||
|
const toolbarOptions = [
|
||||||
|
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
||||||
|
['blockquote', 'code-block'],
|
||||||
|
|
||||||
|
[{ 'header': 1 }, { 'header': 2 }], // custom button values
|
||||||
|
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
|
||||||
|
[{ 'script': 'sub' }, { 'script': 'super' }], // superscript/subscript
|
||||||
|
[{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent
|
||||||
|
[{ 'direction': 'rtl' }], // text direction
|
||||||
|
|
||||||
|
[{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
|
||||||
|
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
||||||
|
|
||||||
|
[{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
|
||||||
|
[{ 'font': [] }],
|
||||||
|
[{ 'align': [] }],
|
||||||
|
['link', 'image', 'video'],
|
||||||
|
['clean'] // remove formatting button
|
||||||
|
]
|
||||||
export default {
|
export default {
|
||||||
name: 'fillAdd',
|
name: 'fillAdd',
|
||||||
components: {
|
components: {
|
||||||
@@ -355,9 +447,33 @@ export default {
|
|||||||
// addModel
|
// addModel
|
||||||
Standardselection,
|
Standardselection,
|
||||||
uploadFile,
|
uploadFile,
|
||||||
|
quillEditor,
|
||||||
|
TrackingModel
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
editorOption: { // 富文本框配置
|
||||||
|
placeholder: '',
|
||||||
|
theme: 'snow', // or 'bubble'
|
||||||
|
modules: {
|
||||||
|
clipboard: {
|
||||||
|
// 粘贴版,处理粘贴时候带图片
|
||||||
|
matchers: [[Node.ELEMENT_NODE, this.handleCustomMatcher]]
|
||||||
|
},
|
||||||
|
toolbar: {
|
||||||
|
container: toolbarOptions, // 工具栏
|
||||||
|
handlers: {
|
||||||
|
'image': function(value) {
|
||||||
|
if (value) {
|
||||||
|
document.querySelector('.ant-upload input').click()
|
||||||
|
} else {
|
||||||
|
this.quill.format('image', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
{
|
{
|
||||||
@@ -379,7 +495,7 @@ export default {
|
|||||||
message: this.$t('conculsion') + this.$t('cannotEmpty'),
|
message: this.$t('conculsion') + this.$t('cannotEmpty'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
visibletrack: false,
|
visibletrack: false,
|
||||||
@@ -394,11 +510,13 @@ export default {
|
|||||||
},
|
},
|
||||||
formInline: {
|
formInline: {
|
||||||
fileLinkList: [{}],
|
fileLinkList: [{}],
|
||||||
progressTrackingList:[{}],
|
progressTrackingList: [{
|
||||||
|
isDescription:true,
|
||||||
|
}],
|
||||||
approvalEvidenceLinkList: [{}],
|
approvalEvidenceLinkList: [{}],
|
||||||
dutyTerritory: undefined,
|
dutyTerritory: undefined,
|
||||||
projectId: undefined,
|
projectId: undefined,
|
||||||
problemState:undefined,
|
problemState: undefined
|
||||||
},
|
},
|
||||||
data: {},
|
data: {},
|
||||||
formInlinetracking: {},
|
formInlinetracking: {},
|
||||||
@@ -409,7 +527,7 @@ export default {
|
|||||||
chapterContentsList: [],
|
chapterContentsList: [],
|
||||||
firstLevelDutyTerritoryList: [],
|
firstLevelDutyTerritoryList: [],
|
||||||
projectNameList: [],
|
projectNameList: [],
|
||||||
ProblemstateList:[this.$t('red'),this.$t('yellow'),this.$t('green'),],
|
ProblemstateList: [this.$t('red'), this.$t('yellow'), this.$t('green')],
|
||||||
templateDisabled: false,
|
templateDisabled: false,
|
||||||
contentTemplateList: [
|
contentTemplateList: [
|
||||||
{
|
{
|
||||||
@@ -435,11 +553,24 @@ export default {
|
|||||||
add: '/project/problemManagementEO/add',
|
add: '/project/problemManagementEO/add',
|
||||||
edit: '/project/problemManagementEO/edit',
|
edit: '/project/problemManagementEO/edit',
|
||||||
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
|
queryById: '/report/lawsMonthlyReportWriteEO/queryById'
|
||||||
}
|
},
|
||||||
|
isDisplayIndex: false,
|
||||||
|
headers: {},
|
||||||
|
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
|
||||||
|
isDescription: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||||
|
this.headers = { 'X-Access-Token': token }
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
editor() {
|
||||||
|
return this.$refs.myQuillEditor.quill
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// bringInStandardInformationClick() {
|
// bringInStandardInformationClick() {
|
||||||
@@ -477,7 +608,6 @@ export default {
|
|||||||
}
|
}
|
||||||
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||||
let text = this.userInfo().username + ' ' + time + ' ' + this.$t('Problemstate') + this.$t('by') + '\'' + this.problemState + '\'' + this.$t('Changeto') + '\'' + value + '\''
|
let text = this.userInfo().username + ' ' + time + ' ' + this.$t('Problemstate') + this.$t('by') + '\'' + this.problemState + '\'' + this.$t('Changeto') + '\'' + value + '\''
|
||||||
console.log(this.formInline.progressTrackingList[0])
|
|
||||||
if (JSON.stringify(this.formInline.progressTrackingList[0]) == '{}' || this.formInline.progressTrackingList[0].progressTracking == '') {
|
if (JSON.stringify(this.formInline.progressTrackingList[0]) == '{}' || this.formInline.progressTrackingList[0].progressTracking == '') {
|
||||||
this.formInline.progressTrackingList.forEach((item, index) => {
|
this.formInline.progressTrackingList.forEach((item, index) => {
|
||||||
item.progressTracking = text
|
item.progressTracking = text
|
||||||
@@ -527,9 +657,11 @@ export default {
|
|||||||
progressTrackingList: [{}],
|
progressTrackingList: [{}],
|
||||||
approvalEvidenceLinkList: [{}]
|
approvalEvidenceLinkList: [{}]
|
||||||
}
|
}
|
||||||
|
this.isDisplayIndex = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
this.$refs.ruleForm.clearValidate()
|
this.$refs.ruleForm.clearValidate()
|
||||||
|
this.myQuillEditor()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
edit(row) {
|
edit(row) {
|
||||||
@@ -561,7 +693,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.formInline.projectId = undefined
|
this.formInline.projectId = undefined
|
||||||
}
|
}
|
||||||
console.log(this.formInline)
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.templateDisabled = true
|
this.templateDisabled = true
|
||||||
@@ -585,12 +716,22 @@ export default {
|
|||||||
this.formInline.approvalEvidenceLinkList.splice(index, 1)
|
this.formInline.approvalEvidenceLinkList.splice(index, 1)
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
},
|
},
|
||||||
|
TrackingModelForm(row) {
|
||||||
|
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
let text = this.userInfo().username + ' ' + time + ' ' + row
|
||||||
|
this.formInline.progressTrackingList.forEach((item, index) => {
|
||||||
|
if (!item.progressTracking) {
|
||||||
|
this.formInline.progressTrackingList.splice(0, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.formInline.progressTrackingList.splice(this.index + 1, 1, { progressTracking: text })
|
||||||
|
},
|
||||||
addprogresstrackingClick(index) {
|
addprogresstrackingClick(index) {
|
||||||
this.index = index
|
this.index = index
|
||||||
this.formInlinetracking = {}
|
this.formInlinetracking = {}
|
||||||
this.visibletrack = true
|
this.$refs.TrackingModelRef.add()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.formInlinetracking = { ...this.formInlinetracking }
|
// this.formInlinetracking = { ...this.formInlinetracking }
|
||||||
this.isTrue = true
|
this.isTrue = true
|
||||||
this.$refs.ruleForm.clearValidate()
|
this.$refs.ruleForm.clearValidate()
|
||||||
})
|
})
|
||||||
@@ -614,13 +755,11 @@ export default {
|
|||||||
this.$refs.ruleFormtracking.clearValidate()
|
this.$refs.ruleFormtracking.clearValidate()
|
||||||
},
|
},
|
||||||
handleOk() {
|
handleOk() {
|
||||||
console.log(this.formInlinetracking)
|
|
||||||
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||||
this.$refs.ruleFormtracking.validate(valid => {
|
this.$refs.ruleFormtracking.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.progressTracking
|
let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.progressTracking
|
||||||
this.formInline.progressTrackingList.forEach((item, index) => {
|
this.formInline.progressTrackingList.forEach((item, index) => {
|
||||||
console.log(item.progressTracking)
|
|
||||||
if (!item.progressTracking) {
|
if (!item.progressTracking) {
|
||||||
this.formInline.progressTrackingList.splice(0, 1)
|
this.formInline.progressTrackingList.splice(0, 1)
|
||||||
}
|
}
|
||||||
@@ -701,7 +840,103 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
onEditorReady(quill) {
|
||||||
|
if (this.formInline.description) {
|
||||||
|
document.getElementsByClassName('ql-editor')[0].innerHTML = this.formInline.description
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onEditorChange({ quill, html, text }) {
|
||||||
|
this.formInline.description = html
|
||||||
|
},
|
||||||
|
quilleditorBlur() {
|
||||||
|
this.$refs.ruleForm.validateField('description')
|
||||||
|
},
|
||||||
|
handleCustomMatcher(node, Delta) {
|
||||||
|
let ops = []
|
||||||
|
Delta.ops.forEach(op => {
|
||||||
|
if (op.insert && typeof op.insert === 'string') {// 如果粘贴了图片,这里会是一个对象,如果是字符串则可以添加
|
||||||
|
ops.push({
|
||||||
|
insert: op.insert
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
Delta.ops = ops
|
||||||
|
return Delta
|
||||||
|
},
|
||||||
|
handleChange(info) {
|
||||||
|
let { file } = info
|
||||||
|
const status = info.file.status
|
||||||
|
if (status === 'done') {
|
||||||
|
let vm = this
|
||||||
|
let quill = this.$refs.myQuillEditor.quill
|
||||||
|
let length = quill.getSelection().index
|
||||||
|
let fileName = file.response.result.fileName
|
||||||
|
let index1 = fileName.lastIndexOf('.')
|
||||||
|
let index2 = fileName.length
|
||||||
|
let fileSuffix = fileName.substring(index1, index2)
|
||||||
|
quill.insertEmbed(length, 'image', window._CONFIG['domianWebImgURL'] + '/sys/common/download/' + file.response.result.id + fileSuffix)
|
||||||
|
quill.setSelection(length + 1)
|
||||||
|
this.quillUpdateImg = false
|
||||||
|
} else if (status === 'uploading') {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
myQuillEditor() {
|
||||||
|
setTimeout(() => {
|
||||||
|
let quill = this.$refs.myQuillEditor.quill
|
||||||
|
this.$forceUpdate()
|
||||||
|
quill.root.addEventListener(
|
||||||
|
'paste',
|
||||||
|
(evt) => {
|
||||||
|
if (
|
||||||
|
evt.clipboardData &&
|
||||||
|
evt.clipboardData.files &&
|
||||||
|
evt.clipboardData.files.length
|
||||||
|
) {
|
||||||
|
evt.preventDefault();
|
||||||
|
[].forEach.call(evt.clipboardData.files, (file) => {
|
||||||
|
if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', file)
|
||||||
|
axios({
|
||||||
|
url: this.uploadAction,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data',
|
||||||
|
'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.data.success) {
|
||||||
|
let quill = this.$refs.myQuillEditor.quill
|
||||||
|
let length = quill.getSelection().index
|
||||||
|
let fileName = res.data.result.fileName
|
||||||
|
let index1 = fileName.lastIndexOf('.')
|
||||||
|
let index2 = fileName.length
|
||||||
|
let fileSuffix = fileName.substring(index1, index2)
|
||||||
|
quill.insertEmbed(length, 'image', window._CONFIG['domianWebImgURL'] + '/sys/common/download/' + res.data.result.id + fileSuffix)
|
||||||
|
quill.setSelection(length + 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
false
|
||||||
|
)
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
putAwayClick() {
|
||||||
|
this.isDescription = !this.isDescription
|
||||||
|
},
|
||||||
|
openClick(item){
|
||||||
|
item.isDescription = !item.isDescription
|
||||||
|
this.formInline = {...this.formInline}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -803,4 +1038,38 @@ export default {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .itemModel-explain .ant-form-explain {
|
||||||
|
margin-top: 60px
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ql-snow .ql-picker {
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .trackingClass .ql-toolbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .trackingClass .ql-toolbar.ql-snow + .ql-container.ql-snow {
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .trackingClass .ql-container {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .itemModel-explain .ant-form-item-children {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.putAway {
|
||||||
|
margin-left: 10px;
|
||||||
|
color: #00B3BE;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .itemModel-explain .ql-container {
|
||||||
|
height: calc(100% - 100px);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user