diff --git a/src/views/common-settings/ItemType.vue b/src/views/common-settings/ItemType.vue index c8a6a7d..f98d97a 100644 --- a/src/views/common-settings/ItemType.vue +++ b/src/views/common-settings/ItemType.vue @@ -19,6 +19,7 @@ }" highlight-current-row @row-click="treeclick" + @row-dblclick="dblClick" ref="tableData" class="el-table__body-wrapper tbody" > @@ -392,7 +393,9 @@ export default { activeRows: [], message: true, tableKey:'', - isshows:true + isshows:true, + clickTime1: 0, + clickTime2: 0, }; }, created() { @@ -738,8 +741,19 @@ export default { }, // 点击获取每一列 treeclick(row) { + this.clickTime1 = new Date().getTime(); + + setTimeout(() => { + if (this.clickTime1 > this.clickTime2) { + this.row = { ...row }; + this.isshow = false; + } + }, 400); + }, + dblClick(row) { + this.clickTime2 = new Date().getTime(); this.row = { ...row }; - this.isshow = false; + this.rena() }, getlist() { projectlist().then((res) => { diff --git a/src/views/common-settings/SampleGroup.vue b/src/views/common-settings/SampleGroup.vue index 9e6ee55..bc1e0af 100644 --- a/src/views/common-settings/SampleGroup.vue +++ b/src/views/common-settings/SampleGroup.vue @@ -7,91 +7,181 @@ 条码分组
- - + +
-
+ " + >
- - + + - - - - + + + + - + - + - +
-
+
- 项目类别 - + " + >项目类别 +
-
- +
+ @@ -100,45 +190,89 @@
- 添加 + 添加
- 全部添加 + 全部添加
- 移除 + 移除
- 全部移除 + 全部移除
- 快速选择 - - + " + >快速选择 + +
-
- +
+ @@ -148,13 +282,15 @@
-
+ " + >
新增
@@ -168,20 +304,34 @@ 置顶
- 置底 + 置底
- 排序 + 排序
- 确定项目 + 确定项目
- + @@ -193,13 +343,26 @@ - + - - + + @@ -208,46 +371,79 @@ - - + + - + - + - + - + - + - 取 消 - 确 定 + 取 消 + 确 定
@@ -335,7 +531,9 @@ export default { sdate: [], curRow: {}, department: "", - quckDepartment: [] + quckDepartment: [], + clickTime1:0, + clickTime2:0 }; }, created() { @@ -443,9 +641,9 @@ export default { this.dict.asbItemQuick.forEach((item) => { if ( item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - -1 || + -1 || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - -1 || + -1 || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ) { this.quickAsb.push(item); @@ -749,7 +947,7 @@ export default { } }); }, - handlechang(value, direction, movedkeys) { }, + handlechang(value, direction, movedkeys) {}, //取消按钮 cancellation() { this.$message.info("取消操作"); @@ -782,7 +980,7 @@ export default { if (e == item.id) { this.$refs["info"].setCurrentRow(item); this.rowick(item); - this.searchup(item, index) + this.searchup(item, index); } }); } else { @@ -795,7 +993,7 @@ export default { this.initTableData.forEach((item) => { if ( item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - -1 || + -1 || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 ) { @@ -809,11 +1007,11 @@ export default { searchup(data, index) { this.$nextTick(() => { if (index == 0) { - index = 1 + index = 1; } const targetTop = this.$refs["info"].$el .querySelectorAll(".el-table__body tr") - [index - 1].getBoundingClientRect().top; + [index - 1].getBoundingClientRect().top; const containerTop = this.$refs["info"].$el .querySelector(".el-table__body") .getBoundingClientRect().top; @@ -945,7 +1143,7 @@ export default { displayName: this.form.displayName, sampleTypeId: this.form.sampleTypeId, sampleContainerId: this.form.sampleContainerId, - samplePrintCount: Number(this.form.samplePrintCount) + samplePrintCount: Number(this.form.samplePrintCount), }).then((res) => { if (res.code != -1) { // this.getlist(); 改为局部刷新 @@ -960,7 +1158,7 @@ export default { displayName: this.form.displayName, sampleTypeId: this.form.sampleTypeId, sampleContainerId: this.form.sampleContainerId, - samplePrintCount: Number(this.form.samplePrintCount) + samplePrintCount: Number(this.form.samplePrintCount), }).then((res) => { if (res.code != -1) { // this.getlist(); 改为局部刷新 @@ -979,7 +1177,11 @@ export default { let currentRow = {}; let lfind = arrayExistObj(this.tableData, "id", this.form.id); if (lfind > -1) { - this.tableData[lfind] = Object.assign({}, this.tableData[lfind], this.form) + this.tableData[lfind] = Object.assign( + {}, + this.tableData[lfind], + this.form + ); currentRow = this.tableData[lfind]; } else { currentRow = deepCopy(this.form); @@ -1017,17 +1219,7 @@ export default { } }); }, - - //点击条码分组记录 - rowick(row) { - this.curRow = deepCopy(row); - this.form = deepCopy(row); - - // samplegropid(row.id).then((res) => { - // this.curRow = { ...res.data }; - // this.form = res.data; - // }); - + refresh(row) { getapi( `/api/app/sample-group-detail/sample-group-in-asbitem?SampleGroupId=${row.id}` ).then((res) => { @@ -1037,6 +1229,24 @@ export default { } }); }, + //点击条码分组记录 + rowick(row) { + this.clickTime1 = new Date().getTime(); + setTimeout(() => { + if (this.clickTime1 > this.clickTime2) { + this.curRow = deepCopy(row); + this.form = deepCopy(row); + this.refresh(row); + } + }, 400); + }, + async dblClick(row) { + this.clickTime2 = new Date().getTime(); + this.curRow = deepCopy(row); + this.form = deepCopy(row); + await this.refresh(row); + this.btnEdit(); + }, getSummaries(param) { const { columns, data } = param; const sums = []; diff --git a/src/views/fee-settings/Asbitem.vue b/src/views/fee-settings/Asbitem.vue index 75072c3..26127db 100644 --- a/src/views/fee-settings/Asbitem.vue +++ b/src/views/fee-settings/Asbitem.vue @@ -7,21 +7,44 @@ 组合项目
- - + +
-
+
- +
@@ -29,8 +52,11 @@ class="el-icon-document-remove" v-if="data.parentId == null" > --> - + {{ node.label @@ -43,22 +69,40 @@
-
- +
+ - + - +