Browse Source

no message

USER-20230908AJ\Administrator 3 weeks ago
parent
commit
703372dd1d

+ 88 - 60
page_task/task_details/module/graph.vue

@@ -1,9 +1,9 @@
 <template>
-  <view class="graph-container">
-    <view class="canvas-wrapper">
+  <view class="graph-container r-20">
+    <view class="canvas-wrapper r-20">
       <canvas
           canvas-id="graphCanvas"
-          class="graph-canvas"
+          class="graph-canvas r-20"
           @touchstart="onTouchStart"
           @touchmove="onTouchMove"
           @touchend="onTouchEnd"
@@ -11,62 +11,67 @@
     </view>
 
     <!-- 控制面板 -->
-    <view class="control-panel">
-      <view class="control-group">
-        <text class="control-label">布局算法:</text>
-        <picker @change="onLayoutChange" :value="layoutIndex" :range="layoutOptions">
-          <view class="picker">{{ layoutOptions[layoutIndex] }}</view>
-        </picker>
-      </view>
-
-      <view class="control-group">
-        <text class="control-label">显示标签:</text>
-        <switch :checked="showLabels" @change="toggleLabels" />
-      </view>
-
-      <view class="button-group">
-        <button class="btn primary" @tap="addRandomNode">添加节点</button>
-        <button class="btn secondary" @tap="resetView">重置视图</button>
-        <button class="btn warning" @tap="exportData">导出数据</button>
-      </view>
-    </view>
+<!--    <view class="control-panel">-->
+<!--      <view class="control-group">-->
+<!--        <text class="control-label">布局算法:</text>-->
+<!--        <picker @change="onLayoutChange" :value="layoutIndex" :range="layoutOptions">-->
+<!--          <view class="picker">{{ layoutOptions[layoutIndex] }}</view>-->
+<!--        </picker>-->
+<!--      </view>-->
+
+<!--      <view class="control-group">-->
+<!--        <text class="control-label">显示标签:</text>-->
+<!--        <switch :checked="showLabels" @change="toggleLabels" />-->
+<!--      </view>-->
+
+<!--      <view class="button-group">-->
+<!--        <button class="btn primary" @tap="addRandomNode">添加节点</button>-->
+<!--        <button class="btn secondary" @tap="resetView">重置视图</button>-->
+<!--        <button class="btn warning" @tap="exportData">导出数据</button>-->
+<!--      </view>-->
+<!--    </view>-->
 
     <!-- 节点信息面板 -->
-    <view v-if="selectedNode" class="node-info-panel">
-      <view class="panel-header">
-        <text class="panel-title">节点详情</text>
-        <text class="close-btn" @tap="deselectNode">×</text>
-      </view>
-      <view class="node-details">
-        <view class="detail-item">
-          <text class="detail-label">名称:</text>
-          <text class="detail-value">{{ selectedNode.name }}</text>
-        </view>
-        <view class="detail-item">
-          <text class="detail-label">ID:</text>
-          <text class="detail-value">{{ selectedNode.id }}</text>
-        </view>
-        <view class="detail-item">
-          <text class="detail-label">类型:</text>
-          <text class="detail-value">{{ selectedNode.type }}</text>
-        </view>
-        <view class="detail-item">
-          <text class="detail-label">连接数:</text>
-          <text class="detail-value">{{ getNodeDegree(selectedNode) }}</text>
-        </view>
-      </view>
-    </view>
+<!--    <view v-if="selectedNode" class="node-info-panel">-->
+<!--      <view class="panel-header">-->
+<!--        <text class="panel-title">节点详情</text>-->
+<!--        <text class="close-btn" @tap="deselectNode">×</text>-->
+<!--      </view>-->
+<!--      <view class="node-details">-->
+<!--        <view class="detail-item">-->
+<!--          <text class="detail-label">名称:</text>-->
+<!--          <text class="detail-value">{{ selectedNode.name }}</text>-->
+<!--        </view>-->
+<!--        <view class="detail-item">-->
+<!--          <text class="detail-label">ID:</text>-->
+<!--          <text class="detail-value">{{ selectedNode.id }}</text>-->
+<!--        </view>-->
+<!--        <view class="detail-item">-->
+<!--          <text class="detail-label">类型:</text>-->
+<!--          <text class="detail-value">{{ selectedNode.type }}</text>-->
+<!--        </view>-->
+<!--        <view class="detail-item">-->
+<!--          <text class="detail-label">连接数:</text>-->
+<!--          <text class="detail-value">{{ getNodeDegree(selectedNode) }}</text>-->
+<!--        </view>-->
+<!--      </view>-->
+<!--    </view>-->
 
     <!-- 统计信息 -->
     <view class="stats-panel">
