修改项目库平台件
This commit is contained in:
@@ -338,7 +338,8 @@
|
|||||||
<!-- :options="editorOption"-->
|
<!-- :options="editorOption"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<div class="text-box" v-if="!item.isDescription">
|
<div class="text-box" v-if="!item.isDescription">
|
||||||
<div class="text-box-index-text-top" v-html="item.progressTracking"></div>
|
<div class="text-box-index-text-top" @click="progressTrackingOpenClick($event)"
|
||||||
|
v-html="item.progressTracking"></div>
|
||||||
<div class="text-box-index-text-right">
|
<div class="text-box-index-text-right">
|
||||||
<div class="text-box-index-text-right-text" @click="openClick(item)">
|
<div class="text-box-index-text-right-text" @click="openClick(item)">
|
||||||
<img src="../../../../assets/progressExit.png" alt="">
|
<img src="../../../../assets/progressExit.png" alt="">
|
||||||
@@ -463,47 +464,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<!-- <addModel ref="addModelRef" @addModelForm="addModelForm"/>-->
|
<!-- <addModel ref="addModelRef" @addModelForm="addModelForm"/>-->
|
||||||
<a-modal
|
|
||||||
:title="$t('progresstracking')"
|
|
||||||
:width="600"
|
|
||||||
: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">
|
|
||||||
<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" prop="progressTracking">
|
|
||||||
<quill-editor
|
|
||||||
class="text-editor"
|
|
||||||
ref="myQuillEditor"
|
|
||||||
@ready="onEditorReady($event)"
|
|
||||||
v-model="formInlinetracking.progressTracking"
|
|
||||||
:content="formInlinetracking.progressTracking"
|
|
||||||
style="height: 300px"
|
|
||||||
: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>
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form-model>
|
|
||||||
</a-modal>
|
|
||||||
<a-upload
|
<a-upload
|
||||||
name="file"
|
name="file"
|
||||||
id="iviewUp"
|
id="iviewUp"
|
||||||
@@ -517,6 +477,7 @@
|
|||||||
</a-upload>
|
</a-upload>
|
||||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||||
<TrackingModel ref="TrackingModelRef" @TrackingModelForm="TrackingModelForm"/>
|
<TrackingModel ref="TrackingModelRef" @TrackingModelForm="TrackingModelForm"/>
|
||||||
|
<viewImg ref="viewImgRef"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -530,6 +491,7 @@
|
|||||||
import 'quill/dist/quill.snow.css'
|
import 'quill/dist/quill.snow.css'
|
||||||
import 'quill/dist/quill.bubble.css'
|
import 'quill/dist/quill.bubble.css'
|
||||||
import Standardselection from '@/components/Standardselection/index'
|
import Standardselection from '@/components/Standardselection/index'
|
||||||
|
import viewImg from './viewImg'
|
||||||
import TrackingModel from './TrackingModel'
|
import TrackingModel from './TrackingModel'
|
||||||
import uploadFile from '@/components/uploadFile/file'
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
import { quillEditor } from 'vue-quill-editor'
|
import { quillEditor } from 'vue-quill-editor'
|
||||||
@@ -570,7 +532,8 @@
|
|||||||
Standardselection,
|
Standardselection,
|
||||||
uploadFile,
|
uploadFile,
|
||||||
quillEditor,
|
quillEditor,
|
||||||
TrackingModel
|
TrackingModel,
|
||||||
|
viewImg
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -645,7 +608,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
visibletrack: false,
|
|
||||||
rulestracking: {
|
rulestracking: {
|
||||||
progressTracking: [
|
progressTracking: [
|
||||||
{
|
{
|
||||||
@@ -657,9 +619,7 @@
|
|||||||
},
|
},
|
||||||
formInline: {
|
formInline: {
|
||||||
fileLinkList: [{}],
|
fileLinkList: [{}],
|
||||||
progressTrackingList: [{
|
progressTrackingList: [],
|
||||||
isDescription: true
|
|
||||||
}],
|
|
||||||
approvalEvidenceLinkList: [{}],
|
approvalEvidenceLinkList: [{}],
|
||||||
dutyTerritory: undefined,
|
dutyTerritory: undefined,
|
||||||
projectId: undefined,
|
projectId: undefined,
|
||||||
@@ -755,14 +715,15 @@
|
|||||||
this.problemState = this.$t('emptyc')
|
this.problemState = this.$t('emptyc')
|
||||||
}
|
}
|
||||||
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 = '<p class="text-class">' + '<span class="usernameClass">'+this.userInfo().username + '</span> ' +'<span class="timeClass">'+ time +'</span>'+ '</p>' + '<p>' + this.$t('Problemstate') + this.$t('by') + '\'' + this.problemState + '\'' + this.$t('Changeto') + '\'' + value + '\''+'</p>'
|
let text = '<p class="text-class">' + '<span class="usernameClass">' + this.userInfo().username + '</span> ' + '<span class="timeClass">' + time + '</span>' + '</p>' + '<p>' + this.$t('Problemstate') + this.$t('by') + '\'' + this.problemState + '\'' + this.$t('Changeto') + '\'' + value + '\'' + '</p>'
|
||||||
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
|
||||||
})
|
// })
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
this.formInline.progressTrackingList.push({ progressTracking: text })
|
|
||||||
|
this.formInline.progressTrackingList.push({ progressTracking: text, isDescription: false })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Standardselectioninput(val) {
|
Standardselectioninput(val) {
|
||||||
@@ -802,7 +763,7 @@
|
|||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.formInline = {
|
this.formInline = {
|
||||||
fileLinkList: [{}],
|
fileLinkList: [{}],
|
||||||
progressTrackingList: [{}],
|
progressTrackingList: [],
|
||||||
approvalEvidenceLinkList: [{}]
|
approvalEvidenceLinkList: [{}]
|
||||||
}
|
}
|
||||||
this.isDisplayIndex = true
|
this.isDisplayIndex = true
|
||||||
@@ -837,7 +798,7 @@
|
|||||||
this.formInline.problemState = undefined
|
this.formInline.problemState = undefined
|
||||||
}
|
}
|
||||||
if (this.formInline.progressTrackingList == null) {
|
if (this.formInline.progressTrackingList == null) {
|
||||||
this.formInline.progressTrackingList = [{}]
|
this.formInline.progressTrackingList = []
|
||||||
}
|
}
|
||||||
if (this.formInline.approvalEvidenceLinkList == null) {
|
if (this.formInline.approvalEvidenceLinkList == null) {
|
||||||
this.formInline.approvalEvidenceLinkList = [{}]
|
this.formInline.approvalEvidenceLinkList = [{}]
|
||||||
@@ -871,12 +832,14 @@
|
|||||||
TrackingModelForm(row) {
|
TrackingModelForm(row) {
|
||||||
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 = '<p class="text-class">' + '<span class="usernameClass">' + this.userInfo().username + '</span>' + '<span class="timeClass">' + time + '</span>' + '</p>' + row
|
let text = '<p class="text-class">' + '<span class="usernameClass">' + this.userInfo().username + '</span>' + '<span class="timeClass">' + time + '</span>' + '</p>' + row
|
||||||
this.formInline.progressTrackingList.forEach((item, index) => {
|
// this.formInline.progressTrackingList.forEach((item, index) => {
|
||||||
if (!item.progressTracking) {
|
// if (!item.progressTracking) {
|
||||||
this.formInline.progressTrackingList.splice(0, 1)
|
// this.formInline.progressTrackingList.splice(0, 1)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
this.formInline.progressTrackingList.splice(this.index + 1, 1, { progressTracking: text })
|
this.formInline.progressTrackingList.push({ progressTracking: text, isDescription: false })
|
||||||
|
|
||||||
|
// this.formInline.progressTrackingList.splice(this.index + 1, 1, { progressTracking: text })
|
||||||
console.log(this.formInline.progressTrackingList)
|
console.log(this.formInline.progressTrackingList)
|
||||||
},
|
},
|
||||||
addprogresstrackingClick(index) {
|
addprogresstrackingClick(index) {
|
||||||
@@ -890,36 +853,17 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
deleteprogresstrackingClick(index, item) {
|
deleteprogresstrackingClick(index, item) {
|
||||||
if (this.formInline.progressTrackingList.length > 1) {
|
/* if (this.formInline.progressTrackingList.length > 1) {
|
||||||
this.formInline.progressTrackingList.splice(index, 1)
|
|
||||||
} else {
|
} else {
|
||||||
item.progressTracking = ''
|
item.progressTracking = ''
|
||||||
}
|
}*/
|
||||||
|
this.formInline.progressTrackingList.splice(index, 1)
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
Cancel() {
|
|
||||||
this.visibletrack = false
|
|
||||||
this.formInlinetracking = {}
|
|
||||||
this.$refs.ruleFormtracking.clearValidate()
|
|
||||||
},
|
|
||||||
handleOk() {
|
|
||||||
let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
|
||||||
this.$refs.ruleFormtracking.validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.progressTracking
|
|
||||||
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 })
|
|
||||||
this.visibletrack = false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -1105,6 +1049,11 @@
|
|||||||
getAction('/project/projectLibraryBase/getPlatform', { platform: platform }).then((res) => {
|
getAction('/project/projectLibraryBase/getPlatform', { platform: platform }).then((res) => {
|
||||||
this.relatedItemsList = res || []
|
this.relatedItemsList = res || []
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
progressTrackingOpenClick(e) {
|
||||||
|
if (e.target.localName == 'img') {
|
||||||
|
this.$refs.viewImgRef.getData(e.target.currentSrc)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1349,12 +1298,17 @@
|
|||||||
::v-deep .text-box-index-text .text-class {
|
::v-deep .text-box-index-text .text-class {
|
||||||
background: #fff !important;
|
background: #fff !important;
|
||||||
}
|
}
|
||||||
.progressTrackingListClass{
|
|
||||||
|
.progressTrackingListClass {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 16px
|
margin-bottom: 16px
|
||||||
}
|
}
|
||||||
.progressTrackingListClass:last-child{
|
|
||||||
|
.progressTrackingListClass:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
::v-deep .text-box-index-text-top img {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -131,8 +131,12 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="itemModel-text"
|
<div class="itemModel-text">
|
||||||
v-html="formInline.description">
|
<div class="itemModel-text-box"
|
||||||
|
v-html="formInline.description"
|
||||||
|
@click="progressTrackingOpenClick($event)">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -164,7 +168,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="itemModel">
|
<div class="itemModel">
|
||||||
<div class="text-box" v-for="(item,index) in formInline.progressTrackingList" :key="index">
|
<div class="text-box" v-for="(item,index) in formInline.progressTrackingList" :key="index">
|
||||||
<div class="text-box-index-text-top" v-html="item.progressTracking"></div>
|
<div class="text-box-index-text-top" @click="progressTrackingOpenClick($event)"
|
||||||
|
v-html="item.progressTracking"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -210,17 +215,21 @@
|
|||||||
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('close')}}</a-button>
|
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('close')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
|
<viewImg ref="viewImgRef"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, putAction, downloadFile } from '@/api/manage'
|
import { getAction, postAction, putAction, downloadFile } from '@/api/manage'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import viewImg from './viewImg'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'fillAdd',
|
name: 'fillAdd',
|
||||||
components: {},
|
components: {
|
||||||
|
viewImg
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
rules: {
|
rules: {
|
||||||
@@ -389,6 +398,11 @@
|
|||||||
getAction('/project/projectLibraryBase/getPlatform', { platform: platform }).then((res) => {
|
getAction('/project/projectLibraryBase/getPlatform', { platform: platform }).then((res) => {
|
||||||
this.relatedItemsList = res || []
|
this.relatedItemsList = res || []
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
progressTrackingOpenClick(e) {
|
||||||
|
if (e.target.localName == 'img') {
|
||||||
|
this.$refs.viewImgRef.getData(e.target.currentSrc)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -545,6 +559,7 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding: 56px 0 10px 0;
|
padding: 56px 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .text-class {
|
::v-deep .text-class {
|
||||||
color: rgba(0, 0, 0, 0.65);
|
color: rgba(0, 0, 0, 0.65);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -571,4 +586,22 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #9598A4;
|
color: #9598A4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.itemModel-text-box {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
height: 200px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .itemModel-text-box img {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .text-box-index-text-top img {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
:title="$t('view')"
|
||||||
|
:width="800"
|
||||||
|
:visible="visible"
|
||||||
|
:maskClosable="false"
|
||||||
|
:footer="null"
|
||||||
|
@cancel="Cancel"
|
||||||
|
>
|
||||||
|
<div class="viewImgBox">
|
||||||
|
<img class="viewImg" :src="srcUrl" alt="">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'viewImg',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
srcUrl: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
Cancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
getData(val) {
|
||||||
|
this.srcUrl = val
|
||||||
|
this.visible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.viewImgBox {
|
||||||
|
text-align: center;
|
||||||
|
width: 750px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.viewImg {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user