Kaynağa Gözat

compare dialog todo

lloyd 3 ay önce
ebeveyn
işleme
6b986e1877

+ 3 - 2
src/api/manage.js

@@ -9,8 +9,9 @@ import store from '../store'    //引用store.js
9 9
 var axios = Axios.create({
10 10
     // baseURL: 'http://101.200.219.190:88', // 后台默认地址
11 11
     // baseURL: 'http://10.72.143.2:88', //准东后台默认地址
12
-    // baseURL: 'http://192.168.31.252:88', // 一厂默认地址k
13
-    baseURL: 'http://11.72.128.68:88', // 一厂默认地址k
12
+   // baseURL: 'http://192.168.31.252:88', // 一厂默认地址k
13
+   baseURL: 'http://192.168.31.101:88', // 一厂默认地址k
14
+    //  baseURL: 'http://11.72.128.68:88', // 一厂默认地址k
14 15
    // baseURL: 'http://10.184.33.224:88', // 中石油默认地址
15 16
 
16 17
     // baseURL: 'http://10.72.143.2:88', // 数据公司后台默认地址

+ 13 - 0
src/components/NewWorkPage/DvhCheckedCardManage.vue

@@ -0,0 +1,13 @@
1
+<script>
2
+export default {
3
+  name: "DvhCheckedCardManage",
4
+}
5
+</script>
6
+
7
+<template>
8
+
9
+</template>
10
+
11
+<style scoped>
12
+
13
+</style>

+ 13 - 0
src/components/NewWorkPage/DvhCheckedHistory.vue

@@ -0,0 +1,13 @@
1
+<script>
2
+export default {
3
+  name: "DvhCheckedHistory"
4
+}
5
+</script>
6
+
7
+<template>
8
+
9
+</template>
10
+
11
+<style scoped>
12
+
13
+</style>

+ 236 - 0
src/components/NewWorkPage/DvhCompareDialog.vue

@@ -0,0 +1,236 @@
1
+<script>
2
+import mockData from "@/components/NewWorkPage/data";
3
+import "./css/Layout.css"
4
+import "./css/DvhCheck.css"
5
+
6
+export default {
7
+  name: "DvhCompareDialog",
8
+  props: ["visible", "dvhCardId", "wellId"],
9
+  emits: ["update:visible"],
10
+  data() {
11
+    return {
12
+      //功图校核页面
13
+      dvhCardCheck: {
14
+        cardId: '',
15
+        wellId: '',
16
+        rightChartOption: {
17
+          title: {
18
+            text: '#3 2024年6月13日 13:59:11',
19
+            textStyle: {
20
+              color: '#7a7a79',
21
+              fontSize: 12,
22
+            },
23
+            left: 50,
24
+            top: 10
25
+          },
26
+          xAxis: {
27
+            type: 'value',
28
+            min: 0,
29
+            splitLine: {
30
+              show: false
31
+            },
32
+            name: 'm',
33
+            nameLocation: 'end',
34
+            nameGap: 3,
35
+            interval: 1
36
+          },
37
+          yAxis: {
38
+            type: 'value',
39
+            max: 90,
40
+            min: 70,
41
+            splitLine: {
42
+              show: false
43
+            },
44
+            name: 'kN',
45
+            nameGap: 5,
46
+            nameLocation: 'end',
47
+            maxInterval: 5
48
+          },
49
+          tooltip: {
50
+            axisPointer: {
51
+              type: 'cross',
52
+            }
53
+          },
54
+          grid: {
55
+            show: false,
56
+          },
57
+          series: [
58
+            {
59
+              data: mockData.sgt,
60
+              type: 'line',
61
+              smooth: true,
62
+              symbol: 'none',
63
+              lineStyle: {
64
+                color: '#f34e67'
65
+              }
66
+            },
67
+            {
68
+              data: [[0, 75.64], [8, 75.64]],
69
+              type: 'line',
70
+              // symbol: 'none',
71
+              symbolSize: 1,
72
+              lineStyle: {
73
+                color: '#5683f4',
74
+                type: 'dashed'
75
+              },
76
+              label: {
77
+                show: true,
78
+                // position: 'top',
79
+                position: [-30, 5],
80
+                formatter: function (params) {
81
+                  if (params.dataIndex === 1)
82
+                    return params.data[1];//+ 'kN';
83
+                  return ''
84
+                },
85
+                color: '#1b1a1a'
86
+              }
87
+            },
88
+            {
89
+              data: [[0, 85.86], [8, 85.86]],
90
+              type: 'line',
91
+              // symbol: 'none',
92
+              symbolSize: 1,
93
+              lineStyle: {
94
+                color: '#5683f4',
95
+                type: 'dashed'
96
+              },
97
+              label: {
98
+                show: true,
99
+                // position: 'top',
100
+                position: [-30, -12],
101
+                formatter: function (params) {
102
+                  if (params.dataIndex === 1)
103
+                    return params.data[1];//+ 'kN';
104
+                  return ''
105
+                },
106
+                color: '#1b1a1a'
107
+              }
108
+            }
109
+          ]
110
+        },
111
+        upload: {
112
+          files: []
113
+        }
114
+      }
115
+    }
116
+  },
117
+  mounted() {
118
+    this.dvhCardCheck.cardId = this.dvhCardId
119
+    this.dvhCardCheck.wellId = this.wellId
120
+    this.initView()
121
+  },
122
+  methods: {
123
+    closeDialog: function () {
124
+      this.$emit("update:visible", false);
125
+    },
126
+    initView() {
127
+      if (!this.dvhCardCheck.cardId) return
128
+      this.setLeftCard()
129
+    },
130
+    //根据数据id查询对应功图显示
131
+    setLeftCard() {
132
+
133
+    },
134
+    //上传低压测试功图
135
+    uploadDvhCard(file) {
136
+      // postAction(publicUrl.uploadCheckDvhCard,file.file).then((res) => {
137
+      //   console.log("ok")
138
+      // }).catch(reason => {
139
+      //   console.log(reason.message)
140
+      // })
141
+
142
+
143
+    },
144
+    //获取该井低压测试功图时间列表
145
+    setRightCardSelectList() {
146
+
147
+    },
148
+    //根据选择器选出的time id 调取已经录入的低压测试功图
149
+    setRightCard() {
150
+
151
+    },
152
+    //掉接口对比填充中间对比结果数据
153
+    compareCard() {
154
+
155
+    }
156
+  }
157
+}
158
+</script>
159
+
160
+<template>
161
+  <el-dialog title="功图校核" :visible.sync="visible" v-on:close="closeDialog" width="1200px">
162
+    <div class="flex-row">
163
+      <div class="col-in-row flex-col dvh-original">
164
+        <div class="f-height-30"></div>
165
+        <div class="row-in-col">
166
+          <v-chart :options="dvhCardCheck.rightChartOption"
167
+                   style="min-width: 400px;min-height: 400px;height: 100%;width: 100%"></v-chart>
168
+        </div>
169
+      </div>
170
+      <div class="col-in-row flex-col dvh-compare">
171
+        <table>
172
+          <tr>
173
+            <th></th>
174
+            <th colspan="2">左&nbsp;&nbsp;&nbsp;→&nbsp;&nbsp;&nbsp;右</th>
175
+            <th>校核值</th>
176
+          </tr>
177
+          <tr>
178
+            <td>最大载荷(kN)</td>
179
+            <td>123</td>
180
+            <td>111</td>
181
+            <td>-11</td>
182
+          </tr>
183
+          <tr>
184
+            <td>最小载荷(kN)</td>
185
+            <td>123</td>
186
+            <td>111</td>
187
+            <td>-11</td>
188
+          </tr>
189
+          <tr>
190
+            <td>载荷差(kN)</td>
191
+            <td>123</td>
192
+            <td>111</td>
193
+            <td>-11</td>
194
+          </tr>
195
+          <tr>
196
+            <td>冲程(m)</td>
197
+            <td>123</td>
198
+            <td>111</td>
199
+            <td>-11</td>
200
+          </tr>
201
+          <tr>
202
+            <td>冲次(/min)</td>
203
+            <td>123</td>
204
+            <td>111</td>
205
+            <td>-11</td>
206
+          </tr>
207
+        </table>
208
+      </div>
209
+      <div class="col-in-row flex-col dvh-in">
210
+        <div class="f-height-30">
211
+          <el-upload
212
+              accept=".dat"
213
+              :auto-upload="true"
214
+              :show-file-list="false"
215
+              :http-request="uploadDvhCard"
216
+              :file-list="dvhCardCheck.upload.files">
217
+            <i class="el-icon-upload"></i>
218
+          </el-upload>
219
+          <i class="el-icon-s-management">管理</i>
220
+        </div>
221
+        <div class="row-in-col">
222
+          <v-chart :options="dvhCardCheck.rightChartOption"
223
+                   style="min-width: 400px;min-height: 400px;height: 100%;width: 100%"></v-chart>
224
+        </div>
225
+      </div>
226
+    </div>
227
+    <div class="dvh-check-btn">
228
+      <el-button type="success" size="small">通过校核</el-button>
229
+      <el-button type="danger" size="small">不通过</el-button>
230
+    </div>
231
+  </el-dialog>
232
+</template>
233
+
234
+<style scoped>
235
+
236
+</style>

+ 53 - 0
src/components/NewWorkPage/MainLayout.vue

@@ -0,0 +1,53 @@
1
+<script>
2
+import "./css/NewWorkPage.css"
3
+import mockData from "@/components/NewWorkPage/data";
4
+import DvhCompareDialog from "@/components/NewWorkPage/DvhCompareDialog.vue";
5
+import WellSelector from "@/components/NewWorkPage/WellSelector.vue";
6
+
7
+export default {
8
+  name: "MainLayout",
9
+  components: {WellSelector, DvhCompareDialog},
10
+  data() {
11
+    return {
12
+      //井选择器
13
+      wellSelector: {
14
+        options: mockData.wellSelectorData
15
+      },
16
+      //功图校核页面
17
+      dvhCardCheck: {
18
+        visible: false
19
+      }
20
+    }
21
+  },
22
+  methods: {
23
+
24
+  }
25
+}
26
+</script>
27
+
28
+<template>
29
+  <div class="main">
30
+    <div class="header">
31
+     <WellSelector></WellSelector>
32
+      <el-button type="primary" size="small">查询</el-button>
33
+
34
+
35
+    </div>
36
+    <div class="main-body">
37
+      <dvh-compare-dialog  :visible.sync="dvhCardCheck.visible"
38
+                         ></dvh-compare-dialog>
39
+      <el-card>
40
+        <div slot="header">
41
+          <H2 @click="dvhCardCheck.visible=true">功图数据校核</H2>
42
+          <!--          <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>-->
43
+        </div>
44
+
45
+
46
+      </el-card>
47
+    </div>
48
+  </div>
49
+</template>
50
+
51
+<style scoped>
52
+
53
+</style>

+ 36 - 0
src/components/NewWorkPage/WellSelector.vue

@@ -0,0 +1,36 @@
1
+<script>
2
+import mockData from "@/components/NewWorkPage/data";
3
+
4
+export default {
5
+  name: "WellSelector",
6
+  data() {
7
+    return {
8
+      wellSelector: {
9
+        selected: '',
10
+        options: mockData.wellSelectorData
11
+      },
12
+    }
13
+  },
14
+  methods: {
15
+    changeSelected(node) {
16
+      console.log(node);
17
+    }
18
+  }
19
+}
20
+</script>
21
+
22
+<template>
23
+  <el-cascader
24
+      v-model="wellSelector.selected"
25
+      placeholder="选择一口井"
26
+      separator=' > '
27
+      clearable
28
+      filterable
29
+      :options="wellSelector.options"
30
+      :props="{ expandTrigger: 'hover' }"
31
+      @change="changeSelected"></el-cascader>
32
+</template>
33
+
34
+<style scoped>
35
+
36
+</style>

+ 20 - 0
src/components/NewWorkPage/css/DvhCheck.css

@@ -0,0 +1,20 @@
1
+
2
+.dvh-check-btn{
3
+    text-align: center;
4
+    padding-top: 10px;
5
+}
6
+
7
+
8
+
9
+.dvh-compare table {
10
+    height: 100%;
11
+    width: 100%;
12
+    min-width: 150px;
13
+    text-align: center;
14
+}
15
+
16
+.dvh-compare table tr > td:first-child {
17
+    text-align: right;
18
+    font-weight: 800;
19
+    width: 100px;
20
+}

+ 24 - 0
src/components/NewWorkPage/css/Layout.css

@@ -0,0 +1,24 @@
1
+.flex-row {
2
+    display: flex;
3
+    flex-direction: row;
4
+    min-height: 200px;
5
+}
6
+
7
+.col-in-row {
8
+    flex: 1;
9
+    /*border: 1px solid red;*/
10
+    padding: 0;
11
+}
12
+
13
+.flex-col {
14
+    display: flex;
15
+    flex-direction: column;
16
+}
17
+.row-in-col {
18
+    flex: 1;
19
+    /*border: 1px solid blue;*/
20
+}
21
+
22
+.f-height-30 {
23
+    height: 30px;
24
+}

+ 20 - 0
src/components/NewWorkPage/css/NewWorkPage.css

@@ -0,0 +1,20 @@
1
+.main {
2
+    display: flex;
3
+    flex-direction: column;
4
+    height: 100%;
5
+    width: 100%;
6
+    background-color: whitesmoke;
7
+}
8
+
9
+.header {
10
+    height: 70px;
11
+    padding: 10px;
12
+}
13
+
14
+.main-body {
15
+    height: 100%;
16
+    padding: 10px;
17
+}
18
+
19
+
20
+

Dosya farkı çok büyük olduğundan ihmal edildi
+ 29 - 0
src/components/NewWorkPage/data/index.js


+ 10 - 4
src/router/index.js

@@ -88,6 +88,7 @@ import liquidAbnormal from "../components/liquidAbnormal/liquidAbnormal";
88 88
 
89 89
 //功图叠加
90 90
 import overlay from "../components/overlay/overlay";
91
+import MainLayout from "@/components/NewWorkPage/MainLayout.vue";
91 92
 
92 93
 //诊断准确率分析
93 94
 // 获取cookie
@@ -108,7 +109,7 @@ function getCookie(cname) {
108 109
 
109 110
 Vue.use(VueRouter)
110 111
 // 重写路由的push方法
111
-const routerPush = VueRouter.prototype.push 
112
+const routerPush = VueRouter.prototype.push
112 113
 VueRouter.prototype.push = function push(location){
113 114
 	return routerPush.call(this,location).catch(error=>error)
114 115
 };
@@ -116,9 +117,9 @@ VueRouter.prototype.push = function push(location){
116 117
 
117 118
 const routes = [
118 119
 	{
119
-		path: '/', 
120
-		redirect: { 
121
-			name: 'dh_denglu' 
120
+		path: '/',
121
+		redirect: {
122
+			name: 'dh_denglu'
122 123
 		}
123 124
 	},
124 125
 	{
@@ -127,6 +128,11 @@ const routes = [
127 128
 		component: dh_denglu
128 129
 	},
129 130
 	{
131
+		path: '/newpage',
132
+		name: 'newpage',
133
+		component: MainLayout
134
+	},
135
+	{
130 136
 		path: '/dh_index',
131 137
 		name: 'dh_index',
132 138
 		component: dh_index,