修改问题管理

This commit is contained in:
范强强
2023-10-22 11:08:59 +08:00
parent 8533d04f1f
commit 9fb9df65c2
6 changed files with 1139 additions and 486 deletions
+4
View File
@@ -2024,4 +2024,8 @@ module.exports = {
verificationTaskValidation: 'Verification task validation',
platformType: 'Platform Type',
extensionItems:'Extension Items',
problemPriority:'Problem Priority',
high:'High',
centre:'Centre',
low:'Low',
}
+4
View File
@@ -3980,4 +3980,8 @@ module.exports = {
verificationTaskValidation:'验证任务确认',
platformType:'平台件类型',
extensionItems:'扩展任务数量',
problemPriority:'问题优先级',
high:'高',
centre:'中',
low:'低',
}
@@ -1,36 +1,36 @@
<template>
<a-card :bordered="false">
<!-- <div class="table-operator" style="margin-bottom: 10px">-->
<!-- <div @click="versionStatisticsClick"-->
<!-- v-if="!this.$route.query.parentId && $t('Parametercollection')!= activeKey"-->
<!-- class="operator-text">-->
<!-- <a-icon type="plus"/>-->
<!-- {{$t('versionStatistics')}}-->
<!-- </div>-->
<!-- <div v-else-->
<!-- class="operator-text">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="table-operator" style="margin-bottom: 10px">-->
<!-- <div @click="versionStatisticsClick"-->
<!-- v-if="!this.$route.query.parentId && $t('Parametercollection')!= activeKey"-->
<!-- class="operator-text">-->
<!-- <a-icon type="plus"/>-->
<!-- {{$t('versionStatistics')}}-->
<!-- </div>-->
<!-- <div v-else-->
<!-- class="operator-text">-->
<!-- </div>-->
<!-- </div>-->
<a-tabs type="card" v-model="activeKey" @change="activeKeyChange" class="ant-tabs">
<a-tab-pane :key="$t('regulatoryComplianceManagement')" :tab="$t('regulatoryComplianceManagement')">
<regulatoryCompliance @currentStatus="currentStatus"
:idList="idList"
v-if="activeKey == $t('regulatoryComplianceManagement')"/>
:idList="idList"
v-if="activeKey == $t('regulatoryComplianceManagement')"/>
</a-tab-pane>
<a-tab-pane :key="$t('certificationActivityManagement')" :tab="$t('certificationActivityManagement')">
<certificationActivity @currentStatus="currentStatus" :idList="idList"
v-if="activeKey == $t('certificationActivityManagement')"/>
v-if="activeKey == $t('certificationActivityManagement')"/>
</a-tab-pane>
<a-tab-pane :key="$t('parameterCollectionProgressManagement')" :tab="$t('parameterCollectionProgressManagement')">
<parameterCollectionProgress @currentStatus="currentStatus" :idList="[]"
v-if="activeKey == $t('parameterCollectionProgressManagement')"/>
</a-tab-pane>
<a-tab-pane :key="$t('Problemanagement')" :tab="$t('Problemanagement')">
<nonConformance @currentStatus="currentStatus" v-if="activeKey == $t('Problemanagement')"/>
v-if="activeKey == $t('parameterCollectionProgressManagement')"/>
</a-tab-pane>
<a-tab-pane :key="$t('otastatus')" :tab="$t('otastatus')">
<otastatus @currentStatus="currentStatus" :idList="idList" v-if="activeKey == $t('otastatus')"/>
</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-card>
</template>
@@ -60,8 +60,8 @@
}
},
methods: {
activeKeyChange(){
this.$emit('projectStatusForm',this.activeKey)
activeKeyChange() {
this.$emit('projectStatusForm', this.activeKey)
},
currentStatus(item) {
this.$emit('currentStatus', item)
@@ -89,7 +89,8 @@
<style scoped>
@import '~@assets/less/common.less';
::v-deep .ant-card-body{
padding: 0 0 24px 0 ;
::v-deep .ant-card-body {
padding: 0 0 24px 0;
}
</style>
@@ -165,6 +165,17 @@
{{result.problemState ? result.problemState : ''}}
</span>
</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>{{result.flag== 'NEW'?result.problemType_dictText:result.problemType}}</span>-->
<!-- </span>-->
@@ -296,6 +307,14 @@
ellipsis: true,
scopedSlots: { customRender: 'CertificationProgress' }
},
{
title: this.$t('problemPriority'),
align: 'left',
dataIndex: 'problemPriority',
width: 120,
ellipsis: true,
scopedSlots: { customRender: 'problemPriority' }
},
{
title: this.$t('createTime'),
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>
File diff suppressed because it is too large Load Diff