Quellcode durchsuchen

项目附件功能

user5 vor 1 Jahr
Ursprung
Commit
f0a8d51e56

+ 1 - 1
datav.html

@@ -15,7 +15,7 @@
   <script src="/datav/cdn/echarts/5.4.0/echarts.min.js"></script>
   <script src="/datav/cdn/echarts-wordcloud.min.js"></script>
   <!-- <script src="./datav/cdn/avue/avue.min.js"></script> -->
-  <title>兴光</title>
+  <title>嘉溢</title>
 </head>
 
 <body>

+ 1 - 1
index.html

@@ -8,7 +8,7 @@
 		<meta http-equiv="pragram" content="no-cache">
 		<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
 		<link rel="icon" href="/favicon.ico">
-		<title>兴光</title>
+		<title>嘉溢</title>
 
 	</head>
 	<body>

+ 1 - 1
src/config/index.js

@@ -1,6 +1,6 @@
 const DEFAULT_CONFIG = {
 	// APP NAME
-	APP_NAME: "兴光微服务平台",
+	APP_NAME: "嘉溢微服务平台",
 	//首页地址
 	DASHBOARD_URL: "/dashboard/index",
 

+ 25 - 4
src/views/jy/project/OutInstanceForm.vue

@@ -148,7 +148,17 @@
 								<br>
 								<span>{{ scope.row.type }}</span>
 							</span>
-							<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+							<div v-if="ifName(scope.row) === true">
+								<el-image
+									style="width: 30px; height: 30px;padding-top: 4px;"
+									:src="scope.row.lsUrl"
+									:preview-src-list="[scope.row.lsUrl]"
+									:preview-teleported="true"
+								></el-image>
+							</div>
+							<div v-else>
+								<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+							</div>
 						</template>
 					</vxe-column>
 					<vxe-column field="workAttachmentType" width="100px" title="文件类型"></vxe-column>
@@ -253,6 +263,7 @@
 		ProjectInfoService:null,
 		created () {
 			this.projectInfoService=new ProjectInfoService()
+			this.ossService = new OSSSerivce()
 		},
 		computed: {
 			bus: {
@@ -360,7 +371,6 @@
 						console.log('method2',method)
 
 						this.projectInfoService.getAttachmentList(this.inputForm.projectId,this.inputForm.id).then((data) => {
-							console.log("getAttachmentList",data)
 							this.tableData = data
 						})
 
@@ -395,7 +405,7 @@
 
 			//测试按钮
 			openFileForm(id,typeId){
-				this.$refs.fileForm.init("add", id,typeId)
+				this.$refs.fileForm.init("add", id,this.inputForm.projectId)
 			},
 			showFile (row) {
 				console.log("showFile",row)
@@ -409,7 +419,6 @@
 			getFiles(){
 				this.projectInfoService.getAttachmentList(this.inputForm.projectId,this.inputForm.id).then((data) => {
 					this.tableData = data
-					console.log('data',data)
 				})
 
 			},
@@ -626,6 +635,18 @@
 					})
 				}
 			},
+			ifName (row) {
+				if (this.commonJS.isEmpty(row.attachmentName)) {
+					row.attachmentName = '---'
+					return false
+				}
+				let suffix = row.attachmentName.substring(row.attachmentName.lastIndexOf('.') + 1)
+				if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+					return true
+				} else {
+					return false
+				}
+			},
 
 		}
 	}

+ 34 - 4
src/views/jy/project/ProjectArchiveForm.vue

@@ -148,7 +148,17 @@
 								<br>
 								<span>{{ scope.row.type }}</span>
 							</span>
-							<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+							<div v-if="ifName(scope.row) === true">
+								<el-image
+									style="width: 30px; height: 30px;padding-top: 4px;"
+									:src="scope.row.lsUrl"
+									:preview-src-list="[scope.row.lsUrl]"
+									:preview-teleported="true"
+								></el-image>
+							</div>
+							<div v-else>
+								<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+							</div>
 						</template>
 					</vxe-column>
 					<vxe-column field="workAttachmentType" width="100px" title="文件类型"></vxe-column>
@@ -197,6 +207,14 @@
 	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
 	import FileForm from './FileForm'
 	import UpLoadComponent from '@/views/common/JyArchiveUpLoadComponent'
