@leevan/jtui 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/examples/App.vue CHANGED
@@ -70,7 +70,7 @@ export default {
70
70
  idx:'5'
71
71
  }
72
72
  ],
73
- menuIdx:'1'
73
+ menuIdx:'5'
74
74
  }
75
75
  },
76
76
  methods: {
@@ -0,0 +1,6 @@
1
+ export function data(){
2
+ return [{"retjson":{"isEnums":true,"isHaveHead":true,"header":[{"isSort":false,"prop":"name","width":240,"label":"名称","type":"String","align":"left","enum":[]},{"isSort":false,"prop":"path","width":0,"label":"path","type":"String","align":"","enum":[]},{"isSort":false,"prop":"pjcd","width":120,"label":"拟报标志","type":"String","align":"center","cellRender":"TabsBtn","enum":[]}],"isPages":false},"DataArray":[{"path":"NB_ADDVCD_DS?nbcode=/srdao/sqdb/ST_PPTN_05&stlbz=T","inBottons":[{"funcode":"stcd_ppcdreflash","color":"#409EFF","size":14,"name":"刷新","icon":"iconzengjia"},{"funcode":"stcd_search","color":"#409EFF","size":14,"name":"检索","icon":"iconzengjia"}],"name":"实时雨量(PN05)-[/srjtcontrol/nb/PN05ToPPTN]","pjcd":""},{"path":"NB_ADMAUTH?nbcode=/srdao/sqdb/RM_PF5&stlbz=P","inBottons":[{"funcode":"stcd_ppcdreflash","color":"#409EFF","size":14,"name":"刷新","icon":"iconzengjia"},{"funcode":"stcd_search","color":"#409EFF","size":14,"name":"检索","icon":"iconzengjia"}],"name":"累计雨量(PF5)-[/srjtcontrol/nb/PF5ToDB]","pjcd":""},{"path":"NB_ADMAUTH?nbcode=/srdao/sqdb/ST_RIVER_05&stlbz=T","inBottons":[{"funcode":"stcd_ppcdreflash","color":"#409EFF","size":14,"name":"刷新","icon":"iconzengjia"},{"funcode":"stcd_search","color":"#409EFF","size":14,"name":"检索","icon":"iconzengjia"}],"name":"水位流量(RIVER05)-[/srjtcontrol/nb/ZQToRiver]","pjcd":""},{"path":"NB_ADMAUTH?nbcode=/srdao/sqdb/ST_RSVR_R&stlbz=T","inBottons":[{"funcode":"stcd_ppcdreflash","color":"#409EFF","size":14,"name":"刷新","icon":"iconzengjia"},{"funcode":"stcd_search","color":"#409EFF","size":14,"name":"检索","icon":"iconzengjia"}],"name":"水库水情表(RSVR05)-[/srjtcontrol/nb/ZToRSVR]","pjcd":""},{"path":"NB_ADMAUTH?nbcode=/srdao/sqdb/ST_SOIL_R&stlbz=T","inBottons":[{"funcode":"stcd_ppcdreflash","color":"#409EFF","size":14,"name":"刷新","icon":"iconzengjia"},{"funcode":"stcd_search","color":"#409EFF","size":14,"name":"检索","icon":"iconzengjia"}],"name":"土壤墒情表-[/srjtcontrol/nb/MToSOIL]","pjcd":""},{"path":"NB_STLIST?admauth=none&pjcd=none&addvcd=none&nbcode=/SX/BV&stlbz=L","inBottons":[{"funcode":"stcd_ppcdreflash","color":"#409EFF","size":14,"name":"刷新","icon":"iconzengjia"},{"funcode":"stcd_search","color":"#409EFF","size":14,"name":"检索","icon":"iconzengjia"}],"name":"三峡遥测电压-[/srjtcontrol/sx/BVToSXRTSQ]","pjcd":""},{"path":"NB_STLIST?admauth=none&pjcd=none&addvcd=none&nbcode=/SX/PF5&stlbz=L","inBottons":[{"funcode":"stcd_ppcdreflash","color":"#409EFF","size":14,"name":"刷新","icon":"iconzengjia"},{"funcode":"stcd_search","color":"#409EFF","size":14,"name":"检索","icon":"iconzengjia"}],"name":"三峡遥测累计雨量-[/srjtcontrol/sx/PF5ToSXRTSQ]","pjcd":""}],"forms":[{"oprtype":"modify","submit":"/dbacc/test-app/39409a71d7d8bfdba778013749cf6730fa93ee98ad3c38b51bd3dd3e1a6f07c6/883A146DF81C76D9A22858721A45353B/sqrms_ycnb/","data":[],"display":false,"index":1,"showtype":"el-dialog","pagemodal":"step","Pages":[{"pagerule":"required","formtype":"JT_DEFAULT_FORM","formConfig":[{"disabled":false,"label":"nbcode","type":"empty","modelKey":"nbcode"},{"disabled":false,"label":"stcd","type":"empty","modelKey":"stcd"},{"disabled":false,"label":"pjcd","type":"empty","modelKey":"pjcd"}],"model":{"stcd":{},"nbcode":{},"pjcd":{}},"rules":{},"pagecode":"stcd_nb_0"}],"path":"IU","funcode":"stcd_nb","name":"测站拟报设置","width":"600","model":{}},{"Pages":[],"funcode":"stcd_ppcdreflash","oprtype":"Reflash","data":[],"display":false,"name":"刷新","width":"600","index":1,"model":{},"showtype":"el-dialog","pagemodal":"step"},{"oprtype":"modify","submit":"/dbacc/test-app/39409a71d7d8bfdba778013749cf6730fa93ee98ad3c38b51bd3dd3e1a6f07c6/883A146DF81C76D9A22858721A45353B/sqrms_ycnb/","data":[],"display":false,"index":1,"showtype":"el-dialog","pagemodal":"step","Pages":[{"pagerule":"required","formtype":"jt-form-pc","formConfig":[{"disabled":false,"label":"nbcode","type":"empty","modelKey":"nbcode"},{"disabled":false,"label":"stcd","type":"empty","modelKey":"stcd"},{"width":300,"defaultvalue":"","disabled":false,"label":"参数代码","placeholder":"请输入参数代码","type":"input","modelKey":"ppcdlist"}],"name":"测站拟报参数设置","labelWidth":200,"model":{"stcd":{},"nbcode":{},"ppcdlist":""},"rules":{},"pagecode":"stcd_ppcdlist_0"}],"path":"IU","funcode":"stcd_ppcdlist","name":"拟报参数","width":"600","model":{}},{"oprtype":"Search","submit":"/dbacc/test-app/65ddae9353688b639ee665a28da7e9ddfa91c372308a33fe8e0f899adf78637c/883A146DF81C76D9A22858721A45353B/sqrms_ycnb/","data":[],"display":false,"index":1,"showtype":"el-dialog","pagemodal":"step","Pages":[],"path":"NB_PJCD","funcode":"stcd_search","name":"检索","width":"600","model":{}}],"Result":7}]
3
+ }
4
+
5
+
6
+
@@ -6,6 +6,7 @@
6
6
  :data="data[0]"
7
7
  tableType="tree"
8
8
  :handlerConfig="handlerConfig"
9
+ @treeTxtClick="treeTxtClick"
9
10
  :treeTypeConfig="treeTypeConfig"></jt-table-pc>
10
11
  </div>
11
12
  </template>
@@ -36,6 +37,11 @@
36
37
  btnGroup:false,//设置true则是下拉按钮,设置false则是并排按钮(依赖element-ui)
37
38
  }
