【修改】增加图标 修改删除10个的关键字 修改日期显示格式

This commit is contained in:
zhoulingpo
2023-05-15 16:06:36 +08:00
parent a3b7711582
commit d13c4f6e70
7 changed files with 125 additions and 85 deletions
+13 -1
View File
@@ -48,8 +48,13 @@
<el-table-column
prop="approvalOpinion"
align="center"
show-overflow-tooltip
label="审核意见">
<template slot-scope="scope">
<span :title="scope.row.approvalOpinion" class="overspan">
{{scope.row.approvalOpinion}}
</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
@@ -201,4 +206,11 @@ export default {
.file .el-upload{
display: none!important;
}
.overspan{
display: inline-block;
width: 90%;
overflow: hidden;
height: 23px;
text-overflow: ellipsis;
}
</style>
+1
View File
@@ -0,0 +1 @@
<svg t="1684136266088" class="icon" viewBox="0 0 1264 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2581" width="200" height="200"><path d="M992.171444 312.62966C975.189616 137.155482 827.415189 0 647.529412 0 469.849434 0 323.616239 133.860922 303.679205 306.210218 131.598564 333.839271 0 482.688318 0 662.588235c0 199.596576 161.815189 361.411765 361.411765 361.411765h572.235294v-1.555371c185.470975-15.299199 331.294118-170.426291 331.294117-359.856394 0-168.969898-116.101408-310.367302-272.769732-349.958575zM632.470588 963.764706L294.530793 602.352941h244.278155V271.058824h180.705882V602.352941H970.410384z" p-id="2582"></path></svg>

After

Width:  |  Height:  |  Size: 658 B

+1
View File
@@ -0,0 +1 @@
<svg t="1684136445919" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4444" width="200" height="200"><path d="M0 136.594286m70.034286 0l883.931428 0q70.034286 0 70.034286 70.034285l0 61.074286q0 70.034286-70.034286 70.034286l-883.931428 0q-70.034286 0-70.034286-70.034286l0-61.074286q0-70.034286 70.034286-70.034285Z" fill="#333333" p-id="4445"></path><path d="M685.714286 146.285714h-73.142857V73.142857h-201.142858v73.142857h-73.142857V73.142857a73.142857 73.142857 0 0 1 73.142857-73.142857h201.142858a73.142857 73.142857 0 0 1 73.142857 73.142857zM164.571429 274.285714v676.571429a73.142857 73.142857 0 0 0 73.142857 73.142857h548.571428a73.142857 73.142857 0 0 0 73.142857-73.142857V274.285714z m233.142857 521.142857a36.571429 36.571429 0 0 1-73.142857 0v-329.142857a36.571429 36.571429 0 0 1 73.142857 0z m155.428571 0a36.571429 36.571429 0 0 1-73.142857 0v-329.142857a36.571429 36.571429 0 0 1 73.142857 0z m146.285714 0a36.571429 36.571429 0 0 1-73.142857 0v-329.142857a36.571429 36.571429 0 0 1 73.142857 0z" fill="#333333" p-id="4446"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+9 -1
View File
@@ -4,6 +4,7 @@
* @param fmt
* @returns {*}
*/
export function formatDate (value, fmt) {
const regPos = /^\d+(\.\d+)?$/
if (regPos.test(value)) {
@@ -41,6 +42,13 @@ export function formatDate2 (value, fmt) {
let hours = dateObject.getHours();
let minutes = dateObject.getMinutes();
let seconds = dateObject.getSeconds();
function timeAdd0(str) {
if(str<=9){
str='0'+str;
}
return str
}
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
console.log(seconds)
return `${year}-${month}-${day} ${timeAdd0(hours)}:${timeAdd0(minutes)}:${timeAdd0(seconds)}`;
}
+2 -1
View File
@@ -268,6 +268,7 @@ export default {
getReportDetail() {
this.$api.report.getReportDetail(this.reportId).then(res => {
this.row = res.data
this.isAdmin = this.$store.getters.userInfo.userId==this.row.createUserId
// 需要给分数/2
this.previewRow()
})
@@ -275,7 +276,7 @@ export default {
},
mounted() {
this.reportId = this.$route.query.reportId
this.isAdmin = this.$store.getters.userInfo.roleIdList.indexOf('35LLRCAQ8D') > -1
// this.previewRow()
this.getComment()
this.getReportDetail()
@@ -20,14 +20,15 @@
<el-row>
<el-col :span="10">
<el-form-item label="报告所属部门:" prop="department">
<el-input readonly :disabled="formControl" v-model="form.departmentName" @click.native="handleClick" placeholder="请选择报告所属部门"
<el-input readonly :disabled="formControl" v-model="form.departmentName" @click.native="handleClick"
placeholder="请选择报告所属部门"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" :offset="4">
<el-form-item label="标签:" >
<el-form-item label="标签:">
<el-cascader :disabled="formControl" width="100%" v-model="form.labelList" :options="cascaderOptions"
filterable collapse-tags
filterable collapse-tags
:props="{ checkStrictly: true ,multiple: true }" clearable placeholder="请选择标签">
<template slot-scope="{ node, data }">
<span :title="data.label">{{ data.label }}</span>
@@ -37,9 +38,10 @@
</el-col>
</el-row>
<el-row>
<el-col :span="10" >
<el-col :span="10">
<el-form-item label="报告涉密等级:" prop="confidentialLevel">
<el-select :disabled="formControl" v-model="form.confidentialLevel" placeholder="请选择报告涉密等级" @change="reportLevel">
<el-select :disabled="formControl" v-model="form.confidentialLevel" placeholder="请选择报告涉密等级"
@change="reportLevel">
<el-option v-for="item in privacyLevelOptions " :key="item.value" :label="item.value"
:value="item.value">
</el-option>
@@ -48,15 +50,15 @@
</el-col>
<el-col :span="10" :offset="4" v-if="isShowTime">
<el-form-item label="保密到期日期:" prop="secrecyLast">
<el-date-picker :disabled="formControl" v-model="form.secrecyLast" type="date" value-format="yyyy-mm-dd"
placeholder="请选择保密到期日期"
prefix-icon="null" />
<el-date-picker :disabled="formControl" v-model="form.secrecyLast" type="date" value-format="yyyy-mm-dd"
placeholder="请选择保密到期日期"
prefix-icon="null"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10" >
<el-col :span="10">
<el-form-item label="报告隐私等级:" prop="privacyLevel">
<el-select :disabled="formControl" v-model="form.privacyLevel" placeholder="请选择报告隐私等级">
<el-option v-for="item in confidentialLevelOptions" :key="item.value" :label="item.value"
@@ -69,21 +71,9 @@
<el-form-item label="关键词:" prop="tags">
<vue-tags-input :disabled="formControl" :class="{'is-diable':formControl}" placeholder="请输入关键词"
v-model="form.tags" :tags="tags"
:avoid-adding-duplicates="false" @tags-changed="newTags =>{
if(newTags[newTags.length - 1].text.length <= 20){
if(tags.length < 10){
tags = newTags
}else{
this.$message({type:'error',message:'关键词数量不能超过10个'})
tags = newTags.slice(0,-1)
}
}
else{
this.$message({type:'error',message:'单个关键词不能超过20个字'})
tags = newTags.slice(0,-1)
}
}"/>
@before-deleting-tag="delTag"
@before-adding-tag="addTags"
:avoid-adding-duplicates="false" @tags-changed="newTags => tags=newTags"/>
</el-form-item>
</el-col>
</el-row>
@@ -110,9 +100,13 @@
</el-col>
<el-col :span="8">
<span class="uploadFile" v-if="form.fileName">
<span :class="{'fontColor':formControl}" :title="form.fileName">{{form.fileName}}</span>
<i :class="{'fontColor':formControl}" class="el-icon-cloudy iconstyle" @click="downFile(form.fileId)"></i>
<i :class="{'fontColor':formControl}" class="el-icon-delete iconstyle" @click="delFile"></i>
<span :class="{'fontColor':formControl}" :title="form.fileName" class="juli">{{ form.fileName }}</span>
<svg-icon icon-class="cloud" @click="downFile(form.fileId)" style="font-size: 20px"
class-name="icon" :class="{'fontColor':formControl}"></svg-icon>
<svg-icon icon-class="del" @click="delFile" style="font-size: 20px"
class-name="icon" :class="{'fontColor':formControl}"></svg-icon>
<!-- <i class="el-icon-cloudy iconstyle" ></i>-->
<!-- <i :class="{'fontColor':formControl}" class="el-icon-delete iconstyle" @click="delFile"></i>-->
</span>
</el-col>
</el-row>
@@ -129,8 +123,9 @@ import {fileType} from '@/utils/fileType'
import newTranslate from "../../../components/newTranslate";
import VueTagsInput from '@johmun/vue-tags-input';
import orgTable from '@/components/OrgTable'
import {privacyLevelOptions,confidentialLevelOptions} from '@/utils/Enum/enum'
import { downloadFile } from '@/utils/downloadFile'
import {privacyLevelOptions, confidentialLevelOptions} from '@/utils/Enum/enum'
import {downloadFile} from '@/utils/downloadFile'
export default {
dicts: ['classified_level', 'privacy_level'],
components: {
@@ -156,10 +151,10 @@ export default {
return {
privacyLevelOptions,
confidentialLevelOptions,
orgTableVal:'',
orgTableVal: '',
orgTableValName: '',
visibleOrgTable:false,
isShowTime:false, //是否显示日期
visibleOrgTable: false,
isShowTime: false, //是否显示日期
loadingMore: false,
listTwo: [], //存储下载预览的
allUser: [], //存储全部的
@@ -225,19 +220,19 @@ export default {
}
],
privacyLevel:[
privacyLevel: [
{
required: true,
message: "报告隐私等级不能为空", trigger: 'change'
}
],
confidentialLevel:[
confidentialLevel: [
{
required: true,
message: "报告涉密等级不能为空", trigger: 'change'
}
],
secrecyLast:[
secrecyLast: [
{
required: true,
message: "保密到期日期不能为空", trigger: 'change'
@@ -254,43 +249,58 @@ export default {
}
},
watch: {
processForm:{
processForm: {
handler(val) {
this.form = this.processForm
console.log("变化了",this.form)
if(this.form.secrecyLast){
this.isShowTime=true
this.form.secrecyLast=new Date(this.form.secrecyLast)
console.log("变化了", this.form)
if (this.form.secrecyLast) {
this.isShowTime = true
this.form.secrecyLast = new Date(this.form.secrecyLast)
}
if(this.processForm.keyContent){
this.tags=JSON.parse(this.processForm.keyContent)
if (this.processForm.keyContent) {
this.tags = JSON.parse(this.processForm.keyContent)
}
if(this.processForm.labelList && typeof this.processForm.labelList[0]=='string'){
this.form.labelList= this.processForm.labelList.map(item=>{
if (this.processForm.labelList && typeof this.processForm.labelList[0] == 'string') {
this.form.labelList = this.processForm.labelList.map(item => {
return JSON.parse(item)
})
}
},
immediate:true
immediate: true
}
},
methods: {
delTag(obj) {
console.log("我我我")
obj.deleteTag()
},
addTags(obj) {
if (obj.tag.text.length <= 20) {
if (this.tags.length < 10) {
obj.addTag();
} else {
this.$message({type: 'error', message: '关键词数量不能超过10个'})
}
} else {
this.$message({type: 'error', message: '单个关键词不能超过20个字'})
}
downFile(id){
this.$api.report.reportDownload({reportId:null,fileId:id}).then(res=>{
},
downFile(id) {
this.$api.report.reportDownload({reportId: null, fileId: id}).then(res => {
downloadFile(res)
})
},
handleClick(){
if(this.formControl) return
if(this.form.departmentName){
this.orgTableVal=this.form.department
this.orgTableValName=this.form.departmentName
handleClick() {
if (this.formControl) return
if (this.form.departmentName) {
this.orgTableVal = this.form.department
this.orgTableValName = this.form.departmentName
}
this.visibleOrgTable=true
this.visibleOrgTable = true
},
isTreeOk(checkedList){
isTreeOk(checkedList) {
const parts = []
const partsName = []
@@ -305,28 +315,28 @@ export default {
},
delFile() {
if(this.formControl) return
this.fileList=[]
if (this.formControl) return
this.fileList = []
this.form.fileName = '';
this.form.fileId = '';
},
reportLevel(item){
let imList=['普通商密','核心商密']
reportLevel(item) {
let imList = ['普通商密', '核心商密']
if( imList.indexOf(this.form.confidentialLevel)>-1){
let currentDate=new Date()
let futureDate
if(item=='普通商密')
futureDate= new Date(currentDate.getFullYear() + 5, currentDate.getMonth(), currentDate.getDate());
if (imList.indexOf(this.form.confidentialLevel) > -1) {
let currentDate = new Date()
let futureDate
if (item == '普通商密')
futureDate = new Date(currentDate.getFullYear() + 5, currentDate.getMonth(), currentDate.getDate());
else
futureDate = new Date(currentDate.getFullYear() + 10, currentDate.getMonth(), currentDate.getDate());
futureDate = new Date(currentDate.getFullYear() + 10, currentDate.getMonth(), currentDate.getDate());
this.isShowTime=true
this.form.secrecyLast = futureDate
}else{
this.isShowTime=false
this.form.secrecyLast = ''
}
this.isShowTime = true
this.form.secrecyLast = futureDate
} else {
this.isShowTime = false
this.form.secrecyLast = ''
}
},
loadMore() {
this.q.pageNo++
@@ -525,33 +535,40 @@ export default {
}
}
}
.uploadBtn {
vertical-align: super;
}
.uploadFile{
.uploadFile {
margin-left: -35px;
height: 36px;
line-height: 36px;
display: inline-block;
span{
.juli {
display: inline-block;
color:#555;
color: #555;
max-width: 200px;
font-size: 15px;
word-break: keep-all;
text-overflow: ellipsis;
overflow: hidden;
}
.iconstyle{
margin-left: 5px;
font-size: 25px;
vertical-align: center;
line-height: 40px;
color: #555;
svg {
margin-left: 5px;
cursor: pointer;
}
.fontColor{
.svg-icon {
vertical-align: super;
}
.fontColor {
color: #ccc;
}
}
</style>
+2 -2
View File
@@ -341,7 +341,7 @@ export default {
console.log(this.processForm,"his.processFormhis.processFormhis.processForm")
// 判断报告名称是否重复
this.$api.reportProcess.JggleName({
id:this.processForm.reportId || '',
id:this.processOld.dataId || '',
name:this.processForm.name
}).then(async res=>{
@@ -360,7 +360,7 @@ export default {
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType,
reportId: this.processForm.reportId|| ''
reportId: this.processOld.dataId|| ''
})
}
} else {