+	import OSSSerivce, {
+		// eslint-disable-next-line no-unused-vars
+		beforeAvatarUpload,
+		// eslint-disable-next-line no-unused-vars
+		openWindowOnUrl,
+		// eslint-disable-next-line no-unused-vars
+		toHref
+	} from '@/api/sys/OSSService'
 	export default {
 		props: {
 			businessId: {
@@ -246,6 +264,7 @@
 
 		created () {
 			this.projectInfoService=new ProjectInfoService()
+			this.ossService = new OSSSerivce()
 
 		},
 		computed: {
@@ -287,6 +306,7 @@
 			UserSelectSignatory,
 			UpLoadComponent,
 			FileForm,
+			OSSSerivce,
 		},
 		methods: {
 			getKeyWatch (keyWatch) {
@@ -354,7 +374,6 @@
 
 						this.projectInfoService.getAttachmentList(data.projectId,this.inputForm.id).then((data) => {
 							this.tableData = data
-							console.log("getAttachmentList",this.tableData)
 						})
 
 						// this.$refs.uploadComponent.newUpload(method, this.inputForm.fileList, 'jyProjectArchive', null, '附件', null, null, null)
@@ -589,7 +608,7 @@
 			},
 			//测试按钮
 			openFileForm(id,typeId){
-				this.$refs.fileForm.init("add", id,typeId)
+				this.$refs.fileForm.init("add", id,this.inputForm.projectId)
 			},
 			showFile (row) {
 				console.log("showFile",row)
@@ -603,7 +622,6 @@
 			getFiles(){
 				this.projectInfoService.getAttachmentList(this.inputForm.projectId,this.inputForm.id).then((data) => {
 					this.tableData = data
-					console.log('data',data)
 				})
 
 			},
@@ -620,6 +638,18 @@
 					return kb + '' + sizes[i]
 				}
 			},
+			ifName (row) {
+				if (this.commonJS.isEmpty(row.attachmentName)) {
+					row.attachmentName = '---'
+					return false
+				}
+				let suffix = row.attachmentName.substring(row.attachmentName.lastIndexOf('.') + 1)
+				if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+					return true
+				} else {
+					return false
+				}
+			},
 
 		}
 	}

+ 34 - 2
src/views/jy/project/ProjectEiaForm.vue

@@ -147,7 +147,17 @@
 								<br>
 								<span>{{ scope.row.type }}</span>
 							</span>
-							<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+							<div v-if="ifName(scope.row) === true">
+								<el-image
+									style="width: 30px; height: 30px;padding-top: 4px;"
+									:src="scope.row.lsUrl"
+									:preview-src-list="[scope.row.lsUrl]"
+									:preview-teleported="true"
+								></el-image>
+							</div>
+							<div v-else>
+								<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+							</div>
 						</template>
 					</vxe-column>
 					<vxe-column field="workAttachmentType" width="100px" title="文件类型"></vxe-column>
@@ -194,6 +204,14 @@
 	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
 	import UpLoadComponent from '@/views/common/JyEiaUpLoadComponent'
 	import FileForm from './fileForm'
+	import OSSSerivce, {
+		// eslint-disable-next-line no-unused-vars
+		beforeAvatarUpload,
+		// eslint-disable-next-line no-unused-vars
+		openWindowOnUrl,
+		// eslint-disable-next-line no-unused-vars
+		toHref
+	} from '@/api/sys/OSSService'
 	export default {
 		props: {
 			businessId: {
@@ -243,6 +261,7 @@
 		ProjectInfoService:null,
 		created () {
 			this.projectInfoService=new ProjectInfoService()
+			this.ossService = new OSSSerivce()
 		},
 		computed: {
 			bus: {
@@ -283,6 +302,7 @@
 			UserSelectSignatory,
 			UpLoadComponent,
 			FileForm,
+			OSSSerivce,
 		},
 		methods: {
 			getKeyWatch (keyWatch) {
@@ -580,7 +600,7 @@
 			},
 			//测试按钮
 			openFileForm(id,typeId){
-				this.$refs.fileForm.init("add", id,typeId)
+				this.$refs.fileForm.init("add", id,this.inputForm.projectId)
 			},
 			showFile (row) {
 				console.log("showFile",row)
@@ -611,6 +631,18 @@
 					return kb + '' + sizes[i]
 				}
 			},
+			ifName (row) {
+				if (this.commonJS.isEmpty(row.attachmentName)) {
+					row.attachmentName = '---'
+					return false
+				}
+				let suffix = row.attachmentName.substring(row.attachmentName.lastIndexOf('.') + 1)
+				if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+					return true
+				} else {
+					return false
+				}
+			},
 
 
 		}

+ 3 - 3
src/views/sys/login/components/banner.vue

@@ -29,18 +29,18 @@ export default {
 		carouselItem() {
 			return [
 				{
-					slogan: "兴光业务管理系统",
+					slogan: "嘉溢业务管理系统",
 					subSlogan:
 						"",
 					image: image3,
 				},
 				{
-					slogan: "兴光业务管理系统",
+					slogan: "嘉溢业务管理系统",
 					subSlogan: "",
 					image: image1,
 				},
 				{
-					slogan: "兴光业务管理系统",
+					slogan: "嘉溢业务管理系统",
 					subSlogan:
 						"",
 					image: image2,