浏览代码

steps3 add checked

chuwu 6 年之前
父节点
当前提交
ba43eab80a
共有 3 个文件被更改,包括 22 次插入5 次删除
  1. 9 3
      src/utils/handsontable/delType.js
  2. 1 1
      src/utils/point_edit/steps3.js
  3. 12 1
      src/views/config_point/steps/step3.vue

+ 9 - 3
src/utils/handsontable/delType.js

@@ -22,10 +22,10 @@ export function showTypes(arr, infosKey = '') {
             //     return undefined
             // }
 
-            if (item.InfoPointCode == "EquipQRCode") {
+            if (item.InfoPointCode == "edit") {
                 return {
-                    data: infosKey + item.InfoPointCode,
-                    // renderer: text.lookQRCode,
+                    data: "Infos." + item.InfoPointCode,
+                    renderer: lookQRCode,
                     readOnly: true
                 }
             }
@@ -159,4 +159,10 @@ export function changeHeader(arr) {
         // }
     }).filter(d => d);
     return data
+}
+let lookQRCode = (instance, td, row, col, prop, value, cellProperties) => {
+    td.style.color = "#409EFF";
+    td.style.cursor = "pointer";
+    td.innerHTML = "编辑"
+    return td
 }

+ 1 - 1
src/utils/point_edit/steps3.js

@@ -49,7 +49,7 @@ export default [{
     },
     {
         InfoPointName: "操作",
-        InfoPointCode: "Caozuo",
+        InfoPointCode: "edit",
         InputMode: "Own",
         Visible: true,
         FirstTag: ""

+ 12 - 1
src/views/config_point/steps/step3.vue

@@ -6,7 +6,7 @@
             <el-checkbox v-model="checked">只显示未标准化得的原始点位</el-checkbox>
         </div>
         <div id="handsontableSteps1">
-            <handsontable-component ref="handsontable"></handsontable-component>
+            <handsontable-component @mouseDown="clickEdit" ref="handsontable"></handsontable-component>
         </div>
         <own-dialog :width="'1000px'" :dialogVisible="isDialogShow" @cancel="close">
             <dialog-main></dialog-main>
@@ -67,6 +67,17 @@
                 }
                 this.isDialogShow = true
             },
+            
+            /**
+             * 表格点击事件
+             * @param {当前条数据} rowData
+             * @param {当前条} row
+             * 
+             * down something
+             */
+            clickEdit(rowData,row){
+                console.log(rowData,row)
+            },
             //初始化表格实例
             getData() {
                 let width, param, settings