Browse Source

新增设备选择的设备编码,新增已办任务搜索标题

余思翰 3 months ago
parent
commit
9da19f62a1

+ 0
- 1
oa-ui/src/views/flowable/form/settleForm.vue View File

@@ -677,7 +677,6 @@ export default {
677 677
     async initForm() {
678 678
       this.loading = true
679 679
       const res = await listSettle({ settleId: this.taskForm.formId });
680
-      debugger
681 680
       if (res.total === 1) {
682 681
         this.form = res.rows[0];
683 682
         this.isAppend = await this.getIsAppend(this.taskForm.formId, res.rows[0].projectId) //判断是否为追加结算

+ 19
- 2
oa-ui/src/views/flowable/task/finished/index.vue View File

@@ -10,6 +10,9 @@
10 10
           placeholder="选择时间">
11 11
         </el-date-picker>
12 12
       </el-form-item>
13
+      <el-form-item label="标题">
14
+        <el-input v-model="searchText" size="small" @input="filterTitle()" clearable placeholder="仅搜索当前页面标题"></el-input>
15
+      </el-form-item>
13 16
       <el-form-item>
14 17
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
15 18
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -75,7 +78,8 @@
75 78
         </template>
76 79
       </el-table-column>
77 80
     </el-table>
78
-
81
+    <div class="mt20" style="font-size:12px;color:#e45656;text-align:right;">
82
+      tips:标题搜索只搜索当前页码列表,可在右下角调整每页条数,若当前页面未查询到,可点击下一页;</div>
79 83
     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
80 84
       @pagination="getList" />
81 85
     <el-dialog title="表单信息" :visible.sync="formOpen" append-to-body width="80%">
@@ -116,6 +120,7 @@ export default {
116 120
       total: 0,
117 121
       // 已办任务列表数据
118 122
       finishedList: [],
123
+      filterList: [],
119 124
       // 弹出层标题
120 125
       title: "",
121 126
       // 是否显示弹出层
@@ -145,6 +150,7 @@ export default {
145 150
       // 当前点击的行数据
146 151
       clickRow: {},
147 152
       detailsOpen: false,
153
+      searchText: '',
148 154
     };
149 155
   },
150 156
   created() {
@@ -154,7 +160,7 @@ export default {
154 160
     tableData() {
155 161
       const processed = [];
156 162
       const map = {};
157
-      this.finishedList.forEach(item => {
163
+      this.filterList.forEach(item => {
158 164
         if (!map[item.procInsId]) {
159 165
           map[item.procInsId] = { ...item, children: [] };
160 166
           processed.push(map[item.procInsId]);
@@ -171,10 +177,21 @@ export default {
171 177
       this.loading = true;
172 178
       finishedList(this.queryParams).then(response => {
173 179
         this.finishedList = response.data.records;
180
+        this.filterList = response.data.records;
174 181
         this.total = response.data.total;
182
+        this.filterTitle();
175 183
         this.loading = false;
176 184
       });
177 185
     },
186
+    filterTitle() {
187
+      this.filterList = this.finishedList.filter(data => {
188
+        if (data.title) {
189
+          return !this.searchText || data.title.toLowerCase().includes(this.searchText.toLowerCase())
190
+        } else {
191
+          return data
192
+        }
193
+      })
194
+    },
178 195
     // 取消按钮
179 196
     cancel() {
180 197
       this.open = false;

+ 0
- 1
oa-ui/src/views/flowable/task/myProcess/index.vue View File

@@ -342,7 +342,6 @@ export default {
342 342
       let formId = new Snowflake(1n, 1n, 0n).nextId().toString();
343 343
       getNextFlowNodeByStart({ deploymentId: row.deploymentId, variables: { formId: formId } }).then(res => {
344 344
         let data = res.data;
345
-        debugger
346 345
         if (data.dataType === 'dynamic' && row.name != '项目预算') {
347 346
           if (data.type === 'assignee') { // 指定人员
348 347
             this.checkSendUser = true;

+ 3
- 0
oa-ui/src/views/oa/device/index.vue View File

@@ -255,6 +255,9 @@ export default {
255 255
       form: {},
256 256
       // 表单校验
257 257
       rules: {
258
+        name: [
259
+          { required: true, message: '请输入设备名称', trigger: 'blur' }
260
+        ],
258 261
       }
259 262
     };
260 263
   },

+ 9
- 6
oa-ui/src/views/oa/supply/deviceList.vue View File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:51
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-30 15:36:16
5
+ * @LastEditTime: 2025-03-06 17:03:13
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -27,7 +27,7 @@
27 27
       </el-form-item>
28 28
       <el-form-item label="设备名称:">
29 29
         <el-select v-model="queryParams.name" filterable @change="getList" clearable>
30
-          <el-option v-for="item in nameList" :key="item.name" :label="item.name" :value="item.name">
30
+          <el-option v-for="(item, index) in nameList" :key="'d' + index" :label="item.name" :value="item.name">
31 31
           </el-option>
32 32
         </el-select>
33 33
         <!-- <el-input v-model="queryParams.name" clearable></el-input> -->
@@ -42,6 +42,7 @@
42 42
     <el-table ref="chooseDevice" :data="list" @selection-change="handleSelectionChange" :row-key="getRowKeys"
43 43
       @current-change="handleCurrentChange" @row-dblclick="confirmChooseBySingle" :highlight-current-row="!multiple">
44 44
       <el-table-column type="selection" width="50" align="center" :reserve-selection="true" v-if="multiple" />
45
+      <el-table-column label="设备编码" align="center" prop="deviceNumber" />
45 46
       <el-table-column label="设备状态" align="center" prop="status" v-if="queryParams.type == '仪器设备'">
46 47
         <template slot-scope="scope">
47 48
           <el-tag :type="statusType(scope.row.status)">
@@ -57,9 +58,12 @@
57 58
       <el-table-column label="单日成本" align="center" prop="dayCost" />
58 59
     </el-table>
59 60
     <div style="text-align: right;">
60
-      <el-pagination @current-change="getList" :current-page.sync="queryParams.pageNum"
61
+      <!-- <el-pagination @current-change="getList()" :current-page.sync="queryParams.pageNum"
61 62
         :page-size="queryParams.pageSize" layout="total, prev, pager, next" :total="total">
62
-      </el-pagination>
63
+      </el-pagination> -->
64
+      <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
65
+        :layout="'total, prev, pager, next,jumper'" :limit.sync="queryParams.pageSize" :autoScroll="false"
66
+        @pagination="getList" />
63 67
     </div>
64 68
     <div>
65 69
       已选设备:
@@ -77,7 +81,6 @@
77 81
 
78 82
 <script>
79 83
 import { listDevice, listDeviceName } from "@/api/oa/device/device";
80
-import { multiply } from 'ol/transform';
81 84
 export default {
82 85
   props: {
83 86
     multiple: {
@@ -199,7 +202,7 @@ export default {
199 202
     formatChooseList() {
200 203
       if (this.chooseList.name) {
201 204
         return this.chooseList.name + '-' + this.chooseList.series + '-' + this.chooseList.brand
202
-      }else{
205
+      } else {
203 206
         return null
204 207
       }
205 208
     }

+ 3
- 0
oa-ui/src/views/oa/supply/index.vue View File

@@ -256,6 +256,9 @@ export default {
256 256
       form: {},
257 257
       // 表单校验
258 258
       rules: {
259
+        name: [
260
+          { required: true, message: '请输入设备名称', trigger: 'blur' }
261
+        ],
259 262
       }
260 263
     };
261 264
   },

Loading…
Cancel
Save