-      <text class="stat-item">节点: {{ graphData.nodes.length }}</text>
-      <text class="stat-item">连接: {{ graphData.links.length }}</text>
+      <view class="stats-box"> <view class="stats-icon-g stats-icon"></view>  <text class="stat-item">资产</text></view>
+      <view class="stats-box"> <view class="stats-icon-g stats-icon"></view>  <text class="stat-item">资产</text></view>
+      <view class="stats-box"> <view class="stats-icon-g stats-icon"></view>  <text class="stat-item">资产</text></view>
+      <view class="stats-box"> <view class="stats-icon-g stats-icon"></view>  <text class="stat-item">资产</text></view>
+      <view class="stats-box"> <view class="stats-icon-g stats-icon"></view>  <text class="stat-item">资产</text></view>
+      <view class="stats-box"> <view class="stats-icon-g stats-icon"></view>  <text class="stat-item">资产</text></view>
     </view>
   </view>
 </template>
 
 <script>
 export default {
+  name:'graph',
   data() {
     return {
       ctx: null,
@@ -79,7 +84,7 @@ export default {
       selectedNode: null,
       hoveredNode: null,
       showLabels: true,
-      layoutIndex: 0,
+      layoutIndex: 2,
       layoutOptions: ['力导向布局', '环形布局', '树状布局'],
       isDragging: false,
       dragStartX: 0,
@@ -90,14 +95,15 @@ export default {
       animationId: null
     }
   },
-  onReady() {
+
+  onUnload() {
+    this.stopAnimation();
+  },
+  mounted() {
     this.initCanvas();
     this.initGraphData();
     this.startAnimation();
   },
-  onUnload() {
-    this.stopAnimation();
-  },
   methods: {
     initCanvas() {
       this.ctx = uni.createCanvasContext('graphCanvas', this);
@@ -112,11 +118,11 @@ export default {
       // 示例数据
       this.graphData = {
         nodes: [
-          { id: 'node1', name: '中心节点', type: 'center', x: 375, y: 250, size: 20, color: '#ff6b6b' },
+          { id: 'node1', name: '中心节点', type: 'center', x: 275, y: 150, size: 20, color: '#ff6b6b' },
           { id: 'node2', name: '用户节点', type: 'user', x: 275, y: 150, size: 15, color: '#4ecdc4' },
-          { id: 'node3', name: '产品节点', type: 'product', x: 475, y: 150, size: 15, color: '#45b7d1' },
-          { id: 'node4', name: '分类节点', type: 'category', x: 275, y: 350, size: 15, color: '#96ceb4' },
-          { id: 'node5', name: '服务节点', type: 'service', x: 475, y: 350, size: 15, color: '#feca57' }
+          { id: 'node3', name: '产品节点', type: 'product', x: 275, y: 150, size: 15, color: '#45b7d1' },
+          { id: 'node4', name: '分类节点', type: 'category', x: 275, y: 150, size: 15, color: '#96ceb4' },
+          { id: 'node5', name: '服务节点', type: 'service', x: 275, y: 150, size: 15, color: '#feca57' }
         ],
         links: [
           { source: 'node1', target: 'node2' },
@@ -444,8 +450,10 @@ export default {
 .graph-container {
   display: flex;
   flex-direction: column;
-  height: 100vh;
+  height: calc(100vh - 225px);
   background: #f5f5f5;
+  margin: 0 20rpx ;
+  border-radius: 50rpx;
 }
 
 .canvas-wrapper {
@@ -569,13 +577,33 @@ export default {
 
 .stats-panel {
   position: absolute;
-  bottom: 20rpx;
-  left: 20rpx;
+  bottom: 40rpx;
+  left: 30rpx;
   background: rgba(0, 0, 0, 0.7);
   padding: 20rpx;
   border-radius: 8rpx;
   z-index: 100;
+  display: flex;
+  justify-content: start;
+  width: 180rpx;
+  flex-wrap: wrap;
+}
+
+.stats-box{
+  width: 90rpx;
+  display: flex;
+  justify-content: start;
+  align-items: center;
+}
+.stats-icon{
+  width: 10rpx;
+  height: 10rpx;
+  margin-right: 8rpx;
 }
+.stats-icon-g{
+  background-color:#4ecdc4 ;
+}
+
 
 .stat-item {
   display: block;

+ 1 - 4
page_task/task_details/module/steps.vue

@@ -14,10 +14,7 @@
 						<text class="size-26 text-color-666">{{item.stage_name}}:</text>
 						<text class="size-26  text-color-000 sys-weight-600">{{item.name?item.name:'----'}}</text>
 					</view>
-<!--					<view v-else>-->
-<!--						<text class="size-28 text-color-666">外访:</text>-->
-<!--						<text class="size-28 text-color-12 sys-weight-600">张三</text>-->
-<!--					</view>-->
+
 				</view>
 			</view>
 		</view>

+ 102 - 0
page_task/task_details/module/word.vue

@@ -0,0 +1,102 @@
+<template>
+	<view class="m-20">
+    <view class="row-c r-20 sys-background-fff m-b20" v-for="(item,index) in stageList" :key="index">
+      <view class="file-box">
+        <view class="file-data">
+          <view class="file-icon" v-if="item.attachmentFormat==='docx'">
+            <image class="wh-45 " src="/page_task/static/img/task-details/icon-word.png" mode="aspectFill"></image>
+          </view>
+          <view class="file-icon file-icon-excel" v-if="item.attachmentFormat==='xlsx'">
+            <image class="wh-45 " src="/page_task/static/img/task-details/icon-excel.png" mode="aspectFill"></image>
+          </view>
+          <view class="file-icon file-icon-pdf" v-if="item.attachmentFormat==='pdf'">
+            <image class="wh-45 " src="/page_task/static/img/task-details/icon-pdf.png" mode="aspectFill"></image>
+          </view>
+          <view>
+            <view>{{item.attachmentName}}</view>
+            <view class="size-26 text-color-333 m-t10"><text>{{item.attachmentFormat}}</text>•<text>{{(item.attachmentSize/1024/1024).toFixed(2)}}MB</text></view>
+          </view>
+        </view>
+
+
+        <view>
+          <uni-icons type="right" size="20"></uni-icons>
+        </view>
+
+      </view>
+    </view>
+	</view>
+</template>
+
+<script>
+
+  export default {
+    name:'word-list',
+		props: {
+      businessId:{
+        default:0
+      }
+		},
+		data() {
+			return {
+        stageList: []
+			}
+		},
+    watch:{
+      'businessId':function () {
+        // this.getStageList()
+      }
+    },
+    mounted() {
+      this.getStageList()
+    },
+    methods: {
+      getStageList() {
+        this.stageList=[
+          {'attachmentName':'拍卖裁定书.docx','attachmentFormat':'docx','attachmentSize':465445,'attachmentAddress':'https://storage.jd.com/auction.gateway/5EB379EF1ADA205F9525D1BFA9DC1D4D20250616121557808.docx'},
+          {'attachmentName':'通知书(定向询价).pdf','attachmentFormat':'pdf','attachmentSize':284577,'attachmentAddress':'https://storage.jd.com/auction.gateway/2CC6F971D5CA2A11B829D01956446F3920250418151753793.pdf'},
+          {'attachmentName':'评估报告1.pdf','attachmentFormat':'pdf','attachmentSize':3276836,'attachmentAddress':'https://storage.jd.com/auction.gateway/7F7226679C6E76620D9381906217543920250612120816112.pdf'},
+        ]
+      },
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  .file-box{
+    width: 100%;
+    padding: 32rpx;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .file-data{
+      display: flex;
+      justify-content: flex-start;
+      .file-icon{
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        width: 96rpx;
+        height: 96rpx;
+        border-radius: 20rpx;
+        background-color:oklch(.97 .014 254.604);
+        margin-right: 32rpx;
+      }
+      .file-icon-pdf{
+        background-color: oklch(.971 .013 17.38);
+      }
+      .file-icon-excel{
+        background-color: oklch(.982 .018 155.826);
+      }
+    }
+  }
+	.steps-item:last-child {
+		margin-bottom: 0;
+	}
+
+	.steps-line {
+		width: 2rpx;
+		background-color: #D9D9D9;
+		height: 90rpx;
+	}
+</style>

+ 17 - 13
page_task/task_details/task_details.vue

@@ -22,13 +22,13 @@
               </image>
             </view>
             <view class="row-justify-sb center buttom-titke sys-bg-BFD2CC text-color-12 size-24">
-              <text class="size-28 text-color-E21 sys-weight-600">{{applyFor.quota}}万</text>
-              <text>{{business.stageName}}</text>
-              <text>{{applyFor.use_date}}用款</text>
+              <text class="size-28  sys-weight-600">72.47万</text>
+              <text  ><text class="size-28 text-color-E21 sys-weight-600">65.27万</text>起拍</text>
+              <text>7.01%</text>
               <view class="row-c">
                 <image class="wh-25 m-r10" src="/page_task/static/img/task-details/usrr.png" mode="">
                 </image>
-                <text>{{business.creation_name}}</text>
+                <text>京东</text>
               </view>
             </view>
           </view>
@@ -36,12 +36,14 @@
         <TaskTab :current="current" @onChange="onChange"></TaskTab>
       </view>
     </Nav>
-    <view class="sys-list-background-color task-tabs-width "
-          :style="{top:`${$tools.topHeight()+fixedHeight}px`}">
-      <view v-if="current === 1"></view>
-      <view >
-        <!--        <graph></graph>-->
-      </view>
+    <view class="sys-list-background-color task-tabs-width ">
+        <view v-if="current === 1"></view>
+        <view v-else-if="current ===2"></view>
+        <view v-else-if="current ===3"></view>
+        <view v-else>
+          <word></word>
+        </view>
+        <graph></graph>
     </view>
 
 
@@ -64,16 +66,18 @@ import ThirdParty from "./module/third_party.vue"
 // 资产信息
 import Property from "./module/property.vue"
 // 审核进度
-import Steps from "./module/steps.vue"
+import Word from "./module/word.vue"
 // 跟进记录
 import Record from "./module/record.vue"
 import tools from "@/service/tools";
 
 import EnSelect from "@/components/en-utils/en-select/en-select.vue";
 import CreditList from "@/page_task/credit/credit.vue";
+import Graph from "@/page_task/task_details/module/graph.vue";
 
 export default {
   components: {
+    Graph,
     CreditList,
     EnSelect,
     TaskTab,
@@ -82,12 +86,12 @@ export default {
     Apply,
     Property,
     Record,
-    Steps
+    Word
   },
   data() {
     return {
       current: 1,
-      fixedHeight: 200,
+      fixedHeight: 150,
       options: {
         // autoHeight: true,
         slidesPerView: 1.1,

+ 5 - 0
service/tools.js

@@ -504,8 +504,13 @@ tools.getNextYear = function(d, num) {
 }
 
 tools.topHeight = function() {
+	// #ifdef MP-WEIXIN
 	const navTop = uni.getMenuButtonBoundingClientRect()
 	return navTop.height + navTop.top + 10
+	//#endif
+	// #ifdef H5
+   return  10
+    //#endif
 }