@leevan/jtui 2.0.32 → 2.0.34

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.
@@ -0,0 +1,57 @@
1
+ <!--
2
+ * @Author: leevan
3
+ * @Date: 2024-04-20 16:35:14
4
+ * @LastEditTime: 2024-04-22 15:33:01
5
+ * @LastEditors: leevan
6
+ * @FilePath: /jtui-pc/examples/searchType/search-type-page.vue
7
+ -->
8
+ <template>
9
+ <div class="search-type-box">
10
+ <search-type v-if="selpath !== '' && options.length"
11
+ @initedData="initedData"
12
+ ref="searchType"
13
+ :selected="selpath"
14
+ @count="count"
15
+ :options_type="options"
16
+ :listuri="listuri"></search-type>
17
+ <button @click="getData">获取数据</button>
18
+ </div>
19
+ </template>
20
+
21
+ <script>
22
+ import { get_options_type } from './mock'
23
+ export default {
24
+ created(){
25
+ const reslist = get_options_type()
26
+ this.listuri = reslist[0].listuri
27
+ this.options = reslist[0].fieldlist
28
+ this.selpath = reslist[0].selpath
29
+ },
30
+ data(){
31
+ return {
32
+ selpath:'',
33
+ options:[],
34
+ columnNum:0,
35
+ listuri:''
36
+ }
37
+ },
38
+ methods:{
39
+ initedData(data){
40
+ console.log(data)
41
+ },
42
+ count(num) {
43
+ this.columnNum = num * 35 + 'px'
44
+ },
45
+ getData(){
46
+ const res = this.$refs.searchType.getData()
47
+ console.log(res)
48
+ }
49
+ }
50
+ }
51
+ </script>
52
+
53
+ <style lang="scss" scoped>
54
+ .search-type-box{
55
+
56
+ }
57
+ </style>
@@ -5,6 +5,7 @@
5
5
  <el-button size="mini" @click="exportDataExcel">直接导出数据</el-button>
6
6
  <el-button size="mini" @click="importData">导入数据</el-button>
7
7
  <el-button size="mini" @click="clearData">清空数据</el-button>
8
+ <el-button size="mini" @click="radioSelect">单选选中</el-button>
8
9
  <el-switch
9
10
  v-model="isTool"
10
11
  active-color="#13ce66"
@@ -109,8 +110,8 @@ import { data1 ,data0} from '../data2';
109
110
  tableData:[{retjson:{},DataArray:[],Result:""}],
110
111
  footConfig:{filed:['count']},
111
112
  isFooter:true,
112
- isCheckbox:true,
113
- isRadio:false,
113
+ isCheckbox:false,
114
+ isRadio:true,
114
115
  isWrap:false,
115
116
  isSeq:true,
116
117
  loading:false,
@@ -233,6 +234,10 @@ import { data1 ,data0} from '../data2';
233
234
  resolve(false)
234
235
  }
235
236
  })
237
+ },
238
+ radioSelect(){
239
+ const fullData = this.$refs.tablePtbg.jtTable().getTableData().fullData
240
+ this.$refs.tablePtbg.setRadioRow(fullData[Math.floor(Math.random() * 10) + 1])
236
241
  }
237
242
  }
238
243
  }