修改项目库平台件
This commit is contained in:
@@ -338,7 +338,8 @@
|
||||
<!-- :options="editorOption"-->
|
||||
<!-- />-->
|
||||
<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-text" @click="openClick(item)">
|
||||
<img src="../../../../assets/progressExit.png" alt="">
|
||||
@@ -463,47 +464,6 @@
|
||||
</div>
|
||||
</a-drawer>
|
||||
<!-- <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
|
||||
name="file"
|
||||
id="iviewUp"
|
||||
@@ -517,6 +477,7 @@
|
||||
</a-upload>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
<TrackingModel ref="TrackingModelRef" @TrackingModelForm="TrackingModelForm"/>
|
||||
<viewImg ref="viewImgRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -530,6 +491,7 @@
|
||||
import 'quill/dist/quill.snow.css'
|
||||
import 'quill/dist/quill.bubble.css'
|
||||
import Standardselection from '@/components/Standardselection/index'
|
||||
import viewImg from './viewImg'
|
||||
import TrackingModel from './TrackingModel'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
import { quillEditor } from 'vue-quill-editor'
|
||||
@@ -570,7 +532,8 @@
|
||||
Standardselection,
|
||||
uploadFile,
|
||||
quillEditor,
|
||||
TrackingModel
|
||||
TrackingModel,
|
||||
viewImg
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -645,7 +608,6 @@
|
||||
]
|
||||
},
|
||||
visible: false,
|
||||
visibletrack: false,
|
||||
rulestracking: {
|
||||
progressTracking: [
|
||||
{
|
||||
@@ -657,9 +619,7 @@
|
||||
},
|
||||
formInline: {
|
||||
fileLinkList: [{}],
|
||||
progressTrackingList: [{
|
||||
isDescription: true
|
||||
}],
|
||||
progressTrackingList: [],
|
||||
approvalEvidenceLinkList: [{}],
|
||||
dutyTerritory: undefined,
|
||||
projectId: undefined,
|
||||
@@ -755,14 +715,15 @@
|
||||
this.problemState = this.$t('emptyc')
|
||||
}
|
||||
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>'
|
||||
if (JSON.stringify(this.formInline.progressTrackingList[0]) == '{}' || this.formInline.progressTrackingList[0].progressTracking == '') {
|
||||
this.formInline.progressTrackingList.forEach((item, index) => {
|
||||
item.progressTracking = text
|
||||
})
|
||||
return
|
||||
}
|
||||
this.formInline.progressTrackingList.push({ progressTracking: text })
|
||||
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 == '') {
|
||||
// this.formInline.progressTrackingList.forEach((item, index) => {
|
||||
// item.progressTracking = text
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
this.formInline.progressTrackingList.push({ progressTracking: text, isDescription: false })
|
||||
}
|
||||
},
|
||||
Standardselectioninput(val) {
|
||||
@@ -802,7 +763,7 @@
|
||||
this.disabled = false
|
||||
this.formInline = {
|
||||
fileLinkList: [{}],
|
||||
progressTrackingList: [{}],
|
||||
progressTrackingList: [],
|
||||
approvalEvidenceLinkList: [{}]
|
||||
}
|
||||
this.isDisplayIndex = true
|
||||
@@ -837,7 +798,7 @@
|
||||
this.formInline.problemState = undefined
|
||||
}
|
||||
if (this.formInline.progressTrackingList == null) {
|
||||
this.formInline.progressTrackingList = [{}]
|
||||
this.formInline.progressTrackingList = []
|
||||
}
|
||||
if (this.formInline.approvalEvidenceLinkList == null) {
|
||||
this.formInline.approvalEvidenceLinkList = [{}]
|
||||
@@ -871,12 +832,14 @@
|
||||
TrackingModelForm(row) {
|
||||
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
|
||||
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.formInline.progressTrackingList.forEach((item, index) => {
|
||||
// if (!item.progressTracking) {
|
||||
// this.formInline.progressTrackingList.splice(0, 1)
|
||||
// }
|
||||
// })
|
||||
this.formInline.progressTrackingList.push({ progressTracking: text, isDescription: false })
|
||||
|
||||
// this.formInline.progressTrackingList.splice(this.index + 1, 1, { progressTracking: text })
|
||||
console.log(this.formInline.progressTrackingList)
|
||||
},
|
||||
addprogresstrackingClick(index) {
|
||||
@@ -890,36 +853,17 @@
|
||||
})
|
||||
},
|
||||
deleteprogresstrackingClick(index, item) {
|
||||
if (this.formInline.progressTrackingList.length > 1) {
|
||||
this.formInline.progressTrackingList.splice(index, 1)
|
||||
} else {
|
||||
item.progressTracking = ''
|
||||
}
|
||||
/* if (this.formInline.progressTrackingList.length > 1) {
|
||||
|
||||
} else {
|
||||
item.progressTracking = ''
|
||||
}*/
|
||||
this.formInline.progressTrackingList.splice(index, 1)
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
handleCancel() {
|
||||
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() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
@@ -1105,6 +1049,11 @@
|
||||
getAction('/project/projectLibraryBase/getPlatform', { platform: platform }).then((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 {
|
||||
background: #fff !important;
|
||||
}
|
||||
.progressTrackingListClass{
|
||||
|
||||
.progressTrackingListClass {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin-bottom: 16px
|
||||
}
|
||||
.progressTrackingListClass:last-child{
|
||||
|
||||
.progressTrackingListClass:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
::v-deep .text-box-index-text-top img {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
@@ -131,8 +131,12 @@
|
||||
<span class="title-text-text"
|
||||
:title="$t('descriptions')">{{$t('descriptions')}}</span>
|
||||
</div>
|
||||
<div class="itemModel-text"
|
||||
v-html="formInline.description">
|
||||
<div class="itemModel-text">
|
||||
<div class="itemModel-text-box"
|
||||
v-html="formInline.description"
|
||||
@click="progressTrackingOpenClick($event)">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -164,7 +168,8 @@
|
||||
</div>
|
||||
<div class="itemModel">
|
||||
<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>
|
||||
@@ -210,17 +215,21 @@
|
||||
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('close')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<viewImg ref="viewImgRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, putAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
import viewImg from './viewImg'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'fillAdd',
|
||||
components: {},
|
||||
components: {
|
||||
viewImg
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
@@ -389,6 +398,11 @@
|
||||
getAction('/project/projectLibraryBase/getPlatform', { platform: platform }).then((res) => {
|
||||
this.relatedItemsList = res || []
|
||||
})
|
||||
},
|
||||
progressTrackingOpenClick(e) {
|
||||
if (e.target.localName == 'img') {
|
||||
this.$refs.viewImgRef.getData(e.target.currentSrc)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -545,6 +559,7 @@
|
||||
overflow: auto;
|
||||
padding: 56px 0 10px 0;
|
||||
}
|
||||
|
||||
::v-deep .text-class {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
font-weight: bold;
|
||||
@@ -571,4 +586,22 @@
|
||||
font-weight: 400;
|
||||
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>
|
||||
@@ -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