38
39
  }
40
+ },
41
+ methods:{
42
+ treeTxtClick(row,treePath){
43
+ console.log(row,treePath);
44
+ }
39
45
  }
40
46
  }
41
47
  </script>
@@ -12,10 +12,14 @@
12
12
  </template>
13
13
 
14
14
  <script>
15
+ import { data } from '../data2.js';
15
16
  export default {
16
17
  async created(){
17
- const { data } = await this.$axios.post('/api/treetest/ROOT');
18
- this.data = data;
18
+ // const { data } = await this.$axios.post('/api/treetest/ROOT');
19
+ // debugger;
20
+ // data[0].DataArray[0].TEST_EXEC = '显示文案'
21
+
22
+ this.data = data();
19
23
  },
20
24
  data(){
21
25
  return {
@@ -39,11 +43,15 @@
39
43
  }
40
44
  },
41
45
  methods:{
42
- handlerClick(value,row,rowIndex){
43
- console.log(rowIndex);
46
+ async handlerClick(value,row,rowIndex){
47
+ if(value == 'stcd_search'){
48
+ await this.$refs.tree_table.setTreeTempData([
49
+ {"path":"NB_ADDVCD_DS?nbcode=/srdao/sqdb/ST_PPTN_05&stlbz=T","inBottons":[{"funcode":"stcd_ppcdreflash","color":"#409EFF","size":14,"name":"刷新","icon":"iconzengjia"},{"funcode":"stcd_search","color":"#409EFF","size":14,"name":"检索","icon":"iconzengjia"}],"name":"我是父组件检索加载的-[/srjtcontrol/nb/PN05ToPPTN]","pjcd":""}
50
+ ]);
51
+ this.$refs.tree_table.reloadTreeChilds(row);
52
+ }
44
53
  }
45
54
  }
46
-
47
55
  }
48
56
  </script>
49
57